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:
authorAntonioya <blendergit@gmail.com>2019-01-11 21:15:23 +0300
committerAntonioya <blendergit@gmail.com>2019-01-11 21:21:56 +0300
commitbb9c9d0eaaab836b8f20ab7b2228795f607b823a (patch)
tree8fd6ebad4084c66e6d1a49849ed6b9dbbc126d22 /release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
parent6dbfd7f6d6bc9bea9556861eba682a3126b5ed40 (diff)
GP: New Cutter, Constraints and Segment selection
This commit groups a set of new tools that were tested in grease pencil object branch before moving to master. We decide to do all the development in a separated branch because it could break master during days or weeks before the new tools were ready to deploy. The commit includes: - New Cutter tool to trim strokes and help cleaning up drawings. - New set of constraints and guides to draw different types of shapes. All the credits for this development goes to Charlie Jolly (@charlie), thanks for your help! - Segment selection mode to select strokes between intersections. - New operator to change strokes cap mode. - New option to display only keyframed frames. This option is very important when fill strokes with color. - Multiple small fixes and tweaks. Thanks to @pepeland and @mendio for their ideas, tests, reviews and support. Note: Still pending the final icons for Cutter in Toolbar and Segment Selection in Topbar. @billreynish could help us here?
Diffstat (limited to 'release/scripts/startup/bl_ui/space_toolsystem_toolbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 18dff12185f..8f4a2ca1c84 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1078,6 +1078,16 @@ class _defs_gpencil_paint:
)
@ToolDef.from_fn
+ def cutter():
+ return dict(
+ text="Cutter",
+ icon="ops.gpencil.stroke_cutter",
+ cursor='KNIFE',
+ widget=None,
+ keymap=(),
+ )
+
+ @ToolDef.from_fn
def line():
return dict(
text="Line",
@@ -1141,7 +1151,7 @@ class _defs_gpencil_edit:
@ToolDef.from_fn
def select():
def draw_settings(context, layout, tool):
- pass
+ layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold")
return dict(
text="Select",
icon="ops.generic.select",
@@ -1155,6 +1165,7 @@ class _defs_gpencil_edit:
def draw_settings(context, layout, tool):
props = tool.operator_properties("gpencil.select_box")
layout.prop(props, "mode", expand=True)
+ layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold")
return dict(
text="Select Box",
icon="ops.generic.select_box",
@@ -1168,6 +1179,7 @@ class _defs_gpencil_edit:
def draw_settings(context, layout, tool):
props = tool.operator_properties("gpencil.select_lasso")
layout.prop(props, "mode", expand=True)
+ layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold")
return dict(
text="Select Lasso",
icon="ops.generic.select_lasso",
@@ -1178,11 +1190,14 @@ class _defs_gpencil_edit:
@ToolDef.from_fn
def circle_select():
+ def draw_settings(context, layout, tool):
+ layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold")
return dict(
text="Select Circle",
icon="ops.generic.select_circle",
widget=None,
keymap=(),
+ draw_settings=draw_settings,
)
@ToolDef.from_fn
@@ -1629,6 +1644,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
_defs_view3d_generic.cursor,
None,
_defs_gpencil_paint.generate_from_brushes,
+ _defs_gpencil_paint.cutter,
None,
_defs_gpencil_paint.line,
_defs_gpencil_paint.arc,