UI: Show ANIM_OT_change_frame as "Set Frame (Solo Preview)" in VSE

Operator ANIM_OT_change_frame currently has a hidden feature when used
within the Sequencer, called "Solo Preview". But this feature is not
advertised anywhere in the interface. This PR adds a new property to
the operator called "seq_preview" that enables this feature and then
shows the name as "Set Frame (Solo Preview)".
This commit is contained in:
Harley Acheson
2025-02-26 01:54:26 +01:00
committed by Harley Acheson
parent 956a0fad80
commit ac549dcfde
2 changed files with 46 additions and 13 deletions

View File

@@ -2759,9 +2759,19 @@ def km_nla_editor(params):
{"properties": [("mode", 'TIME_SCALE')]}),
("marker.add", {"type": 'M', "value": 'PRESS'}, None),
*_template_items_context_menu("NLA_MT_context_menu", params.context_menu_event),
*_template_items_change_frame(params),
])
if params.select_mouse == 'LEFTMOUSE' and not params.legacy:
items.extend([
("anim.change_frame", {"type": 'RIGHTMOUSE', "value": 'PRESS', "shift": True},
{"properties": [("seq_solo_preview", True)]}),
])
else:
items.extend([
("anim.change_frame", {"type": params.action_mouse, "value": 'PRESS'},
{"properties": [("seq_solo_preview", True)]}),
])
return keymap
@@ -8114,7 +8124,8 @@ def km_sequencer_editor_tool_generic_select_timeline_rcs(params):
("sequencer.select_handle", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
("sequencer.select_handle", {"type": 'LEFTMOUSE', "value": 'PRESS',
"alt": True}, {"properties": [("ignore_connections", True)]}),
*_template_items_change_frame(params),
("anim.change_frame", {"type": params.action_mouse, "value": 'PRESS'},
{"properties": [("seq_solo_preview", True)]}),
# Change frame takes precedence over the sequence slide operator. If a
# mouse press happens on a strip handle, it is canceled, and the sequence
# slide below activates instead.
@@ -8128,7 +8139,8 @@ def km_sequencer_editor_tool_generic_select_timeline_lcs(params):
("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS',
"shift": True}, {"properties": [("toggle", True)]}),
*_template_items_change_frame(params),
("anim.change_frame", {"type": 'RIGHTMOUSE', "value": 'PRESS',
"shift": True}, {"properties": [("seq_solo_preview", True)]}),
]