diff options
author | Bastien Montagne <bastien@blender.org> | 2020-08-12 20:03:32 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-08-12 20:03:32 +0300 |
commit | eee88f7cec2351a183b7b8b5cfdd60f1cbe99e61 (patch) | |
tree | 168fa7282d135c5055c0e61b4c668307ee292a8e /source/blender/editors/interface | |
parent | 337b6d075880ea44ff5183804a387dc98673ffb9 (diff) | |
parent | b3165fb8b5689c3003292080b5783a22f48e77ec (diff) |
Merge branch 'blender-v2.90-release' into master
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 56807621358..cdfe6120eee 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -572,6 +572,15 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) if (override_id != NULL) { BKE_main_id_clear_newpoins(bmain); + if (GS(override_id->name) == ID_OB) { + Scene *scene = CTX_data_scene(C); + if (!BKE_collection_has_object_recursive(scene->master_collection, + (Object *)override_id)) { + BKE_collection_object_add_from( + bmain, scene, (Object *)id, (Object *)override_id); + } + } + /* Assign new pointer, takes care of updates/notifiers */ RNA_id_pointer_create(override_id, &idptr); } |