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.
This commit is contained in:
parent
a801487ef5
commit
a52f6d7a31
@ -1963,7 +1963,8 @@ def km_dopesheet_generic(_params):
|
|||||||
sidebar_key={"type": 'N', "value": 'PRESS'},
|
sidebar_key={"type": 'N', "value": 'PRESS'},
|
||||||
),
|
),
|
||||||
("wm.context_set_enum", {"type": 'TAB', "value": 'PRESS', "ctrl": True},
|
("wm.context_set_enum", {"type": 'TAB', "value": 'PRESS', "ctrl": True},
|
||||||
{"properties": [("data_path", 'area.type'), ("value", 'GRAPH_EDITOR')]})
|
{"properties": [("data_path", 'area.type'), ("value", 'GRAPH_EDITOR')]}),
|
||||||
|
("action.extrapolation_type", {"type": 'E', "value": 'PRESS', "shift": True}, None),
|
||||||
])
|
])
|
||||||
|
|
||||||
return keymap
|
return keymap
|
||||||
|
@ -619,7 +619,7 @@ class DOPESHEET_MT_context_menu(Menu):
|
|||||||
class DOPESHEET_MT_channel_context_menu(Menu):
|
class DOPESHEET_MT_channel_context_menu(Menu):
|
||||||
bl_label = "Dope Sheet Channel Context Menu"
|
bl_label = "Dope Sheet Channel Context Menu"
|
||||||
|
|
||||||
def draw(self, _context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator("anim.channels_setting_enable", text="Mute Channels").type = 'MUTE'
|
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.separator()
|
||||||
layout.operator("anim.channels_editable_toggle")
|
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.separator()
|
||||||
layout.operator("anim.channels_expand")
|
layout.operator("anim.channels_expand")
|
||||||
|
Loading…
Reference in New Issue
Block a user