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:
authorMatias Mendiola <matias.mendiola@gmail.com>2019-08-28 21:31:01 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-08-28 23:33:44 +0300
commita7ac8a22f8ebcd3bcd94cf86b098e310fafd39fc (patch)
tree85f7619f11d445a91db4cd22931457200a5cb6e0 /release
parent34ed58dcaffd957f50380f4115d2cb9c46de31ee (diff)
GPencil: Animation menu updates
Animation menu updates for Edit Mode and Draw Mode (header and context menu): - Rename menu items for a better understanding of what the operators really do. - Change shortcuts (legacy from the old Grease pencil) {F7708018} Reviewers: antoniov, pepeland, billreynish Tags: #bf_blender, #grease_pencil Differential Revision: https://developer.blender.org/D5617
Diffstat (limited to 'release')
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py22
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py5
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py34
3 files changed, 35 insertions, 26 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 7c963784ed4..65ea5e695f5 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -2948,13 +2948,6 @@ def km_grease_pencil(_params):
# Erase
("gpencil.annotate", {"type": 'RIGHTMOUSE', "value": 'PRESS', "key_modifier": 'D'},
{"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}),
-
- # Add blank frame (B because it's easy to reach from D).
- ("gpencil.blank_frame_add", {"type": 'B', "value": 'PRESS', "key_modifier": 'D'}, None),
- # Delete active frame - for easier video tutorials/review sessions.
- # This works even when not in edit mode.
- ("gpencil.active_frames_delete_all", {"type": 'X', "value": 'PRESS', "key_modifier": 'D'}, None),
- ("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "key_modifier": 'D'}, None),
])
return keymap
@@ -3037,6 +3030,8 @@ def km_grease_pencil_stroke_edit_mode(params):
op_menu("VIEW3D_MT_edit_gpencil_delete", {"type": 'DEL', "value": 'PRESS'}),
("gpencil.dissolve", {"type": 'X', "value": 'PRESS', "ctrl": True}, None),
("gpencil.dissolve", {"type": 'DEL', "value": 'PRESS', "ctrl": True}, None),
+ # Animation menu
+ ("gpencil.blank_frame_add", {"type": 'I', "value": 'PRESS', "shift": True}, None),
("gpencil.active_frames_delete_all", {"type": 'X', "value": 'PRESS', "shift": True}, None),
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
# Context menu
@@ -3125,6 +3120,19 @@ def km_grease_pencil_stroke_paint_mode(params):
op_panel("VIEW3D_PT_gpencil_draw_context_menu", params.context_menu_event),
# Draw delete menu
op_menu("GPENCIL_MT_gpencil_draw_delete", {"type": 'X', "value": 'PRESS'}),
+ # Animation menu
+ ("gpencil.blank_frame_add", {"type": 'I', "value": 'PRESS', "shift": True}, None),
+ ("gpencil.active_frames_delete_all", {"type": 'X', "value": 'PRESS', "shift": True}, None),
+ ("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
+ # Interpolation
+ ("gpencil.interpolate", {"type": 'E', "value": 'PRESS', "ctrl": True, "alt": True}, None),
+ ("gpencil.interpolate_sequence", {"type": 'E', "value": 'PRESS', "shift": True, "ctrl": True}, None),
+ # Show/hide
+ ("gpencil.reveal", {"type": 'H', "value": 'PRESS', "alt": True}, None),
+ ("gpencil.hide", {"type": 'H', "value": 'PRESS'},
+ {"properties": [("unselected", False)]}),
+ ("gpencil.hide", {"type": 'H', "value": 'PRESS', "shift": True},
+ {"properties": [("unselected", True)]}),
])
return keymap
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 60a8418fed6..b87e4e2d0b7 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -592,14 +592,15 @@ class GPENCIL_MT_snap(Menu):
class GPENCIL_MT_gpencil_draw_delete(Menu):
- bl_label = "GPencil Draw Delete"
+ bl_label = "Delete"
def draw(self, _context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("gpencil.active_frames_delete_all", text="Delete Frame")
+ layout.operator("gpencil.delete", text="Delete Active Keyframe (Active Layer)").type = 'FRAME'
+ layout.operator("gpencil.active_frames_delete_all", text="Delete Active Keyframes (All Layers)")
class GPENCIL_MT_cleanup(Menu):
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index d72b527e6cd..d42f2ae1b7b 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3933,7 +3933,9 @@ class VIEW3D_MT_edit_gpencil_delete(Menu):
layout.separator()
- layout.operator("gpencil.active_frames_delete_all")
+ layout.operator("gpencil.delete", text="Delete Active Keyframe (Active Layer)").type = 'FRAME'
+ layout.operator("gpencil.active_frames_delete_all", text="Delete Active Keyframes (All Layers)")
+
# Edit Curve
# draw_curve is used by VIEW3D_MT_edit_curve and VIEW3D_MT_edit_surface
@@ -4564,17 +4566,18 @@ class VIEW3D_MT_gpencil_animation(Menu):
def draw(self, _context):
layout = self.layout
- layout.operator("gpencil.blank_frame_add")
+ layout.operator("gpencil.blank_frame_add", text="Insert Blank Keyframe (Active Layer)")
+ layout.operator("gpencil.blank_frame_add", text="Insert Blank Keyframe (All Layers)").all_layers = True
layout.separator()
- layout.operator("gpencil.frame_duplicate", text="Duplicate Active Frame")
- layout.operator("gpencil.frame_duplicate", text="Duplicate All Layers").mode = 'ALL'
+ layout.operator("gpencil.frame_duplicate", text="Duplicate Active Keyframe (Active Layer)")
+ layout.operator("gpencil.frame_duplicate", text="Duplicate Active Keyframe (All Layers)").mode = 'ALL'
layout.separator()
- layout.operator("gpencil.delete", text="Delete Active Frame").type = 'FRAME'
- layout.operator("gpencil.active_frames_delete_all", text="Delete All Active Frames")
+ layout.operator("gpencil.delete", text="Delete Active Keyframe (Active Layer)").type = 'FRAME'
+ layout.operator("gpencil.active_frames_delete_all", text="Delete Active Keyframes (All Layers)")
class VIEW3D_MT_edit_gpencil_transform(Menu):
@@ -4595,9 +4598,6 @@ class VIEW3D_MT_edit_gpencil_transform(Menu):
layout.operator("transform.transform", text="Shrink Fatten").mode = 'GPENCIL_SHRINKFATTEN'
- layout.operator("gpencil.interpolate", text="Interpolate")
- layout.operator("gpencil.interpolate_sequence", text="Sequence")
-
class VIEW3D_MT_edit_gpencil_showhide(Menu):
bl_label = "Show/hide"
@@ -6421,13 +6421,13 @@ class VIEW3D_PT_gpencil_sculpt_context_menu(Panel):
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("gpencil.blank_frame_add", text="Insert Blank", icon='ADD')
- layout.operator("gpencil.frame_duplicate", text="Duplicate Active", icon='DUPLICATE')
- layout.operator("gpencil.frame_duplicate", text="Duplicate for All Layers", icon='DUPLICATE').mode = 'ALL'
+ layout.operator("gpencil.frame_duplicate", text="Duplicate Active Layer", icon='DUPLICATE')
+ layout.operator("gpencil.frame_duplicate", text="Duplicate All Layers", icon='DUPLICATE').mode = 'ALL'
layout.separator()
- layout.operator("gpencil.delete", text="Delete Active", icon='REMOVE').type = 'FRAME'
- layout.operator("gpencil.active_frames_delete_all", text="Delete All Active Layers", icon='REMOVE')
+ layout.operator("gpencil.delete", text="Delete Active Layer", icon='REMOVE').type = 'FRAME'
+ layout.operator("gpencil.active_frames_delete_all", text="Delete All Layers", icon='REMOVE')
class VIEW3D_PT_gpencil_draw_context_menu(Panel):
@@ -6454,13 +6454,13 @@ class VIEW3D_PT_gpencil_draw_context_menu(Panel):
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("gpencil.blank_frame_add", text="Insert Blank", icon='ADD')
- layout.operator("gpencil.frame_duplicate", text="Duplicate Active", icon='DUPLICATE')
- layout.operator("gpencil.frame_duplicate", text="Duplicate for All Layers", icon='DUPLICATE').mode = 'ALL'
+ layout.operator("gpencil.frame_duplicate", text="Duplicate Active Layer", icon='DUPLICATE')
+ layout.operator("gpencil.frame_duplicate", text="Duplicate All Layers", icon='DUPLICATE').mode = 'ALL'
layout.separator()
- layout.operator("gpencil.delete", text="Delete Active", icon='REMOVE').type = 'FRAME'
- layout.operator("gpencil.active_frames_delete_all", text="Delete All Active Layers", icon='REMOVE')
+ layout.operator("gpencil.delete", text="Delete Active Layer", icon='REMOVE').type = 'FRAME'
+ layout.operator("gpencil.active_frames_delete_all", text="Delete All Layers", icon='REMOVE')
class VIEW3D_PT_paint_vertex_context_menu(Panel):