From f663f31ab5e38a7950ae8b32030bec21147bc41d Mon Sep 17 00:00:00 2001 From: robin Date: Mon, 19 Aug 2024 17:42:05 -0400 Subject: [PATCH 1/2] Fix deprecated opentimelineio 'each_child' methods. --- .../ayon_traypublisher/plugins/create/create_editorial.py | 8 ++------ .../plugins/publish/collect_shot_instances.py | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/client/ayon_traypublisher/plugins/create/create_editorial.py b/client/ayon_traypublisher/plugins/create/create_editorial.py index b013ed6..b8946a0 100644 --- a/client/ayon_traypublisher/plugins/create/create_editorial.py +++ b/client/ayon_traypublisher/plugins/create/create_editorial.py @@ -351,11 +351,7 @@ def _get_clip_instances( product_type_presets (list): list of dict settings product presets """ - tracks = [ - track for track in otio_timeline.each_child( - descended_from_type=otio.schema.Track) - if track.kind == "Video" - ] + tracks = otio_timeline.video_tracks # media data for audio stream and reference solving media_data = self._get_media_source_metadata(media_path) @@ -372,7 +368,7 @@ def _get_clip_instances( except AttributeError: track_start_frame = 0 - for otio_clip in track.each_child(): + for otio_clip in track.find_clips(): if not self._validate_clip_for_processing(otio_clip): continue diff --git a/client/ayon_traypublisher/plugins/publish/collect_shot_instances.py b/client/ayon_traypublisher/plugins/publish/collect_shot_instances.py index 5a2f5cb..4bcdc75 100644 --- a/client/ayon_traypublisher/plugins/publish/collect_shot_instances.py +++ b/client/ayon_traypublisher/plugins/publish/collect_shot_instances.py @@ -74,8 +74,7 @@ def _get_otio_clip(self, instance): otio_timeline = context.data["otioTimeline"] clips = [ - clip for clip in otio_timeline.each_child( - descended_from_type=otio.schema.Clip) + clip for clip in otio_timeline.find_clips() if clip.name == otio_clip.name if clip.parent().kind == "Video" ] From 6fe6ef7b2046452d4fe9fe649e9dcd997fe7fa07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Je=C5=BEek?= Date: Tue, 20 Aug 2024 13:39:29 +0200 Subject: [PATCH 2/2] Update client/ayon_traypublisher/plugins/create/create_editorial.py --- client/ayon_traypublisher/plugins/create/create_editorial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_traypublisher/plugins/create/create_editorial.py b/client/ayon_traypublisher/plugins/create/create_editorial.py index b8946a0..1be0140 100644 --- a/client/ayon_traypublisher/plugins/create/create_editorial.py +++ b/client/ayon_traypublisher/plugins/create/create_editorial.py @@ -351,7 +351,7 @@ def _get_clip_instances( product_type_presets (list): list of dict settings product presets """ - tracks = otio_timeline.video_tracks + tracks = otio_timeline.video_tracks() # media data for audio stream and reference solving media_data = self._get_media_source_metadata(media_path)