Fix T72155 Overlay: Bone X-ray no longer works in pose or weight paint mode
This commit is contained in:
parent
8efd804685
commit
86fb8062d7
Notes:
blender-bot
2023-02-14 08:58:01 +01:00
Referenced by issue #73584, Toggle X-ray has no warning and isn't connected to the (Armature Pose Mode) Referenced by issue #72155, Bone X-ray no longer works in pose mode or weight paint mode.
|
@ -152,7 +152,8 @@ void OVERLAY_armature_cache_init(OVERLAY_Data *vedata)
|
|||
XRAY_FLAG_ENABLED(draw_ctx->v3d);
|
||||
pd->armature.show_relations = ((draw_ctx->v3d->flag & V3D_HIDE_HELPLINES) == 0) &&
|
||||
!is_select_mode;
|
||||
pd->armature.do_pose_fade_geom = (pd->overlay.flag & V3D_OVERLAY_BONE_SELECT) &&
|
||||
pd->armature.do_pose_xray = (pd->overlay.flag & V3D_OVERLAY_BONE_SELECT) != 0;
|
||||
pd->armature.do_pose_fade_geom = pd->armature.do_pose_xray &&
|
||||
((draw_ctx->object_mode & OB_MODE_WEIGHT_PAINT) == 0) &&
|
||||
draw_ctx->object_pose != NULL;
|
||||
|
||||
|
@ -2190,8 +2191,7 @@ static void armature_context_setup(ArmatureDrawContext *ctx,
|
|||
float *const_color)
|
||||
{
|
||||
const bool is_object_mode = !do_envelope_dist;
|
||||
const bool is_xray = (ob->dtx & OB_DRAWXRAY) != 0 ||
|
||||
(pd->armature.do_pose_fade_geom && is_pose_mode);
|
||||
const bool is_xray = (ob->dtx & OB_DRAWXRAY) != 0 || (pd->armature.do_pose_xray && is_pose_mode);
|
||||
const bool draw_as_wire = (ob->dt < OB_SOLID);
|
||||
const bool is_filled = (!pd->armature.transparent && !draw_as_wire) || !is_object_mode;
|
||||
const bool is_transparent = pd->armature.transparent || (draw_as_wire && !is_object_mode);
|
||||
|
@ -2376,7 +2376,8 @@ void OVERLAY_pose_draw(OVERLAY_Data *vedata)
|
|||
DRW_draw_pass(psl->armature_bone_select_ps);
|
||||
|
||||
if (DRW_state_is_fbo()) {
|
||||
GPU_framebuffer_bind(fbl->overlay_line_fb);
|
||||
GPU_framebuffer_bind(fbl->overlay_line_in_front_fb);
|
||||
GPU_framebuffer_clear_depth(fbl->overlay_line_in_front_fb, 1.0f);
|
||||
}
|
||||
|
||||
DRW_draw_pass(psl->armature_ps[1]);
|
||||
|
|
|
@ -300,6 +300,7 @@ typedef struct OVERLAY_PrivateData {
|
|||
struct {
|
||||
bool transparent;
|
||||
bool show_relations;
|
||||
bool do_pose_xray;
|
||||
bool do_pose_fade_geom;
|
||||
} armature;
|
||||
struct {
|
||||
|
|
Loading…
Reference in New Issue