mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
add clip to timeline in correct place
This commit is contained in:
parent
d83eb73e04
commit
759dc59132
2 changed files with 17 additions and 2 deletions
|
|
@ -246,7 +246,8 @@ def get_media_pool_item(fpath, root: object = None) -> object:
|
|||
def create_timeline_item(media_pool_item: object,
|
||||
timeline: object = None,
|
||||
source_start: int = None,
|
||||
source_end: int = None) -> object:
|
||||
source_end: int = None,
|
||||
timeline_in: int = None) -> object:
|
||||
"""
|
||||
Add media pool item to current or defined timeline.
|
||||
|
||||
|
|
@ -278,6 +279,12 @@ def create_timeline_item(media_pool_item: object,
|
|||
clip_data.update({"endFrame": source_end})
|
||||
|
||||
print(clip_data)
|
||||
|
||||
if timeline_in:
|
||||
timeline_start = timeline.GetStartFrame()
|
||||
# Create a clipInfo dictionary with the necessary information
|
||||
clip_data["recordFrame"] = int(timeline_start + timeline_in)
|
||||
|
||||
# add to timeline
|
||||
media_pool.AppendToTimeline([clip_data])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue