From 82268fa1009dadb526dd6dc2ebc81763aedb2c18 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 12 Aug 2016 13:58:48 +0200 Subject: Depsgraph: Tag relations for update when making datablocks single user This is mainly required for the new dependency graph where non-object datablocks are a part of dependency graph. This solves issue when making mesh shared by multiple objects a single user one. --- source/blender/editors/interface/interface_templates.c | 2 ++ source/blender/editors/object/object_relations.c | 1 + 2 files changed, 3 insertions(+) (limited to 'source') diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 241da5decc6..50dd219b53c 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -326,7 +326,9 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) } else { if (id) { + Main *bmain = CTX_data_main(C); id_single_user(C, id, &template->ptr, template->prop); + DAG_relations_tag_update(bmain); } } } diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index d5c7632765f..067a5ad2b49 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2106,6 +2106,7 @@ void ED_object_single_users(Main *bmain, Scene *scene, const bool full, const bo } BKE_main_id_clear_newpoins(bmain); + DAG_relations_tag_update(bmain); } /******************************* Make Local ***********************************/ -- cgit v1.2.3