diff options
author | Matias Mendiola <mendio> | 2021-03-16 19:26:20 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-03-16 19:26:44 +0300 |
commit | 15a4ed3aff400a289fafff68019820e89779234c (patch) | |
tree | 62536390b9c4e2cd27f5e3beb3e2fe137967a66b /release | |
parent | 21236af80c8e42d552dc498df4060b9de921cd17 (diff) |
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
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_dopesheet.py | 17 |
1 files changed, 14 insertions, 3 deletions
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") |