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:
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py56
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py57
2 files changed, 47 insertions, 66 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index baff94b067f..e64a7c9731b 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -891,23 +891,61 @@ class _defs_edit_curve:
@ToolDef.from_fn
def draw():
- def draw_settings(context, layout, _tool):
+ def draw_settings(context, layout, tool, *, extra=False):
# Tool settings initialize operator options.
tool_settings = context.tool_settings
cps = tool_settings.curve_paint_settings
+ region_type = context.region.type
- col = layout.column()
+ if region_type == 'TOOL_HEADER':
+ if not extra:
+ layout.prop(cps, "curve_type", text="")
+ layout.prop(cps, "depth_mode", expand=True)
+ layout.popover("TOPBAR_PT_tool_settings_extra", text="...")
+ return
- col.prop(cps, "curve_type")
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+ if region_type != 'TOOL_HEADER':
+ layout.prop(cps, "curve_type")
+ layout.separator()
if cps.curve_type == 'BEZIER':
- col.prop(cps, "error_threshold")
- col.prop(cps, "fit_method")
- col.prop(cps, "use_corners_detect")
+ layout.prop(cps, "fit_method")
+ layout.prop(cps, "error_threshold")
+ if region_type != 'TOOL_HEADER':
+ row = layout.row(heading="Detect Corners", align=True)
+ else:
+ row = layout.row(heading="Corners", align=True)
+ row.prop(cps, "use_corners_detect", text="")
+ sub = row.row(align=True)
+ sub.active = cps.use_corners_detect
+ sub.prop(cps, "corner_angle", text="")
+ layout.separator()
+
+
+ col = layout.column(align=True)
+ col.prop(cps, "radius_taper_start", text="Taper Start", slider=True)
+ col.prop(cps, "radius_taper_end", text="End", slider=True)
+ col = layout.column(align=True)
+ col.prop(cps, "radius_min", text="Radius Min")
+ col.prop(cps, "radius_max", text="Max")
+ col.prop(cps, "use_pressure_radius")
+
+ layout.separator()
+
+ if region_type != 'TOOL_HEADER':
+ row = layout.row()
+ row.prop(cps, "depth_mode", expand=True)
+ if cps.depth_mode == 'SURFACE':
+ col = layout.column()
+ col.prop(cps, "surface_offset")
+ col.prop(cps, "use_offset_absolute")
+ col.prop(cps, "use_stroke_endpoints")
+ if cps.use_stroke_endpoints:
+ colsub = layout.column(align=True)
+ colsub.prop(cps, "surface_plane")
- col = layout.row()
- col.active = cps.use_corners_detect
- col.prop(cps, "corner_angle")
return dict(
idname="builtin.draw",
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index fa49aa7e6a5..b81f48bec5e 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -243,62 +243,6 @@ class VIEW3D_PT_tools_meshedit_options_automerge(View3DPanel, Panel):
col.prop(tool_settings, "use_mesh_automerge_and_split", toggle=False)
col.prop(tool_settings, "double_threshold", text="Threshold")
-# ********** default tools for editmode_curve ****************
-
-
-class VIEW3D_PT_tools_curveedit_options_stroke(View3DPanel, Panel):
- bl_category = "Tool"
- bl_context = ".curve_edit" # dot on purpose (access from topbar)
- bl_label = "Curve Stroke"
-
- def draw(self, context):
- layout = self.layout
-
- tool_settings = context.tool_settings
- cps = tool_settings.curve_paint_settings
-
- col = layout.column()
-
- col.prop(cps, "curve_type")
-
- if cps.curve_type == 'BEZIER':
- col.label(text="Bezier Options:")
- col.prop(cps, "error_threshold")
- col.prop(cps, "fit_method")
- col.prop(cps, "use_corners_detect")
-
- col = layout.column()
- col.active = cps.use_corners_detect
- col.prop(cps, "corner_angle")
-
- col.label(text="Pressure Radius:")
- row = layout.row(align=True)
- rowsub = row.row(align=True)
- rowsub.prop(cps, "radius_min", text="Min")
- rowsub.prop(cps, "radius_max", text="Max")
-
- row.prop(cps, "use_pressure_radius", text="", icon_only=True)
-
- col = layout.column()
- col.label(text="Taper Radius:")
- row = layout.row(align=True)
- row.prop(cps, "radius_taper_start", text="Start")
- row.prop(cps, "radius_taper_end", text="End")
-
- col = layout.column()
- col.label(text="Projection Depth:")
- row = layout.row(align=True)
- row.prop(cps, "depth_mode", expand=True)
-
- col = layout.column()
- if cps.depth_mode == 'SURFACE':
- col.prop(cps, "surface_offset")
- col.prop(cps, "use_offset_absolute")
- col.prop(cps, "use_stroke_endpoints")
- if cps.use_stroke_endpoints:
- colsub = layout.column(align=True)
- colsub.prop(cps, "surface_plane", expand=True)
-
# ********** default tools for editmode_armature ****************
@@ -2198,7 +2142,6 @@ classes = (
VIEW3D_PT_tools_object_options_transform,
VIEW3D_PT_tools_meshedit_options,
VIEW3D_PT_tools_meshedit_options_automerge,
- VIEW3D_PT_tools_curveedit_options_stroke,
VIEW3D_PT_tools_armatureedit_options,
VIEW3D_PT_tools_posemode_options,