diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 08:10:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-06 10:03:28 +0300 |
commit | 28dfc47cf0b068d0103986424f79eeea59f2039b (patch) | |
tree | 5be77cc019cb6deda3416e0dc2385b48eac1232a /source/blender/draw/modes | |
parent | 1c600cc643306c12f2bc652b2ea921ecbb3cfadf (diff) |
Object Mode: Add to EvaluationContext & DRWContextState
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/pose_mode.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index d7778a0aba9..b1e0eddfc46 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1811,7 +1811,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) if (do_outlines) { Object *obedit = scene->obedit; - if (ob != obedit && !((ob == draw_ctx->obact) && (ob->mode & OB_MODE_ALL_PAINT))) { + if (ob != obedit && !((ob == draw_ctx->obact) && (draw_ctx->object_mode & OB_MODE_ALL_PAINT))) { struct Gwn_Batch *geom = DRW_cache_object_surface_get(ob); if (geom) { theme_id = DRW_object_wire_theme_get(ob, view_layer, NULL); diff --git a/source/blender/draw/modes/pose_mode.c b/source/blender/draw/modes/pose_mode.c index 560773f2d05..1589ff39bdf 100644 --- a/source/blender/draw/modes/pose_mode.c +++ b/source/blender/draw/modes/pose_mode.c @@ -136,13 +136,15 @@ static void POSE_cache_populate(void *vedata, Object *ob) */ bool DRW_pose_mode_armature(Object *ob, Object *active_ob) { + const DRWContextState *draw_ctx = DRW_context_state_get(); + /* Pode armature is handled by pose mode engine. */ - if ((ob == active_ob) && ((ob->mode & OB_MODE_POSE) != 0)) { + if ((ob == active_ob) && ((draw_ctx->object_mode & OB_MODE_POSE) != 0)) { return true; } /* Armature parent is also handled by pose mode engine. */ - if ((active_ob != NULL) && ((active_ob->mode & OB_MODE_WEIGHT_PAINT) != 0)) { + if ((active_ob != NULL) && ((draw_ctx->object_mode & OB_MODE_WEIGHT_PAINT) != 0)) { if (active_ob->parent == ob) { return true; } |