mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
resolve: adding input arg to create new timeline
This commit is contained in:
parent
baf6945b4d
commit
42f7549e05
1 changed files with 3 additions and 2 deletions
|
|
@ -125,7 +125,7 @@ def get_any_timeline():
|
|||
return project.GetTimelineByIndex(1)
|
||||
|
||||
|
||||
def get_new_timeline():
|
||||
def get_new_timeline(timeline_name: str = None):
|
||||
"""Get new timeline object.
|
||||
|
||||
Returns:
|
||||
|
|
@ -133,7 +133,8 @@ def get_new_timeline():
|
|||
"""
|
||||
project = get_current_project()
|
||||
media_pool = project.GetMediaPool()
|
||||
new_timeline = media_pool.CreateEmptyTimeline(self.pype_timeline_name)
|
||||
new_timeline = media_pool.CreateEmptyTimeline(
|
||||
timeline_name or self.pype_timeline_name)
|
||||
project.SetCurrentTimeline(new_timeline)
|
||||
return new_timeline
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue