diff options
Diffstat (limited to 'source/blender/draw/modes/pose_mode.c')
-rw-r--r-- | source/blender/draw/modes/pose_mode.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/draw/modes/pose_mode.c b/source/blender/draw/modes/pose_mode.c index 560773f2d05..749c3e71368 100644 --- a/source/blender/draw/modes/pose_mode.c +++ b/source/blender/draw/modes/pose_mode.c @@ -136,14 +136,16 @@ 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->parent == ob) { + if ((active_ob != NULL) && ((draw_ctx->object_mode & OB_MODE_WEIGHT_PAINT) != 0)) { + if (ob == draw_ctx->object_pose) { return true; } } |