From 174332688936911d777ae39d540637edeed1561b Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Tue, 2 Jun 2020 17:24:40 +0200 Subject: 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 --- source/blender/editors/object/object_relations.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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? */ -- cgit v1.2.3