diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 21 |
3 files changed, 14 insertions, 23 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 1d819b7de8b..5b10f921d7d 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -377,22 +377,22 @@ static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_i /* set value - only for animatable numerical values */ if (RNA_property_animateable(&new_ptr, prop)) { - switch (RNA_property_type(&new_ptr, prop)) + switch (RNA_property_type(prop)) { case PROP_BOOLEAN: - if (RNA_property_array_length(&new_ptr, prop)) + if (RNA_property_array_length(prop)) RNA_property_boolean_set_index(&new_ptr, prop, array_index, (int)value); else RNA_property_boolean_set(&new_ptr, prop, (int)value); break; case PROP_INT: - if (RNA_property_array_length(&new_ptr, prop)) + if (RNA_property_array_length(prop)) RNA_property_int_set_index(&new_ptr, prop, array_index, (int)value); else RNA_property_int_set(&new_ptr, prop, (int)value); break; case PROP_FLOAT: - if (RNA_property_array_length(&new_ptr, prop)) + if (RNA_property_array_length(prop)) RNA_property_float_set_index(&new_ptr, prop, array_index, value); else RNA_property_float_set(&new_ptr, prop, value); diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index d7b1bdaeff3..cce4f3a1217 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -679,21 +679,21 @@ static float driver_get_target_value (ChannelDriver *driver, DriverTarget *dtar) /* get property to read from, and get value as appropriate */ if (RNA_path_resolve(&id_ptr, path, &ptr, &prop)) { - switch (RNA_property_type(&ptr, prop)) { + switch (RNA_property_type(prop)) { case PROP_BOOLEAN: - if (RNA_property_array_length(&ptr, prop)) + if (RNA_property_array_length(prop)) value= (float)RNA_property_boolean_get_index(&ptr, prop, index); else value= (float)RNA_property_boolean_get(&ptr, prop); break; case PROP_INT: - if (RNA_property_array_length(&ptr, prop)) + if (RNA_property_array_length(prop)) value= (float)RNA_property_int_get_index(&ptr, prop, index); else value= (float)RNA_property_int_get(&ptr, prop); break; case PROP_FLOAT: - if (RNA_property_array_length(&ptr, prop)) + if (RNA_property_array_length(prop)) value= RNA_property_float_get_index(&ptr, prop, index); else value= RNA_property_float_get(&ptr, prop); diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 2f3ca52a09e..f43dc287062 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -53,25 +53,16 @@ static ListBase spacetypes= {NULL, NULL}; static void spacetype_free(SpaceType *st) { ARegionType *art; + PanelType *pt; for(art= st->regiontypes.first; art; art= art->next) { BLI_freelistN(&art->drawcalls); -#ifdef DISABLE_PYTHON + + for(pt= art->paneltypes.first; pt; pt= pt->next) + if(pt->py_free) + pt->py_free(pt->py_data); + 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); } |