Pose: make pose-bone xray usable in wpaint mode
Update UI, draw-manager and operator to support with pose-bone-xray when in weight paint mode.
This commit is contained in:
@@ -4812,11 +4812,16 @@ class VIEW3D_PT_overlay_pose(Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.mode == 'POSE'
|
||||
mode = context.mode
|
||||
return (
|
||||
(mode == 'POSE') or
|
||||
(mode == 'PAINT_WEIGHT' and context.active_object.find_armature())
|
||||
)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
view = context.space_data
|
||||
mode = context.mode
|
||||
overlay = view.overlay
|
||||
display_all = overlay.show_overlays
|
||||
|
||||
@@ -4824,11 +4829,15 @@ class VIEW3D_PT_overlay_pose(Panel):
|
||||
col.active = display_all
|
||||
col.prop(overlay, "show_transparent_bones")
|
||||
|
||||
row = col.row()
|
||||
row.prop(overlay, "show_bone_select", text="")
|
||||
sub = row.row()
|
||||
sub.active = display_all and overlay.show_bone_select
|
||||
sub.prop(overlay, "bone_select_alpha", text="Fade Geometry")
|
||||
if mode == 'POSE':
|
||||
row = col.row()
|
||||
row.prop(overlay, "show_bone_select", text="")
|
||||
sub = row.row()
|
||||
sub.active = display_all and overlay.show_bone_select
|
||||
sub.prop(overlay, "bone_select_alpha", text="Fade Geometry")
|
||||
else:
|
||||
row = col.row()
|
||||
row.prop(overlay, "show_bone_select")
|
||||
|
||||
|
||||
class VIEW3D_PT_overlay_edit_armature(Panel):
|
||||
@@ -5461,8 +5470,8 @@ classes = (
|
||||
VIEW3D_PT_overlay_edit_mesh_developer,
|
||||
VIEW3D_PT_overlay_edit_curve,
|
||||
VIEW3D_PT_overlay_edit_armature,
|
||||
VIEW3D_PT_overlay_pose,
|
||||
VIEW3D_PT_overlay_paint,
|
||||
VIEW3D_PT_overlay_pose,
|
||||
VIEW3D_PT_overlay_sculpt,
|
||||
VIEW3D_PT_pivot_point,
|
||||
VIEW3D_PT_snapping,
|
||||
|
||||
Reference in New Issue
Block a user