Animation: Select markers before/after current frame

Add operator to select markers left/right of the current frame
(including the current frame).

`bpy.ops.marker.select_leftright(mode='LEFT', extend=False)`

`mode` can be either 'LEFT' or 'RIGHT'.

The naming and defaults of the above variables match similar operators
(e.g., `bpy.ops.nla.select_leftright`)

This also adds a new sub-menu to the Marker menu found in animation
editors, exposing both the new `bpy.ops.marker.select_leftright`
operator as well as the `bpy.ops.marker.select_all` operator.

Despite the name "Before Current Frame" and "After Current Frame", it
also selects a marker that falls on the current from for both of the
modes. This is to match the behavior found in the `nla.select_leftright`
operator.

RCS: https://blender.community/c/rightclickselect/OgmG/

Reviewed by: sybren, looch

Differential Revision: https://developer.blender.org/D14176
This commit is contained in:
Colin Basnett
2022-04-14 11:30:12 +02:00
committed by Sybren A. Stüvel
parent d6e7241237
commit f1ae6952a8
3 changed files with 100 additions and 0 deletions

View File

@@ -194,6 +194,10 @@ def marker_menu_generic(layout, context):
layout.separator()
layout.menu('NLA_MT_marker_select')
layout.separator()
layout.operator("marker.camera_bind")
layout.separator()