UI: Move Bone Wireframe Opacity to general overlays

The poll made it so the Armature Overlays popover would
appear even in object mode only for this setting. Move
it to the general overlays next to other general/object
mode settings.

Closes #112765

Pull Request: https://projects.blender.org/blender/blender/pulls/112862
This commit is contained in:
Pablo Vazquez
2023-09-26 23:33:15 +02:00
committed by Pablo Vazquez
parent b2b467cc8c
commit cdccb71bf7

View File

@@ -6783,6 +6783,8 @@ class VIEW3D_PT_overlay_object(Panel):
bl_label = "Objects"
def draw(self, context):
shading = VIEW3D_PT_shading.get_shading(context)
layout = self.layout
view = context.space_data
overlay = view.overlay
@@ -6809,6 +6811,10 @@ class VIEW3D_PT_overlay_object(Panel):
subsub.active = overlay.show_object_origins
subsub.prop(overlay, "show_object_origins_all", text="Origins (All)")
if shading.type == 'WIREFRAME' or shading.show_xray:
layout.separator()
layout.prop(overlay, "bone_wire_alpha")
class VIEW3D_PT_overlay_geometry(Panel):
bl_space_type = 'VIEW_3D'
@@ -7215,11 +7221,6 @@ class VIEW3D_PT_overlay_bones(Panel):
@staticmethod
def is_using_wireframe(context):
shading = VIEW3D_PT_shading.get_shading(context)
if shading.type == 'WIREFRAME' or shading.show_xray:
return True
mode = context.mode
if mode in {'POSE', 'PAINT_WEIGHT'}:
@@ -7237,7 +7238,7 @@ class VIEW3D_PT_overlay_bones(Panel):
return (
(mode == 'POSE') or
(mode == 'PAINT_WEIGHT' and context.pose_object) or
(mode in {'EDIT_ARMATURE', 'OBJECT'} and
(mode == 'EDIT_ARMATURE' and
VIEW3D_PT_overlay_bones.is_using_wireframe(context))
)
@@ -7263,9 +7264,6 @@ class VIEW3D_PT_overlay_bones(Panel):
row = col.row()
row.prop(overlay, "show_xray_bone")
if VIEW3D_PT_overlay_bones.is_using_wireframe(context):
col.prop(overlay, "bone_wire_alpha")
class VIEW3D_PT_overlay_texture_paint(Panel):
bl_space_type = 'VIEW_3D'