[Bf-blender-cvs] [62f5232f37b] master: Fix T81573: Users refcount not incremented when creating a proxy.

Bastien Montagne noreply at git.blender.org
Fri Oct 9 17:52:54 CEST 2020


Commit: 62f5232f37b9755bfa07a174a47017cd1609fb5a
Author: Bastien Montagne
Date:   Fri Oct 9 17:51:38 2020 +0200
Branches: master
https://developer.blender.org/rB62f5232f37b9755bfa07a174a47017cd1609fb5a

Fix T81573: Users refcount not incremented when creating a proxy.

Proxies are refcounting usages of objects, historical code was
apparently missing that.

===================================================================

M	source/blender/blenkernel/intern/object.c

===================================================================

diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index d401f263871..a8017569ba9 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2060,8 +2060,8 @@ void BKE_object_make_proxy(Main *bmain, Object *ob, Object *target, Object *cob)
   }
 
   ob->proxy = target;
+  id_us_plus(&target->id);
   ob->proxy_group = cob;
-  id_lib_extern(&target->id);
 
   DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
   DEG_id_tag_update(&target->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);



More information about the Bf-blender-cvs mailing list