[Bf-blender-cvs] [4eb7027c642] greasepencil-object: GPencil: More changes to keymaps and tools
Antonio Vazquez
noreply at git.blender.org
Thu Nov 7 18:07:21 CET 2019
Commit: 4eb7027c6425366396cd22e99fcd843044116bb8
Author: Antonio Vazquez
Date: Thu Nov 7 11:25:43 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB4eb7027c6425366396cd22e99fcd843044116bb8
GPencil: More changes to keymaps and tools
===================================================================
M release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py
M release/scripts/presets/keyconfig/keymap_data/blender_default.py
M release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
M source/blender/blenkernel/BKE_brush.h
M source/blender/blenkernel/intern/brush.c
M source/blender/editors/gpencil/gpencil_ops.c
M source/blender/editors/gpencil/gpencil_paint.c
M source/blender/editors/screen/area.c
===================================================================
diff --git a/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py b/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py
index 88a6d48fddf..1ceb24c68db 100644
--- a/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py
+++ b/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py
@@ -199,6 +199,10 @@ _km_hierarchy = [
('Grease Pencil Stroke Sculpt Mode', 'EMPTY', 'WINDOW', []),
('Grease Pencil Stroke Weight Mode', 'EMPTY', 'WINDOW', []),
('Grease Pencil Stroke Vertex Mode', 'EMPTY', 'WINDOW', []),
+ ('Grease Pencil Stroke Vertex (Draw)', 'EMPTY', 'WINDOW', []),
+ ('Grease Pencil Stroke Vertex (Blur)', 'EMPTY', 'WINDOW', []),
+ ('Grease Pencil Stroke Vertex (Average)', 'EMPTY', 'WINDOW', []),
+ ('Grease Pencil Stroke Vertex (Smear)', 'EMPTY', 'WINDOW', []),
]),
('Mask Editing', 'EMPTY', 'WINDOW', []),
('Frames', 'EMPTY', 'WINDOW', []), # frame navigation (per region)
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 32df7c75aa0..13b1ca589f1 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -3374,6 +3374,106 @@ def km_grease_pencil_stroke_vertex_mode(_params):
return keymap
+def km_grease_pencil_stroke_vertex_draw(params):
+ items = []
+ keymap = (
+ "Grease Pencil Stroke Vertex (Draw)",
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
+ {"items": items},
+ )
+
+ items.extend([
+ # Tint
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ {"properties": [("wait_for_input", False)]}),
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
+ {"properties": [("wait_for_input", False)]}),
+ # Brush strength
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}),
+ # Brush size
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS'},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
+ ])
+
+ return keymap
+
+
+def km_grease_pencil_stroke_vertex_blur(params):
+ items = []
+ keymap = (
+ "Grease Pencil Stroke Vertex (Blur)",
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
+ {"items": items},
+ )
+
+ items.extend([
+ # Tint
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ {"properties": [("wait_for_input", False)]}),
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
+ {"properties": [("wait_for_input", False)]}),
+ # Brush strength
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}),
+ # Brush size
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS'},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
+ ])
+
+ return keymap
+
+
+def km_grease_pencil_stroke_vertex_average(params):
+ items = []
+ keymap = (
+ "Grease Pencil Stroke Vertex (Average)",
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
+ {"items": items},
+ )
+
+ items.extend([
+ # Tint
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ {"properties": [("wait_for_input", False)]}),
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
+ {"properties": [("wait_for_input", False)]}),
+ # Brush strength
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}),
+ # Brush size
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS'},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
+ ])
+
+ return keymap
+
+
+def km_grease_pencil_stroke_vertex_smear(params):
+ items = []
+ keymap = (
+ "Grease Pencil Stroke Vertex (Smear)",
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
+ {"items": items},
+ )
+
+ items.extend([
+ # Tint
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ {"properties": [("wait_for_input", False)]}),
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
+ {"properties": [("wait_for_input", False)]}),
+ # Brush strength
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}),
+ # Brush size
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS'},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
+ ])
+
+ return keymap
+
+
def km_face_mask(params):
items = []
keymap = (
diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
index 1e6a905fb05..75d60b063a7 100644
--- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
+++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
@@ -2568,6 +2568,104 @@ def km_grease_pencil_stroke_vertex_mode(_params):
return keymap
+def km_grease_pencil_stroke_vertex_draw(params):
+ items = []
+ keymap = (
+ "Grease Pencil Stroke Vertex (Draw)",
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
+ {"items": items},
+ )
+
+ items.extend([
+ # Tint
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ {"properties": [("wait_for_input", False)]}),
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
+ {"properties": [("wait_for_input", False)]}),
+ # Brush strength
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}),
+ # Brush size
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS'},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
+ ])
+
+ return keymap
+
+
+def km_grease_pencil_stroke_vertex_blur(params):
+ items = []
+ keymap = (
+ "Grease Pencil Stroke Vertex (Blur)",
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
+ {"items": items},
+ )
+
+ items.extend([
+ # Tint
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ {"properties": [("wait_for_input", False)]}),
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
+ {"properties": [("wait_for_input", False)]}),
+ # Brush strength
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}),
+ # Brush size
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS'},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
+ ])
+
+ return keymap
+
+
+def km_grease_pencil_stroke_vertex_average(params):
+ items = []
+ keymap = (
+ "Grease Pencil Stroke Vertex (Average)",
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
+ {"items": items},
+ )
+
+ items.extend([
+ # Tint
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ {"properties": [("wait_for_input", False)]}),
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
+ {"properties": [("wait_for_input", False)]}),
+ # Brush strength
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}),
+ # Brush size
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS'},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
+ ])
+
+ return keymap
+
+
+def km_grease_pencil_stroke_vertex_smear(params):
+ items = []
+ keymap = (
+ "Grease Pencil Stroke Vertex (Smear)",
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
+ {"items": items},
+ )
+
+ items.extend([
+ # Tint
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ {"properties": [("wait_for_input", False)]}),
+ ("gpencil.tint", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
+ {"properties": [("wait_for_input", False)]}),
+ # Brush strength
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.gpencil_settings.pen_strength')]}),
+ # Brush size
+ ("wm.radial_control", {"type": 'F', "value": 'PRESS'},
+ {"properties": [("data_path_primary", 'tool_settings.gpencil_vertex_paint.brush.size')]}),
+ ])
+
+ return keymap
def km_face_mask(params):
items = []
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index 70741831727..cbad6fd6122 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -43,7 +43,10 @@ void BKE_brush_system_exit(void);
/* datablock functions */
void BKE_brush_init(struct Brush *brush);
struct Brush *BKE_brush_add(struct Main *bmain, const char *name, const eObjectMode ob_mode);
-struct Brush *BKE_brush_add_gpencil(struct Main *bmain, struct T
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list