diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-04-26 15:39:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-04-26 15:39:12 +0300 |
commit | b38d87fbaf0f5a442fcc45b47f20e4a184a367c9 (patch) | |
tree | 518decf2b0ebdbd1330afeb3821b905ecb522268 /source | |
parent | aca6a12330d3b4d5d28413400ade78fbd7c23770 (diff) |
Last commit broke object-armature select
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_armature.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/draw/intern/draw_armature.c b/source/blender/draw/intern/draw_armature.c index a8fc1c04f9d..017528d1990 100644 --- a/source/blender/draw/intern/draw_armature.c +++ b/source/blender/draw/intern/draw_armature.c @@ -402,7 +402,6 @@ static void draw_armature_pose(Object *ob, const float const_color[4]) bPoseChannel *pchan; int index = -1; Bone *bone; - const bool is_select = DRW_viewport_is_select(); update_color(const_color); @@ -411,18 +410,19 @@ static void draw_armature_pose(Object *ob, const float const_color[4]) BKE_pose_rebuild(ob, arm); } - if (!(base->flag_legacy & OB_FROMDUPLI)) { - if (is_select) { - if (ob->mode & OB_MODE_POSE) { - arm->flag |= ARM_POSEMODE; - } + // if (!(base->flag & OB_FROMDUPLI)) // TODO + { + if (ob->mode & OB_MODE_POSE) { + arm->flag |= ARM_POSEMODE; + } - if (arm->flag & ARM_POSEMODE) { - index = ob->base_selection_color; - } + if (arm->flag & ARM_POSEMODE) { + index = ob->base_selection_color; } } + bool is_pose_select = (arm->flag & ARM_POSEMODE) && DRW_viewport_is_select(); + /* being set below */ arm->layer_used = 0; @@ -433,7 +433,7 @@ static void draw_armature_pose(Object *ob, const float const_color[4]) /* bone must be visible */ if ((bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0) { if (bone->layer & arm->layer) { - const int select_id = is_select ? index : (unsigned int)-1; + const int select_id = is_pose_select ? index : (unsigned int)-1; draw_bone_update_disp_matrix(NULL, pchan, arm->drawtype); @@ -460,7 +460,7 @@ static void draw_armature_pose(Object *ob, const float const_color[4]) if (arm->flag & ARM_DRAWAXES) draw_axes(NULL, pchan); - if (is_select) { + if (is_pose_select) { index += 0x10000; } } |