diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-20 18:43:56 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-20 19:12:48 +0300 |
commit | e1dff01e2945918a59e52fee38402292b7fa58cf (patch) | |
tree | 9e36242924bee0d3cd347259dccabb2f2a5b8c40 /source/blender/editors/space_outliner/outliner_tools.c | |
parent | 0d0d8935a53974c2c4603f97e41189daf4e4d47b (diff) |
Depsgraph: add some missing depsgraph tags when relations change.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tools.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 32918806765..eec0f083543 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -229,18 +229,22 @@ static void unlink_collection_cb( if (GS(tsep->id->name) == ID_OB) { Object *ob = (Object *)tsep->id; ob->dup_group = NULL; + DEG_id_tag_update(&ob->id, OB_RECALC_OB); DEG_relations_tag_update(bmain); } else if (GS(tsep->id->name) == ID_GR) { Collection *parent = (Collection *)tsep->id; id_fake_user_set(&collection->id); BKE_collection_child_remove(bmain, parent, collection); + DEG_id_tag_update(&parent->id, DEG_TAG_COPY_ON_WRITE); DEG_relations_tag_update(bmain); } else if (GS(tsep->id->name) == ID_SCE) { - Collection *parent = BKE_collection_master((Scene *)tsep->id); + Scene *scene = (Scene *)tsep->id; + Collection *parent = BKE_collection_master(scene); id_fake_user_set(&collection->id); BKE_collection_child_remove(bmain, parent, collection); + DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); DEG_relations_tag_update(bmain); } } @@ -257,11 +261,14 @@ static void unlink_object_cb( if (GS(tsep->id->name) == ID_GR) { Collection *parent = (Collection *)tsep->id; BKE_collection_object_remove(bmain, parent, ob, true); + DEG_id_tag_update(&parent->id, DEG_TAG_COPY_ON_WRITE); DEG_relations_tag_update(bmain); } else if (GS(tsep->id->name) == ID_SCE) { - Collection *parent = BKE_collection_master((Scene *)tsep->id); + Scene *scene = (Scene *)tsep->id; + Collection *parent = BKE_collection_master(scene); BKE_collection_object_remove(bmain, parent, ob, true); + DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); DEG_relations_tag_update(bmain); } } |