Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-06-02 18:24:40 +0300
committerJulian Eisel <julian@blender.org>2020-06-02 18:59:08 +0300
commit174332688936911d777ae39d540637edeed1561b (patch)
treeb0539f64c165200713f1bb5ca1f66caa5d32526f /source/blender/editors/object
parentcdf0d95a50e6ea5592e65242c3c8ffbdfd4629a0 (diff)
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
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_relations.c6
1 files 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? */