From 24ef6f7add98f4c6f8a5f41fc2fb52d2be2c7287 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 15 Apr 2013 16:24:35 +0000 Subject: [PATCH] Touch properties when clearing/adding to a collection. Fixes an issue when adding several movie strips fails second time in sequencer. --- source/blender/makesrna/intern/rna_access.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)