From f7636f0ef2b39eb2c6ee814684621a9c693fbdb8 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 25 Jul 2017 14:53:19 +0200 Subject: Depsgraph: Make sure armature mode is properly changed in all copied versions --- source/blender/editors/armature/pose_edit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/armature/pose_edit.c') diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 481d4aadfb7..7a8b89899a7 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -96,7 +96,8 @@ void ED_armature_enter_posemode(bContext *C, Base *base) case OB_ARMATURE: ob->restore_mode = ob->mode; ob->mode |= OB_MODE_POSE; - + /* Inform all CoW versions that we changed the mode. */ + DEG_id_tag_update_ex(CTX_data_main(C), &ob->id, DEG_TAG_COPY_ON_WRITE); WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_POSE, NULL); break; @@ -115,7 +116,10 @@ void ED_armature_exit_posemode(bContext *C, Base *base) ob->restore_mode = ob->mode; ob->mode &= ~OB_MODE_POSE; - + + /* Inform all CoW versions that we changed the mode. */ + DEG_id_tag_update_ex(CTX_data_main(C), &ob->id, DEG_TAG_COPY_ON_WRITE); + WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, NULL); } } -- cgit v1.2.3