Armature: Fix bone axes not using bone color.
This commit is contained in:
parent
1c3f953565
commit
48ddb2b98a
|
@ -988,6 +988,7 @@ static void draw_axes(EditBone *eBone, bPoseChannel *pchan)
|
|||
const float *col = (g_theme.const_color) ? g_theme.const_color :
|
||||
(BONE_FLAG(eBone, pchan) & BONE_SELECTED) ? g_theme.text_hi_color : g_theme.text_color;
|
||||
copy_v4_v4(final_col, col);
|
||||
final_col[3] = (g_theme.const_color) ? 1.0 : 0.3; /* Mix with axes color. */
|
||||
drw_shgroup_bone_axes(BONE_VAR(eBone, pchan, disp_mat), final_col);
|
||||
}
|
||||
|
||||
|
|
|
@ -452,7 +452,7 @@ DRWShadingGroup *shgroup_instance_bone_axes(DRWPass *pass)
|
|||
|
||||
DRWShadingGroup *grp = DRW_shgroup_instance_create(g_shaders.bone_axes,
|
||||
pass, DRW_cache_bone_arrows_get(),
|
||||
g_formats.instance_bone_outline);
|
||||
g_formats.instance_color);
|
||||
DRW_shgroup_uniform_vec3(grp, "screenVecs[0]", DRW_viewport_screenvecs_get(), 2);
|
||||
|
||||
return grp;
|
||||
|
|
|
@ -9,7 +9,7 @@ in vec3 colorAxis;
|
|||
|
||||
/* ---- Per instance Attribs ---- */
|
||||
in mat4 InstanceModelMatrix;
|
||||
in vec3 color;
|
||||
in vec4 color;
|
||||
|
||||
flat out vec4 finalColor;
|
||||
|
||||
|
@ -25,6 +25,6 @@ void main()
|
|||
|
||||
gl_Position = ViewProjectionMatrix * vec4(wpos + spos, 1.0);
|
||||
|
||||
finalColor.rgb = mix(color, colorAxis, 0.9);
|
||||
finalColor.rgb = mix(colorAxis, color.rgb, color.a);
|
||||
finalColor.a = 1.0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue