Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-03-23 21:28:13 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-03-23 21:28:13 +0300
commit16087eb911a7f3d65373478d45935cdc46cfd8fc (patch)
tree9be5bd8278aa7d1ac71b82d71853b2f3a5a5fcc1 /source/blender/draw/modes/pose_mode.c
parent839fe4e01c43328dd43562b03c68564e597d7e7f (diff)
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.
Diffstat (limited to 'source/blender/draw/modes/pose_mode.c')
-rw-r--r--source/blender/draw/modes/pose_mode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/modes/pose_mode.c b/source/blender/draw/modes/pose_mode.c
index 01affecade4..c4050bf3f1a 100644
--- a/source/blender/draw/modes/pose_mode.c
+++ b/source/blender/draw/modes/pose_mode.c
@@ -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],