diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 09:11:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 10:03:28 +0300 |
commit | 269ed0a770bf3627ba1e21d87d3d748c0765a531 (patch) | |
tree | 59c2bfd457dfd069f35c0700ad5dfe0ee982299b /source/blender/editors/space_outliner/outliner_select.c | |
parent | 021bf4c2fea0653a4a4511d6a54a6b130d6c5acc (diff) |
Object Mode: pass eval_ctx in outliner functions
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index b9222e62bb0..9f66e6a0105 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -658,6 +658,8 @@ static eOLDrawState tree_element_active_text( static eOLDrawState tree_element_active_pose( bContext *C, Scene *scene, ViewLayer *view_layer, TreeElement *UNUSED(te), TreeStoreElem *tselem, const eOLSetState set) { + EvaluationContext eval_ctx; + CTX_data_eval_ctx(C, &eval_ctx); Object *ob = (Object *)tselem->id; Base *base = BKE_view_layer_base_find(view_layer, ob); @@ -667,16 +669,18 @@ static eOLDrawState tree_element_active_pose( } if (set != OL_SETSEL_NONE) { - if (scene->obedit) + if (scene->obedit) { ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); - - if (ob->mode & OB_MODE_POSE) + } + if (eval_ctx.object_mode & OB_MODE_POSE) { ED_armature_exit_posemode(C, base); - else + } + else { ED_armature_enter_posemode(C, base); + } } else { - if (ob->mode & OB_MODE_POSE) { + if (eval_ctx.object_mode & OB_MODE_POSE) { return OL_DRAWSEL_NORMAL; } } |