diff options
Diffstat (limited to 'source/blender/editors/armature/pose_edit.c')
-rw-r--r-- | source/blender/editors/armature/pose_edit.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 3f2cf6f5853..15ffd09ebd4 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -94,16 +94,13 @@ void ED_armature_enter_posemode(bContext *C, Base *base) switch (ob->type) { case OB_ARMATURE: - { - WorkSpace *workspace = CTX_wm_workspace(C); - workspace->object_mode_restore = workspace->object_mode; - workspace->object_mode |= OB_MODE_POSE; + 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; - } default: return; } @@ -115,11 +112,10 @@ void ED_armature_enter_posemode(bContext *C, Base *base) void ED_armature_exit_posemode(bContext *C, Base *base) { if (base) { - WorkSpace *workspace = CTX_wm_workspace(C); Object *ob = base->object; - workspace->object_mode_restore = workspace->object_mode; - workspace->object_mode &= ~OB_MODE_POSE; + 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); |