From 0624bbe2bc327f2e067b61f5a25d60532bb13812 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Thu, 14 Nov 2024 08:10:11 -0500 Subject: [PATCH 1/3] Fix distribution of otioClip attributes to plates --- .../ayon_resolve/plugins/publish/collect_plates.py | 13 ++++++++++++- .../ayon_resolve/plugins/publish/collect_shots.py | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/client/ayon_resolve/plugins/publish/collect_plates.py b/client/ayon_resolve/plugins/publish/collect_plates.py index 2c92c9eb9d..040f4e186a 100644 --- a/client/ayon_resolve/plugins/publish/collect_plates.py +++ b/client/ayon_resolve/plugins/publish/collect_plates.py @@ -1,4 +1,6 @@ -import pyblish +import pyblish.api + +from ayon_resolve.otio import utils class CollectPlate(pyblish.api.InstancePlugin): @@ -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"] diff --git a/client/ayon_resolve/plugins/publish/collect_shots.py b/client/ayon_resolve/plugins/publish/collect_shots.py index 8471e564bd..6e1c319892 100644 --- a/client/ayon_resolve/plugins/publish/collect_shots.py +++ b/client/ayon_resolve/plugins/publish/collect_shots.py @@ -15,7 +15,6 @@ class CollectShot(pyblish.api.InstancePlugin): SHARED_KEYS = ( "folderPath", "fps", - "otioClip", "resolutionWidth", "resolutionHeight", "pixelAspect", From b31a47eda2ad1a0153b624c885f291b475227fe6 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Thu, 14 Nov 2024 08:18:49 -0500 Subject: [PATCH 2/3] Fix distribution of otioClip attributes to plates --- client/ayon_resolve/plugins/publish/collect_shots.py | 1 + 1 file changed, 1 insertion(+) diff --git a/client/ayon_resolve/plugins/publish/collect_shots.py b/client/ayon_resolve/plugins/publish/collect_shots.py index 6e1c319892..8471e564bd 100644 --- a/client/ayon_resolve/plugins/publish/collect_shots.py +++ b/client/ayon_resolve/plugins/publish/collect_shots.py @@ -15,6 +15,7 @@ class CollectShot(pyblish.api.InstancePlugin): SHARED_KEYS = ( "folderPath", "fps", + "otioClip", "resolutionWidth", "resolutionHeight", "pixelAspect", From 982ecc9a1d5d3673a14b0fddf711ddb16913dfd1 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Thu, 14 Nov 2024 11:26:04 -0500 Subject: [PATCH 3/3] Fix native OTIO support detection. --- client/ayon_resolve/api/lib.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/ayon_resolve/api/lib.py b/client/ayon_resolve/api/lib.py index 63806db306..122cb4cae8 100644 --- a/client/ayon_resolve/api/lib.py +++ b/client/ayon_resolve/api/lib.py @@ -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: