diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-08-18 11:05:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-08-18 11:21:33 +0300 |
commit | 37acf4722d1279aad5ad16ccbcaebfe4252df781 (patch) | |
tree | 72bd6915725c155055d95ddd580e93eafddf7fc4 /source/blender/editors/object | |
parent | a069d3dc8cc48dcd55e5eff3d002fb06d99dc123 (diff) |
Static Override: link newly overridden collection to scene.
This avoids getting all overridden objects from said collection
instantiated in master collection, totally untidy!
Note that there is still an issue when 'active' object (i.e. the
armature usually) is in hidden sub-collection, since you have to make
that whole hidden collection visible again to see it.
We'll need to support moving objects into overridden collections am
afraid, arg. :(
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index bce57f6d55d..7eca34c505f 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2317,6 +2317,8 @@ static int make_override_static_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); Collection *new_collection = (Collection *)collection->id.newid; + + BKE_collection_child_add(bmain, scene->master_collection, new_collection); FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(new_collection, new_ob) { if (new_ob != NULL && new_ob->id.override_static != NULL) { |