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/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py83
1 files changed, 69 insertions, 14 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 39684aaf161..7e0f41f7c86 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -108,7 +108,7 @@ class VIEW3D_HT_tool_header(Header):
brush = context.tool_settings.gpencil_sculpt_paint.brush
if brush:
tool = brush.gpencil_sculpt_tool
- if tool != 'CLONE':
+ if tool in {'SMOOTH', 'RANDOMIZE'}:
layout.popover("VIEW3D_PT_tools_grease_pencil_sculpt_brush_popover")
layout.popover("VIEW3D_PT_tools_grease_pencil_sculpt_appearance")
elif tool_mode == 'WEIGHT_GPENCIL':
@@ -837,14 +837,18 @@ class VIEW3D_HT_header(Header):
panel="VIEW3D_PT_gpencil_guide",
text="Guides",
)
-
+ if object_mode == 'SCULPT_GPENCIL':
+ layout.popover(
+ panel="VIEW3D_PT_gpencil_sculpt_automasking",
+ text="",
+ icon="MOD_MASK"
+ )
elif object_mode == 'SCULPT':
layout.popover(
panel="VIEW3D_PT_sculpt_automasking",
text="",
icon="MOD_MASK"
)
-
else:
# Transform settings depending on tool header visibility
VIEW3D_HT_header.draw_xform_template(layout, context)
@@ -3121,21 +3125,33 @@ class VIEW3D_MT_paint_weight_lock(Menu):
op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock All")
op.action, op.mask = 'LOCK', 'ALL'
- op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock All")
- op.action, op.mask = 'UNLOCK', 'ALL'
- op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Selected")
+
+ op = layout.operator("object.vertex_group_lock", text="Lock Selected")
op.action, op.mask = 'LOCK', 'SELECTED'
- op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock Selected")
- op.action, op.mask = 'UNLOCK', 'SELECTED'
- op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Unselected")
+
+ op = layout.operator("object.vertex_group_lock", text="Lock Unselected")
op.action, op.mask = 'LOCK', 'UNSELECTED'
- op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock Unselected")
- op.action, op.mask = 'UNLOCK', 'UNSELECTED'
+
op = layout.operator("object.vertex_group_lock", text="Lock Only Selected")
op.action, op.mask = 'LOCK', 'INVERT_UNSELECTED'
+
op = layout.operator("object.vertex_group_lock", text="Lock Only Unselected")
op.action, op.mask = 'UNLOCK', 'INVERT_UNSELECTED'
- op = layout.operator("object.vertex_group_lock", text="Invert Locks")
+
+ layout.separator()
+
+ op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock All")
+ op.action, op.mask = 'UNLOCK', 'ALL'
+
+ op = layout.operator("object.vertex_group_lock", text="Unlock Selected")
+ op.action, op.mask = 'UNLOCK', 'SELECTED'
+
+ op = layout.operator("object.vertex_group_lock", text="Unlock Unselected")
+ op.action, op.mask = 'UNLOCK', 'UNSELECTED'
+
+ layout.separator()
+
+ op = layout.operator("object.vertex_group_lock", icon='ARROW_LEFTRIGHT', text="Invert Locks")
op.action, op.mask = 'INVERT', 'ALL'
@@ -3196,11 +3212,11 @@ class VIEW3D_MT_sculpt(Menu):
props.action = 'SHOW'
props.area = 'ALL'
- props = layout.operator("paint.hide_show", text="Show Bounding Box")
+ props = layout.operator("paint.hide_show", text="Box Show")
props.action = 'SHOW'
props.area = 'INSIDE'
- props = layout.operator("paint.hide_show", text="Hide Bounding Box")
+ props = layout.operator("paint.hide_show", text="Box Hide")
props.action = 'HIDE'
props.area = 'INSIDE'
@@ -5507,6 +5523,22 @@ class VIEW3D_MT_sculpt_automasking_pie(Menu):
pie.prop(sculpt, "use_automasking_view_normal", text="View Normal")
+class VIEW3D_MT_sculpt_gpencil_automasking_pie(Menu):
+ bl_label = "Automasking"
+
+ def draw(self, context):
+ layout = self.layout
+ pie = layout.menu_pie()
+
+ tool_settings = context.tool_settings
+
+ pie.prop(tool_settings.gpencil_sculpt, "use_automasking_stroke", text="Stroke")
+ pie.prop(tool_settings.gpencil_sculpt, "use_automasking_layer_stroke", text="Layer")
+ pie.prop(tool_settings.gpencil_sculpt, "use_automasking_material_stroke", text="Material")
+ pie.prop(tool_settings.gpencil_sculpt, "use_automasking_layer_active", text="Active Layer")
+ pie.prop(tool_settings.gpencil_sculpt, "use_automasking_material_active", text="Active Material")
+
+
class VIEW3D_MT_sculpt_face_sets_edit_pie(Menu):
bl_label = "Face Sets Edit"
@@ -7455,6 +7487,27 @@ def draw_gpencil_material_active(context, layout):
row.prop(ma, "name", text="")
+class VIEW3D_PT_gpencil_sculpt_automasking(Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'HEADER'
+ bl_label = "Auto-masking"
+ bl_ui_units_x = 10
+
+ def draw(self, context):
+ layout = self.layout
+
+ tool_settings = context.scene.tool_settings
+ layout.label(text="Auto-masking")
+
+ col = layout.column(align=True)
+ col.prop(tool_settings.gpencil_sculpt, "use_automasking_stroke", text="Stroke")
+ col.prop(tool_settings.gpencil_sculpt, "use_automasking_layer_stroke", text="Layer")
+ col.prop(tool_settings.gpencil_sculpt, "use_automasking_material_stroke", text="Material")
+ col.separator()
+ col.prop(tool_settings.gpencil_sculpt, "use_automasking_layer_active", text="Active Layer")
+ col.prop(tool_settings.gpencil_sculpt, "use_automasking_material_active", text="Active Material")
+
+
class VIEW3D_PT_gpencil_sculpt_context_menu(Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'WINDOW'
@@ -8091,6 +8144,7 @@ classes = (
VIEW3D_MT_proportional_editing_falloff_pie,
VIEW3D_MT_sculpt_mask_edit_pie,
VIEW3D_MT_sculpt_automasking_pie,
+ VIEW3D_MT_sculpt_gpencil_automasking_pie,
VIEW3D_MT_wpaint_vgroup_lock_pie,
VIEW3D_MT_sculpt_face_sets_edit_pie,
VIEW3D_MT_sculpt_curves,
@@ -8105,6 +8159,7 @@ classes = (
VIEW3D_PT_annotation_onion,
VIEW3D_PT_gpencil_multi_frame,
VIEW3D_PT_gpencil_curve_edit,
+ VIEW3D_PT_gpencil_sculpt_automasking,
VIEW3D_PT_quad_view,
VIEW3D_PT_view3d_stereo,
VIEW3D_PT_shading,