Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-02-28 08:27:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-28 12:04:21 +0300
commit9e9cb9fce9c74d32b4f7fad9fdbcbbc59acc53b9 (patch)
tree2b31b3db0c7d89558cfe14b6a924ff2e0f1f5c1e /source/blender/editors/object
parentc0d6627dc5fd069ec31c116e98e1817a0fe20ebb (diff)
Workspace: sync object-modes to other workspaces
When changing the mode of an object, apply this to all other workspaces that share the same active object. Also use copy the object-mode when duplicating workspaces.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_edit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 0da4bd1e045..e975ee40c3c 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -313,6 +313,8 @@ void ED_object_editmode_exit_ex(bContext *C, WorkSpace *workspace, Scene *scene,
workspace->object_mode &= ~OB_MODE_EDIT;
}
+ ED_workspace_object_mode_sync_from_object(G.main->wm.first, workspace, obedit);
+
if (flag & EM_WAITCURSOR) waitcursor(0);
/* This way we ensure scene's obedit is copied into all CoW scenes. */
@@ -441,6 +443,8 @@ void ED_object_editmode_enter(bContext *C, int flag)
WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, scene);
}
+ ED_workspace_object_mode_sync_from_object(G.main->wm.first, workspace, ob);
+
if (flag & EM_DO_UNDO) ED_undo_push(C, "Enter Editmode");
if (flag & EM_WAITCURSOR) waitcursor(0);
}
@@ -506,6 +510,7 @@ void OBJECT_OT_editmode_toggle(wmOperatorType *ot)
static int posemode_exec(bContext *C, wmOperator *op)
{
+ wmWindowManager *wm = CTX_wm_manager(C);
WorkSpace *workspace = CTX_wm_workspace(C);
Base *base = CTX_data_active_base(C);
Object *ob = base->object;
@@ -527,7 +532,9 @@ static int posemode_exec(bContext *C, wmOperator *op)
ED_armature_exit_posemode(C, base);
else
ED_armature_enter_posemode(C, base);
-
+
+ ED_workspace_object_mode_sync_from_object(wm, workspace, ob);
+
return OPERATOR_FINISHED;
}