Fix T62097 Bone transparancy not enabled when Xray enabled

This forces bone transparency / wireframe display when Xray is enabled.
This makes sense as the bone transparency is a kind of Xray and should
be linked to the Xray display.
This commit is contained in:
2019-03-23 19:28:13 +01:00
parent 839fe4e01c
commit 16087eb911
3 changed files with 7 additions and 3 deletions

View File

@@ -198,7 +198,8 @@ static void POSE_cache_populate(void *vedata, Object *ob)
}
if (DRW_pose_mode_armature(ob, draw_ctx->obact)) {
int ghost = (ob->dtx & OB_DRAWXRAY) ? 1 : 0;
bool transp = (ppd->transparent_bones || (ob->dt <= OB_WIRE));
bool transp = (ppd->transparent_bones || (ob->dt <= OB_WIRE)) ||
(draw_ctx->v3d->shading.flag & XRAY_FLAG(draw_ctx->v3d)) != 0;
DRWArmaturePasses passes = {
.bone_solid = (transp) ? psl->bone_transp[ghost] : psl->bone_solid[ghost],