Skip to content

Commit

Permalink
Merge pull request #41 from ynput/bugfix/fix_vertical_otio_clip
Browse files Browse the repository at this point in the history
Fix bugs: distribution of otioClip attributes to plates + native OTIO export support
  • Loading branch information
jakubjezek001 authored Nov 15, 2024
2 parents cc0d27a + 982ecc9 commit a444978
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions client/ayon_resolve/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,10 @@ def export_timeline_otio_to_file(timeline, filepath):
"""
try:
from . import bmdvr

if bmdvr.EXPORT_OTIO is None:
raise AttributeError("Unsupported native Export OTIO")

timeline.Export(filepath, bmdvr.EXPORT_OTIO)

except Exception as error:
Expand Down
13 changes: 12 additions & 1 deletion client/ayon_resolve/plugins/publish/collect_plates.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import pyblish
import pyblish.api

from ayon_resolve.otio import utils


class CollectPlate(pyblish.api.InstancePlugin):
Expand All @@ -16,6 +18,15 @@ def process(self, instance):
"""
instance.data["families"].append("clip")

otio_timeline = instance.context.data["otioTimeline"]
otio_clip, marker = utils.get_marker_from_clip_index(
otio_timeline, instance.data["clip_index"]
)
if not otio_clip:
raise RuntimeError("Could not retrieve otioClip for shot %r", instance)

instance.data["otioClip"] = otio_clip

# Retrieve instance data from parent instance shot instance.
parent_instance_id = instance.data["parent_instance_id"]
edit_shared_data = instance.context.data["editorialSharedData"]
Expand Down

0 comments on commit a444978

Please sign in to comment.