diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-04-27 12:31:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-04-27 12:31:19 +0300 |
commit | acec2a92efb1cd5b9cfb3700e3df7affd8741188 (patch) | |
tree | 2adbff9660ab6fd6a8914ed68ff81cb951dc1937 /source/blender/draw/intern | |
parent | a845fc0d399deafe54cd1f70e97a97b7588be94d (diff) |
Pose-mode drawing used alpha where it shouldn't
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r-- | source/blender/draw/intern/draw_armature.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/source/blender/draw/intern/draw_armature.c b/source/blender/draw/intern/draw_armature.c index 535a398bb35..676170de64e 100644 --- a/source/blender/draw/intern/draw_armature.c +++ b/source/blender/draw/intern/draw_armature.c @@ -181,20 +181,24 @@ static void update_color(const float const_color[4]) { g_theme.const_color = const_color; - UI_GetThemeColor4fv(TH_SELECT, g_theme.select_color); - UI_GetThemeColor4fv(TH_EDGE_SELECT, g_theme.edge_select_color); - UI_GetThemeColorShade4fv(TH_EDGE_SELECT, -20, g_theme.bone_select_color); - UI_GetThemeColor4fv(TH_WIRE, g_theme.wire_color); - UI_GetThemeColor4fv(TH_WIRE_EDIT, g_theme.wire_edit_color); - UI_GetThemeColor4fv(TH_BONE_SOLID, g_theme.bone_solid_color); - UI_GetThemeColorBlendShade4fv(TH_WIRE_EDIT, TH_EDGE_SELECT, 0.15f, 0, g_theme.bone_active_unselect_color); - UI_GetThemeColor4fv(TH_BONE_POSE, g_theme.bone_pose_color); - UI_GetThemeColor4fv(TH_BONE_POSE_ACTIVE, g_theme.bone_pose_active_color); - UI_GetThemeColorBlendShade4fv(TH_WIRE, TH_BONE_POSE, 0.15f, 0, g_theme.bone_pose_active_unselect_color); - UI_GetThemeColor4fv(TH_TEXT_HI, g_theme.text_hi_color); - UI_GetThemeColor4fv(TH_TEXT, g_theme.text_color); - UI_GetThemeColor4fv(TH_VERTEX_SELECT, g_theme.vertex_select_color); - UI_GetThemeColor4fv(TH_VERTEX, g_theme.vertex_color); +#define NO_ALPHA(c) (((c)[3] = 1.0f), (c)) + + UI_GetThemeColor3fv(TH_SELECT, NO_ALPHA(g_theme.select_color)); + UI_GetThemeColor3fv(TH_EDGE_SELECT, NO_ALPHA(g_theme.edge_select_color)); + UI_GetThemeColorShade3fv(TH_EDGE_SELECT, -20, NO_ALPHA(g_theme.bone_select_color)); + UI_GetThemeColor3fv(TH_WIRE, NO_ALPHA(g_theme.wire_color)); + UI_GetThemeColor3fv(TH_WIRE_EDIT, NO_ALPHA(g_theme.wire_edit_color)); + UI_GetThemeColor3fv(TH_BONE_SOLID, NO_ALPHA(g_theme.bone_solid_color)); + UI_GetThemeColorBlendShade3fv(TH_WIRE_EDIT, TH_EDGE_SELECT, 0.15f, 0, NO_ALPHA(g_theme.bone_active_unselect_color)); + UI_GetThemeColor3fv(TH_BONE_POSE, NO_ALPHA(g_theme.bone_pose_color)); + UI_GetThemeColor3fv(TH_BONE_POSE_ACTIVE, NO_ALPHA(g_theme.bone_pose_active_color)); + UI_GetThemeColorBlendShade3fv(TH_WIRE, TH_BONE_POSE, 0.15f, 0, NO_ALPHA(g_theme.bone_pose_active_unselect_color)); + UI_GetThemeColor3fv(TH_TEXT_HI, NO_ALPHA(g_theme.text_hi_color)); + UI_GetThemeColor3fv(TH_TEXT, NO_ALPHA(g_theme.text_color)); + UI_GetThemeColor3fv(TH_VERTEX_SELECT, NO_ALPHA(g_theme.vertex_select_color)); + UI_GetThemeColor3fv(TH_VERTEX, NO_ALPHA(g_theme.vertex_color)); + +#undef NO_ALPHA } static const float *get_bone_solid_color(const EditBone *eBone, const bPoseChannel *pchan, const bArmature *arm) |