From cdccb71bf7dabad63ecbca01cc7a2e207f76f2fc Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Tue, 26 Sep 2023 23:33:15 +0200 Subject: [PATCH] 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 --- scripts/startup/bl_ui/space_view3d.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index 3c3b3e48e13..8ffb9d49e10 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -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'