mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
flame: add clip segment unpacking method
This commit is contained in:
parent
5910617943
commit
8e12ef43df
5 changed files with 28 additions and 7 deletions
|
|
@ -692,3 +692,18 @@ def maintained_object_duplication(item):
|
|||
finally:
|
||||
# delete the item at the end
|
||||
flame.delete(duplicate)
|
||||
|
||||
|
||||
def get_clip_segment(flame_clip):
|
||||
name = flame_clip.name.get_value()
|
||||
version = flame_clip.versions[0]
|
||||
track = version.tracks[0]
|
||||
segments = track.segments
|
||||
|
||||
if len(segments) < 1:
|
||||
raise ValueError("Clip `{}` has no segments!".format(name))
|
||||
|
||||
if len(segments) > 1:
|
||||
raise ValueError("Clip `{}` has too many segments!".format(name))
|
||||
|
||||
return segments[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue