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_toolsystem_toolbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py97
1 files changed, 90 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index e4cecf3378f..666a0d70970 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1226,22 +1226,32 @@ class _defs_sculpt:
@ToolDef.from_fn
def mask_border():
+ def draw_settings(_context, layout, tool):
+ props = tool.operator_properties("paint.mask_box_gesture")
+ layout.prop(props, "use_front_faces_only", expand=False)
+
return dict(
idname="builtin.box_mask",
label="Box Mask",
icon="ops.sculpt.border_mask",
widget=None,
keymap=(),
+ draw_settings=draw_settings,
)
@ToolDef.from_fn
def mask_lasso():
+ def draw_settings(_context, layout, tool):
+ props = tool.operator_properties("paint.mask_lasso_gesture")
+ layout.prop(props, "use_front_faces_only", expand=False)
+
return dict(
idname="builtin.lasso_mask",
label="Lasso Mask",
icon="ops.sculpt.lasso_mask",
widget=None,
keymap=(),
+ draw_settings=draw_settings,
)
@ToolDef.from_fn
@@ -1250,13 +1260,16 @@ class _defs_sculpt:
props = tool.operator_properties("sculpt.mesh_filter")
layout.prop(props, "type", expand=False)
layout.prop(props, "strength")
- layout.prop(props, "deform_axis")
+ row = layout.row(align=True)
+ row.prop(props, "deform_axis")
layout.prop(props, "use_face_sets")
if props.type == 'SURFACE_SMOOTH':
layout.prop(props, "surface_smooth_shape_preservation", expand=False)
layout.prop(props, "surface_smooth_current_vertex", expand=False)
elif props.type == 'SHARPEN':
layout.prop(props, "sharpen_smooth_ratio", expand=False)
+ layout.prop(props, "sharpen_intensify_detail_strength", expand=False)
+ layout.prop(props, "sharpen_curvature_smooth_iterations", expand=False)
return dict(
idname="builtin.mesh_filter",
@@ -1276,6 +1289,7 @@ class _defs_sculpt:
layout.prop(props, "cloth_mass")
layout.prop(props, "cloth_damping")
layout.prop(props, "use_face_sets")
+ layout.prop(props, "use_collisions")
return dict(
idname="builtin.cloth_filter",
@@ -1322,6 +1336,22 @@ class _defs_sculpt:
draw_settings=draw_settings,
)
+ @ToolDef.from_fn
+ def face_set_edit():
+ def draw_settings(_context, layout, tool):
+ props = tool.operator_properties("sculpt.face_set_edit")
+ layout.prop(props, "mode", expand=False)
+ layout.prop(props, "modify_hidden")
+
+ return dict(
+ idname="builtin.face_set_edit",
+ label="Edit Face Set",
+ icon="ops.sculpt.face_set_edit",
+ widget=None,
+ keymap="3D View Tool: Sculpt, Face Set Edit",
+ draw_settings=draw_settings,
+ )
+
class _defs_vertex_paint:
@@ -1658,6 +1688,29 @@ class _defs_image_uv_sculpt:
class _defs_gpencil_paint:
@staticmethod
+ def gpencil_primitive_toolbar(context, layout, tool, props):
+ paint = context.tool_settings.gpencil_paint
+ brush = paint.brush
+
+ if brush is None:
+ return False
+
+ gp_settings = brush.gpencil_settings
+
+ row = layout.row(align=True)
+ tool_settings = context.scene.tool_settings
+ settings = tool_settings.gpencil_paint
+ row.template_ID_preview(settings, "brush", rows=3, cols=8, hide_buttons=True)
+
+ from bl_ui.properties_paint_common import (
+ brush_basic_gpencil_paint_settings,
+ brush_basic__draw_color_selector,
+ )
+
+ brush_basic__draw_color_selector(context, layout, brush, gp_settings, props)
+ brush_basic_gpencil_paint_settings(layout, context, brush, compact=True)
+
+ @staticmethod
def generate_from_brushes(context):
return generate_from_enum_ex(
context,
@@ -1684,6 +1737,10 @@ class _defs_gpencil_paint:
@ToolDef.from_fn
def line():
+ def draw_settings(context, layout, tool):
+ props = tool.operator_properties("gpencil.primitive_line")
+ _defs_gpencil_paint.gpencil_primitive_toolbar(context, layout, tool, props)
+
return dict(
idname="builtin.line",
label="Line",
@@ -1691,10 +1748,15 @@ class _defs_gpencil_paint:
cursor='CROSSHAIR',
widget=None,
keymap=(),
+ draw_settings=draw_settings,
)
@ToolDef.from_fn
def polyline():
+ def draw_settings(context, layout, tool):
+ props = tool.operator_properties("gpencil.primitive_polyline")
+ _defs_gpencil_paint.gpencil_primitive_toolbar(context, layout, tool, props)
+
return dict(
idname="builtin.polyline",
label="Polyline",
@@ -1702,10 +1764,15 @@ class _defs_gpencil_paint:
cursor='CROSSHAIR',
widget=None,
keymap=(),
+ draw_settings=draw_settings,
)
@ToolDef.from_fn
def box():
+ def draw_settings(context, layout, tool):
+ props = tool.operator_properties("gpencil.primitive_box")
+ _defs_gpencil_paint.gpencil_primitive_toolbar(context, layout, tool, props)
+
return dict(
idname="builtin.box",
label="Box",
@@ -1713,10 +1780,15 @@ class _defs_gpencil_paint:
cursor='CROSSHAIR',
widget=None,
keymap=(),
+ draw_settings=draw_settings,
)
@ToolDef.from_fn
def circle():
+ def draw_settings(context, layout, tool):
+ props = tool.operator_properties("gpencil.primitive_circle")
+ _defs_gpencil_paint.gpencil_primitive_toolbar(context, layout, tool, props)
+
return dict(
idname="builtin.circle",
label="Circle",
@@ -1724,10 +1796,15 @@ class _defs_gpencil_paint:
cursor='CROSSHAIR',
widget=None,
keymap=(),
+ draw_settings=draw_settings,
)
@ToolDef.from_fn
def arc():
+ def draw_settings(context, layout, tool):
+ props = tool.operator_properties("gpencil.primitive_curve")
+ _defs_gpencil_paint.gpencil_primitive_toolbar(context, layout, tool, props)
+
return dict(
idname="builtin.arc",
label="Arc",
@@ -1735,10 +1812,15 @@ class _defs_gpencil_paint:
cursor='CROSSHAIR',
widget=None,
keymap=(),
+ draw_settings=draw_settings,
)
@ToolDef.from_fn
def curve():
+ def draw_settings(context, layout, tool):
+ props = tool.operator_properties("gpencil.primitive_curve")
+ _defs_gpencil_paint.gpencil_primitive_toolbar(context, layout, tool, props)
+
return dict(
idname="builtin.curve",
label="Curve",
@@ -1746,6 +1828,7 @@ class _defs_gpencil_paint:
cursor='CROSSHAIR',
widget=None,
keymap=(),
+ draw_settings=draw_settings,
)
@ToolDef.from_fn
@@ -2385,9 +2468,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
'OBJECT': [
*_tools_default,
- # Disable for 2.90 release.
- # None,
- # _tools_view3d_add,
+ None,
+ _tools_view3d_add,
],
'POSE': [
*_tools_default,
@@ -2415,9 +2497,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
],
'EDIT_MESH': [
*_tools_default,
- # Disable for 2.90 release.
- # None,
- # _tools_view3d_add,
+ None,
+ _tools_view3d_add,
None,
(
_defs_edit_mesh.extrude,
@@ -2531,6 +2612,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
else ()
),
None,
+ _defs_sculpt.face_set_edit,
+ None,
_defs_transform.translate,
_defs_transform.rotate,
_defs_transform.scale,