diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-05 19:20:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-05 19:21:14 +0300 |
commit | 1c24c04e6023f2d2a328dfcdc9f86cd381d029a3 (patch) | |
tree | 7a5af59ce078cb66fb17ec33cf111ffc8d5fb328 /source/blender/editors/space_outliner/outliner_select.c | |
parent | 57329304b061efe756e3a4ce1b828e9a7c7f7030 (diff) |
Remove workspace object mode, reverts changes w/ 2.8
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 018756f2a99..bfa8633ab7d 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -193,10 +193,10 @@ static eOLDrawState tree_element_set_active_object( WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); } } - - if (CTX_data_edit_object(C)) { + + if (ob != OBEDIT_FROM_VIEW_LAYER(view_layer)) ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); - } + return OL_DRAWSEL_NORMAL; } @@ -658,7 +658,6 @@ static eOLDrawState tree_element_active_text( static eOLDrawState tree_element_active_pose( bContext *C, ViewLayer *view_layer, TreeElement *UNUSED(te), TreeStoreElem *tselem, const eOLSetState set) { - const WorkSpace *workspace = CTX_wm_workspace(C); Object *ob = (Object *)tselem->id; Base *base = BKE_view_layer_base_find(view_layer, ob); @@ -668,18 +667,16 @@ static eOLDrawState tree_element_active_pose( } if (set != OL_SETSEL_NONE) { - if (workspace->object_mode & OB_MODE_EDIT) { + if (OBEDIT_FROM_VIEW_LAYER(view_layer)) ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); - } - if (workspace->object_mode & OB_MODE_POSE) { + + if (ob->mode & OB_MODE_POSE) ED_armature_exit_posemode(C, base); - } - else { + else ED_armature_enter_posemode(C, base); - } } else { - if (workspace->object_mode & OB_MODE_POSE) { + if (ob->mode & OB_MODE_POSE) { return OL_DRAWSEL_NORMAL; } } |