From bc36e39c233d61b3dbefedb7fa4f98228d225a94 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Feb 2011 21:24:59 +0000 Subject: [PATCH] fix issue #2 raised by report: [#25894] Problems with properties across files --- source/blender/blenkernel/intern/object.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 0d3fb7107f0..625410324a3 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -59,11 +59,9 @@ #include "BLI_pbvh.h" #include "BLI_utildefines.h" - - #include "BKE_main.h" #include "BKE_global.h" - +#include "BKE_idprop.h" #include "BKE_armature.h" #include "BKE_action.h" #include "BKE_bullet.h" @@ -1605,7 +1603,17 @@ void object_make_proxy(Object *ob, Object *target, Object *gob) armature_set_id_extern(ob); } - + + /* copy IDProperties */ + if(ob->id.properties) { + IDP_FreeProperty(ob->id.properties); + MEM_freeN(ob->id.properties); + ob->id.properties= NULL; + } + if(target->id.properties) { + ob->id.properties= IDP_CopyProperty(target->id.properties); + } + /* copy drawtype info */ ob->dt= target->dt; }