Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecated opentimelineio 'each_child' methods (To Be Discussed). #7

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions client/ayon_traypublisher/plugins/create/create_editorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
jakubjezek001 marked this conversation as resolved.
Show resolved Hide resolved

# media data for audio stream and reference solving
media_data = self._get_media_source_metadata(media_path)
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down