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/presets
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/presets')
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py37
1 files changed, 36 insertions, 1 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 3a7c0620b68..21c31e3a6f3 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -2983,6 +2983,8 @@ def km_grease_pencil_stroke_edit_mode(params):
{"properties": [("mode", 0)]}),
("gpencil.selectmode_toggle", {"type": 'TWO', "value": 'PRESS'},
{"properties": [("mode", 1)]}),
+ ("gpencil.selectmode_toggle", {"type": 'THREE', "value": 'PRESS'},
+ {"properties": [("mode", 2)]}),
])
if params.apple:
@@ -3045,7 +3047,25 @@ def km_grease_pencil_stroke_paint_draw_brush(params):
# Erase
("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
{"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}),
-
+ # Constrain Guides Speedlines
+ # Freehand
+ ("gpencil.draw", {"type": 'O', "value": 'PRESS'}, None),
+ ("gpencil.draw", {"type": 'J', "value": 'PRESS'}, None),
+ ("gpencil.draw", {"type": 'J', "value": 'PRESS', "alt": True}, None),
+ ("gpencil.draw", {"type": 'J', "value": 'PRESS', "shift": True}, None),
+ ("gpencil.draw", {"type": 'K', "value": 'PRESS'}, None),
+ ("gpencil.draw", {"type": 'K', "value": 'PRESS', "alt": True}, None),
+ ("gpencil.draw", {"type": 'K', "value": 'PRESS', "shift": True}, None),
+ ("gpencil.draw", {"type": 'L', "value": 'PRESS'}, None),
+ ("gpencil.draw", {"type": 'L', "value": 'PRESS', "alt": True}, None),
+ ("gpencil.draw", {"type": 'L', "value": 'PRESS', "ctrl": True}, None),
+ ("gpencil.draw", {"type": 'V', "value": 'PRESS'}, None),
+ # Mirror or flip
+ ("gpencil.draw", {"type": 'M', "value": 'PRESS'}, None),
+ # Mode
+ ("gpencil.draw", {"type": 'C', "value": 'PRESS'}, None),
+ # Set reference point
+ ("gpencil.draw", {"type": 'C', "value": 'PRESS', "alt": True}, None),
# Tablet Mappings for Drawing ------------------ */
# For now, only support direct drawing using the eraser, as most users using a tablet
# may still want to use that as their primary pointing device!
@@ -5718,6 +5738,7 @@ def km_3d_view_tool_paint_gpencil_arc(params):
]},
)
+
def km_3d_view_tool_paint_gpencil_curve(params):
return (
"3D View Tool: Paint Gpencil, Curve",
@@ -5730,6 +5751,19 @@ def km_3d_view_tool_paint_gpencil_curve(params):
]},
)
+
+def km_3d_view_tool_paint_gpencil_cutter(params):
+ return (
+ "3D View Tool: Paint Gpencil, Cutter",
+ {"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
+ {"items": [
+ ("gpencil.stroke_cutter", {"type": params.tool_mouse, "value": 'PRESS'}, None),
+ # Lasso select
+ ("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None),
+ ]},
+ )
+
+
def km_3d_view_tool_edit_gpencil_select(params):
return (
"3D View Tool: Edit Gpencil, Select",
@@ -6040,6 +6074,7 @@ def generate_keymaps(params=None):
km_3d_view_tool_paint_gpencil_circle(params),
km_3d_view_tool_paint_gpencil_arc(params),
km_3d_view_tool_paint_gpencil_curve(params),
+ km_3d_view_tool_paint_gpencil_cutter(params),
km_3d_view_tool_edit_gpencil_select(params),
km_3d_view_tool_edit_gpencil_select_box(params),
km_3d_view_tool_edit_gpencil_select_circle(params),