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
This commit is contained in:
Matias Mendiola
2019-08-28 20:31:01 +02:00
committed by Antonio Vazquez
parent 34ed58dcaf
commit a7ac8a22f8
3 changed files with 35 additions and 26 deletions

View File

@@ -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):

View File

@@ -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):