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:
authorJuanfran Matheu <jfmatheu>2020-05-08 21:18:12 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-05-11 13:39:23 +0300
commit9a7c4e2d444f2cbd48cd724a775ea057dad1a88b (patch)
tree9b9dec7cd682a7dd61ae36346348223facddc3b0 /release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
parent672a0af081cf80b5f8d4ed3c5ea79be14480f3e1 (diff)
Annotations: Add Stabilization for draw tool
This patch adds the stabilizer feature of GP to the annotations. It has a toggle to activate it "Use Stabilizer", and two properties to control the behaviour of the smooth effect (factor and radius). You can also use shift at start or in the air to temporaly use this feature. {F8518283} Differential Revision: https://developer.blender.org/D7648
Diffstat (limited to 'release/scripts/startup/bl_ui/space_toolsystem_toolbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index b10b451c7f8..baff94b067f 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -204,6 +204,14 @@ class _defs_annotate:
col = layout.row().column(align=True)
col.prop(props, "arrowstyle_start", text="Style Start")
col.prop(props, "arrowstyle_end", text="End")
+ elif tool.idname == "builtin.annotate" and region_type != 'TOOL_HEADER':
+ layout.separator()
+ props = tool.operator_properties("gpencil.annotate")
+ layout.prop(props, "use_stabilizer", text="Stabilize Stroke")
+ col = layout.column(align=False)
+ col.active = props.use_stabilizer
+ col.prop(props, "stabilizer_radius", text="Radius", slider=True)
+ col.prop(props, "stabilizer_factor", text="Factor", slider=True)
@ToolDef.from_fn.with_args(draw_settings=draw_settings_common)
def scribble(*, draw_settings):