[Bf-blender-cvs] [15a4ed3aff4] master: Dopesheet Context Menu updates

Matias Mendiola noreply at git.blender.org
Tue Mar 16 17:32:51 CET 2021


Commit: 15a4ed3aff400a289fafff68019820e89779234c
Author: Matias Mendiola
Date:   Tue Mar 16 17:26:20 2021 +0100
Branches: master
https://developer.blender.org/rB15a4ed3aff400a289fafff68019820e89779234c

Dopesheet Context Menu updates

Dopesheet context menu rearranging to include proper operators for Grease Pencil submode

Before:
{F9828095}

After:
{F9828096}

Reviewed By: antoniov, pablovazquez

Differential Revision: https://developer.blender.org/D10502

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

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

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

diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 39d232b2871..f7ba9ebcb43 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -598,6 +598,7 @@ class DOPESHEET_MT_context_menu(Menu):
 
     def draw(self, _context):
         layout = self.layout
+        st = _context.space_data
 
         layout.operator_context = 'INVOKE_DEFAULT'
 
@@ -608,17 +609,27 @@ class DOPESHEET_MT_context_menu(Menu):
         layout.separator()
 
         layout.operator_menu_enum("action.keyframe_type", "type", text="Keyframe Type")
-        layout.operator_menu_enum("action.handle_type", "type", text="Handle Type")
-        layout.operator_menu_enum("action.interpolation_type", "type", text="Interpolation Mode")
-        layout.operator_menu_enum("action.easing_type", "type", text="Easing Mode")
+        
+        if st.mode != 'GPENCIL':
+           layout.operator_menu_enum("action.handle_type", "type", text="Handle Type")
+           layout.operator_menu_enum("action.interpolation_type", "type", text="Interpolation Mode")
+           layout.operator_menu_enum("action.easing_type", "type", text="Easing Mode")
 
         layout.separator()
 
         layout.operator("action.keyframe_insert").type = 'SEL'
         layout.operator("action.duplicate_move")
+
+        if st.mode == 'GPENCIL':
+            layout.separator()
+
         layout.operator_context = 'EXEC_REGION_WIN'
         layout.operator("action.delete")
 
+        if st.mode == 'GPENCIL':
+           layout.operator("gpencil.interpolate_reverse")
+           layout.operator("gpencil.frame_clean_duplicate", text="Delete Duplicate Frames")
+
         layout.separator()
 
         layout.operator_menu_enum("action.mirror", "type", text="Mirror")



More information about the Bf-blender-cvs mailing list