mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
flame: fallback if reel clip is not available
This commit is contained in:
parent
60118298b6
commit
818c3fe91f
1 changed files with 18 additions and 3 deletions
|
|
@ -63,7 +63,10 @@ class ExtractSubsetResources(openpype.api.Extractor):
|
||||||
segment = instance.data["item"]
|
segment = instance.data["item"]
|
||||||
sequence_clip = instance.context.data["flameSequence"]
|
sequence_clip = instance.context.data["flameSequence"]
|
||||||
clip_data = instance.data["flameSourceClip"]
|
clip_data = instance.data["flameSourceClip"]
|
||||||
clip = clip_data["PyClip"]
|
|
||||||
|
reel_clip = None
|
||||||
|
if clip_data:
|
||||||
|
reel_clip = clip_data["PyClip"]
|
||||||
|
|
||||||
# segment's parent track name
|
# segment's parent track name
|
||||||
s_track_name = segment.parent.name.get_value()
|
s_track_name = segment.parent.name.get_value()
|
||||||
|
|
@ -127,8 +130,20 @@ class ExtractSubsetResources(openpype.api.Extractor):
|
||||||
in_mark = (source_start_handles - source_first_frame) + 1
|
in_mark = (source_start_handles - source_first_frame) + 1
|
||||||
out_mark = in_mark + source_duration_handles
|
out_mark = in_mark + source_duration_handles
|
||||||
|
|
||||||
|
# make test for type of preset and available reel_clip
|
||||||
|
if (
|
||||||
|
not reel_clip
|
||||||
|
and export_type != "Sequence Publish"
|
||||||
|
):
|
||||||
|
self.log.warning((
|
||||||
|
"Skipping preset {}. Not available "
|
||||||
|
"reel clip for {}").format(
|
||||||
|
preset_file, segment.name.get_value()
|
||||||
|
))
|
||||||
|
continue
|
||||||
|
|
||||||
# by default export source clips
|
# by default export source clips
|
||||||
exporting_clip = clip
|
exporting_clip = reel_clip
|
||||||
|
|
||||||
if export_type == "Sequence Publish":
|
if export_type == "Sequence Publish":
|
||||||
# change export clip to sequence
|
# change export clip to sequence
|
||||||
|
|
@ -344,7 +359,7 @@ class ExtractSubsetResources(openpype.api.Extractor):
|
||||||
# create otio tracks and clips
|
# create otio tracks and clips
|
||||||
for ver in sequence_clip.versions:
|
for ver in sequence_clip.versions:
|
||||||
for track in ver.tracks:
|
for track in ver.tracks:
|
||||||
if len(track.segments) == 0 and track.hidden:
|
if len(track.segments) == 0 and track.hidden.get_value():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if track.name.get_value() != track_name:
|
if track.name.get_value() != track_name:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue