From 3224efc38419201b44503982541aca8eaeb29486 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 1 Apr 2009 12:43:07 +0000 Subject: Python Panels WIP - Register python panels - Added a generic class checking function BPY_class_validate() for panels/operators. - No button drawing yet Brecht, Added RNA_enum_value_from_id() and RNA_enum_id_from_value() to rna_access.c to do lookups between identifiers and values of EnumPropertyItem's, Not sure if these should go here. --- source/blender/blenkernel/intern/screen.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/blender/blenkernel/intern/screen.c') diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 483876e5e05..2f3ca52a09e 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -56,7 +56,22 @@ static void spacetype_free(SpaceType *st) for(art= st->regiontypes.first; art; art= art->next) { BLI_freelistN(&art->drawcalls); +#ifdef DISABLE_PYTHON BLI_freelistN(&art->paneltypes); +#else + { + PanelType *pnl, *pnl_next; + for(pnl= art->paneltypes.first; pnl; pnl= pnl_next) { + pnl_next= pnl->next; + + if(pnl->py_data) + BPY_DECREF(pnl->py_data); + + MEM_freeN(pnl); + } + art->paneltypes.first= art->paneltypes.last= NULL; + } +#endif BLI_freelistN(&art->headertypes); } -- cgit v1.2.3