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:
authorHans Goudey <h.goudey@me.com>2020-05-11 17:16:52 +0300
committerHans Goudey <h.goudey@me.com>2020-05-11 17:16:52 +0300
commit870e081bcda7f8fd99f73366d22bdf372c09f054 (patch)
tree8edda7e252de9b4bcb6447b439b359763bf138b0 /release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
parentaf8bd43e35a81cfcd3839a1a19914edba0ff5a89 (diff)
UI: Curve Edit Stroke Panel Layout
Also removes the 'Curve Stroke' panel that showed globally for curve edit mode. This means the settings will not be available without the draw tool selected. Reviewed By: billreynish, campbellbarton Differential Revision: https://developer.blender.org/D7652
Diffstat (limited to 'release/scripts/startup/bl_ui/space_toolsystem_toolbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py56
1 files changed, 47 insertions, 9 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",