diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-03-10 16:18:19 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-03-10 16:18:19 +0300 |
commit | a52f6d7a31e9ef52ba5f8f8c4e83a59fc2c8b667 (patch) | |
tree | 68b23838f4ba9fb4d87aca0eb344fd0fe25d1c1a /release/scripts/startup/bl_ui/space_dopesheet.py | |
parent | a801487ef5049d9f4ecf947942761566bc64a176 (diff) |
Fix T66269: Menu for Extrapolation Mode is disabled in Graph Editor
The Extrapolation Mode menu in the graph editor channel list was
incorrectly using the operator for the Action/Dopesheet editor. The
operator was even missing in the generic dopesheet hotkeys, so
{key Shift E} was listed as hotkey but didn't work. This is now all
fixed.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_dopesheet.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_dopesheet.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index f12d8597d37..8117445e4af 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -619,7 +619,7 @@ class DOPESHEET_MT_context_menu(Menu): class DOPESHEET_MT_channel_context_menu(Menu): bl_label = "Dope Sheet Channel Context Menu" - def draw(self, _context): + def draw(self, context): layout = self.layout layout.operator("anim.channels_setting_enable", text="Mute Channels").type = 'MUTE' @@ -634,7 +634,12 @@ class DOPESHEET_MT_channel_context_menu(Menu): layout.separator() layout.operator("anim.channels_editable_toggle") - layout.operator_menu_enum("action.extrapolation_type", "type", text="Extrapolation Mode") + + if bpy.ops.graph.extrapolation_type.poll(context.copy()): + operator = "graph.extrapolation_type" + else: + operator = "action.extrapolation_type" + layout.operator_menu_enum(operator, "type", text="Extrapolation Mode") layout.separator() layout.operator("anim.channels_expand") |