[Bf-blender-cvs] [17433268893] master: Library Overrides: Unlink instance empty after "Make Library Override"

Julian Eisel noreply at git.blender.org
Tue Jun 2 18:12:38 CEST 2020


Commit: 174332688936911d777ae39d540637edeed1561b
Author: Julian Eisel
Date:   Tue Jun 2 17:24:40 2020 +0200
Branches: master
https://developer.blender.org/rB174332688936911d777ae39d540637edeed1561b

Library Overrides: Unlink instance empty after "Make Library Override"

Unlink (delete if single-user) collection instance empty once an override is
added to the collection through the "Make Library Override" operator. It isn't
used as a collection instance anymore then so the emtpy is an annoying left
over that has no purpose.

Part of T76555.

Reviewed by: Andy Goralczyk, Bastien Montange.

Differential Revision: https://developer.blender.org/D7626

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

M	source/blender/editors/object/object_relations.c

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

diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 11e9c396552..d0f9b75f277 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -2546,9 +2546,9 @@ static int make_override_library_exec(bContext *C, wmOperator *op)
     }
     FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
 
-    /* obcollection is no more duplicollection-ing,
-     * it merely parents whole collection of overriding instantiated objects. */
-    obcollection->instance_collection = NULL;
+    /* Remove the instance empty from this scene, the items now have an overriden collection
+     * instead. */
+    ED_object_base_free_and_unlink(bmain, scene, obcollection);
 
     /* Also, we'd likely want to lock by default things like
      * transformations of implicitly overridden objects? */



More information about the Bf-blender-cvs mailing list