[Bf-blender-cvs] [c49f407f7b4] master: UI: Add back frame operators to GPencil Draw and Sculpt mode contextual menus

William Reynish noreply at git.blender.org
Mon Mar 11 17:25:12 CET 2019


Commit: c49f407f7b4bf4c46203ce7a6724f926ca73183f
Author: William Reynish
Date:   Mon Mar 11 17:25:10 2019 +0100
Branches: master
https://developer.blender.org/rBc49f407f7b4bf4c46203ce7a6724f926ca73183f

UI: Add back frame operators to GPencil Draw and Sculpt mode contextual menus

Maniphest Task: T62130

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 4f91c1ff676..86ee1659a7b 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -5682,6 +5682,22 @@ class VIEW3D_PT_gpencil_sculpt_specials(Panel):
         layout.prop(brush, "size", slider=True)
         layout.prop(brush, "strength")
 
+        layout.separator()
+
+        # Frames 
+        layout.label(text="Frames:")
+
+        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.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')
+
 
 class VIEW3D_PT_gpencil_draw_specials(Panel):
     bl_space_type = 'VIEW_3D'
@@ -5699,6 +5715,22 @@ class VIEW3D_PT_gpencil_draw_specials(Panel):
         if brush.gpencil_tool not in {'ERASE', 'FILL', 'CUTTER'}:
             layout.prop(gp_settings, "pen_strength")
 
+        layout.separator()
+
+        # Frames 
+        layout.label(text="Frames:")
+
+        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.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')
+
 
 class VIEW3D_PT_paint_vertex_specials(Panel):
     # Only for popover, these are dummy values.



More information about the Bf-blender-cvs mailing list