mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Hiero: add new get_timeline_selection function
This commit is contained in:
parent
f4ebcdb278
commit
c090389841
2 changed files with 8 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ from .lib import (
|
|||
get_track_items,
|
||||
get_current_project,
|
||||
get_current_sequence,
|
||||
get_timeline_selection,
|
||||
get_current_track,
|
||||
get_track_item_pype_tag,
|
||||
set_track_item_pype_tag,
|
||||
|
|
@ -80,6 +81,7 @@ __all__ = [
|
|||
"get_track_items",
|
||||
"get_current_project",
|
||||
"get_current_sequence",
|
||||
"get_timeline_selection",
|
||||
"get_current_track",
|
||||
"get_track_item_pype_tag",
|
||||
"set_track_item_pype_tag",
|
||||
|
|
|
|||
|
|
@ -96,6 +96,12 @@ def get_current_sequence(name=None, new=False):
|
|||
return sequence
|
||||
|
||||
|
||||
def get_timeline_selection():
|
||||
active_sequence = hiero.ui.activeSequence()
|
||||
timeline_editor = hiero.ui.getTimelineEditor(active_sequence)
|
||||
return list(timeline_editor.selection())
|
||||
|
||||
|
||||
def get_current_track(sequence, name, audio=False):
|
||||
"""
|
||||
Get current track in context of active project.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue