[Bf-blender-cvs] [0a7736a2e9d] blender2.8: Tool System: curve draw options
Campbell Barton
noreply at git.blender.org
Fri May 11 20:25:35 CEST 2018
Commit: 0a7736a2e9d493df37f87a9e4878be36711dc277
Author: Campbell Barton
Date: Fri May 11 20:25:01 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB0a7736a2e9d493df37f87a9e4878be36711dc277
Tool System: curve draw options
===================================================================
M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 36abc80716c..6250feb77eb 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -551,6 +551,24 @@ class _defs_edit_curve:
@ToolDef.from_fn
def draw():
+ def draw_settings(context, layout):
+ # Tool settings initialize operator options.
+ tool_settings = context.tool_settings
+ cps = tool_settings.curve_paint_settings
+
+ col = layout.row()
+
+ col.prop(cps, "curve_type")
+
+ if cps.curve_type == 'BEZIER':
+ col.prop(cps, "error_threshold")
+ col.prop(cps, "fit_method")
+ col.prop(cps, "use_corners_detect")
+
+ col = layout.row()
+ col.active = cps.use_corners_detect
+ col.prop(cps, "corner_angle")
+
return dict(
text="Draw",
icon=None,
@@ -558,6 +576,7 @@ class _defs_edit_curve:
keymap=(
("curve.draw", dict(wait_for_input=False), dict(type='ACTIONMOUSE', value='PRESS')),
),
+ draw_settings=draw_settings,
)
@ToolDef.from_fn
More information about the Bf-blender-cvs
mailing list