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-09 14:14:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-09 14:14:39 +0300
commit5db950e860b2f64078cfc8cf00cb4f430b8a1baf (patch)
treeb9a734351e0cfa849c3c136e4fc6f26276c7c5c0 /source/blender/editors/space_outliner/outliner_select.c
parent25074be697cb5726328aa5d064a60788c1da6aeb (diff)
Cleanup: use workspace for object_mode when possible
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 9f66e6a0105..df5f43978e6 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -658,8 +658,7 @@ 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);
+ const WorkSpace *workspace = CTX_wm_workspace(C);
Object *ob = (Object *)tselem->id;
Base *base = BKE_view_layer_base_find(view_layer, ob);
@@ -672,7 +671,7 @@ static eOLDrawState tree_element_active_pose(
if (scene->obedit) {
ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
}
- if (eval_ctx.object_mode & OB_MODE_POSE) {
+ if (workspace->object_mode & OB_MODE_POSE) {
ED_armature_exit_posemode(C, base);
}
else {
@@ -680,7 +679,7 @@ static eOLDrawState tree_element_active_pose(
}
}
else {
- if (eval_ctx.object_mode & OB_MODE_POSE) {
+ if (workspace->object_mode & OB_MODE_POSE) {
return OL_DRAWSEL_NORMAL;
}
}