diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-15 20:24:35 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-15 20:24:35 +0400 |
commit | 24ef6f7add98f4c6f8a5f41fc2fb52d2be2c7287 (patch) | |
tree | b336c5a01061b02f070e98c083fa6a90a50d38d6 /source | |
parent | 49649a3f7b6aa883450d33afbd2b9437eec5f814 (diff) |
Touch properties when clearing/adding to a collection.
Fixes an issue when adding several movie strips fails
second time in sequencer.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index b36ffc7bbe7..9f36131a6c9 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -2871,6 +2871,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA IDP_AppendArray(idprop, item); /* IDP_FreeProperty(item); *//* IDP_AppendArray does a shallow copy (memcpy), only free memory */ MEM_freeN(item); + rna_idproperty_touch(idprop); } else if (prop->flag & PROP_IDPROPERTY) { IDProperty *group, *item; @@ -3001,8 +3002,10 @@ void RNA_property_collection_clear(PointerRNA *ptr, PropertyRNA *prop) BLI_assert(RNA_property_type(prop) == PROP_COLLECTION); - if ((idprop = rna_idproperty_check(&prop, ptr))) + if ((idprop = rna_idproperty_check(&prop, ptr))) { IDP_ResizeIDPArray(idprop, 0); + rna_idproperty_touch(idprop); + } } int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *t_ptr) |