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:
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py33
1 files changed, 28 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 3fd19dd70cf..7d8e74ed7ce 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -6504,18 +6504,38 @@ class VIEW3D_PT_overlay_sculpt(Panel):
row.prop(overlay, "sculpt_mode_face_sets_opacity", text="Face Sets")
-class VIEW3D_PT_overlay_pose(Panel):
+class VIEW3D_PT_overlay_bones(Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'HEADER'
bl_parent_id = 'VIEW3D_PT_overlay'
- bl_label = "Pose Mode"
+ bl_label = "Bones"
+
+ @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'):
+ armature = context.pose_object
+ elif mode == 'EDIT_ARMATURE':
+ armature = context.edit_object
+ else:
+ return False
+
+ return armature and armature.display_type == 'WIRE'
@classmethod
def poll(cls, context):
mode = context.mode
return (
(mode == 'POSE') or
- (mode == 'PAINT_WEIGHT' and context.pose_object)
+ (mode == 'PAINT_WEIGHT' and context.pose_object) or
+ (mode in ('EDIT_ARMATURE', 'OBJECT') and
+ VIEW3D_PT_overlay_bones.is_using_wireframe(context))
)
def draw(self, context):
@@ -6534,10 +6554,13 @@ class VIEW3D_PT_overlay_pose(Panel):
sub = row.row()
sub.active = display_all and overlay.show_xray_bone
sub.prop(overlay, "xray_alpha_bone", text="Fade Geometry")
- else:
+ elif mode == 'PAINT_WEIGHT':
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'
@@ -7705,7 +7728,7 @@ classes = (
VIEW3D_PT_overlay_texture_paint,
VIEW3D_PT_overlay_vertex_paint,
VIEW3D_PT_overlay_weight_paint,
- VIEW3D_PT_overlay_pose,
+ VIEW3D_PT_overlay_bones,
VIEW3D_PT_overlay_sculpt,
VIEW3D_PT_snapping,
VIEW3D_PT_proportional_edit,