Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6038 from ynput/bugfix/traypublish-editorial-avoi…
Browse files Browse the repository at this point in the history
…d-audio-track

Traypublisher: editorial avoid audio tracks processing
  • Loading branch information
iLLiCiTiT authored Feb 7, 2024
2 parents 9affc2c + 2669a6d commit 0c37c0e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
26 changes: 15 additions & 11 deletions openpype/hosts/traypublisher/plugins/create/create_editorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,15 +381,19 @@ def _get_clip_instances(
"""
self.asset_name_check = []

tracks = otio_timeline.each_child(
descended_from_type=otio.schema.Track
)
tracks = [
track for track in otio_timeline.each_child(
descended_from_type=otio.schema.Track)
if track.kind == "Video"
]

# media data for audio sream and reference solving
# media data for audio stream and reference solving
media_data = self._get_media_source_metadata(media_path)

for track in tracks:
# set track name
track.name = f"{sequence_file_name} - {otio_timeline.name}"

try:
track_start_frame = (
abs(track.source_range.start_time.value)
Expand All @@ -398,19 +402,19 @@ def _get_clip_instances(
except AttributeError:
track_start_frame = 0


for clip in track.each_child():
if not self._validate_clip_for_processing(clip):
for otio_clip in track.each_child():
if not self._validate_clip_for_processing(otio_clip):
continue


# get available frames info to clip data
self._create_otio_reference(clip, media_path, media_data)
self._create_otio_reference(otio_clip, media_path, media_data)

# convert timeline range to source range
self._restore_otio_source_range(clip)
self._restore_otio_source_range(otio_clip)

base_instance_data = self._get_base_instance_data(
clip,
otio_clip,
instance_data,
track_start_frame
)
Expand All @@ -429,7 +433,7 @@ def _get_clip_instances(
continue

instance = self._make_subset_instance(
clip,
otio_clip,
_fpreset,
deepcopy(base_instance_data),
parenting_data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def _get_otio_clip(self, instance):
clip for clip in otio_timeline.each_child(
descended_from_type=otio.schema.Clip)
if clip.name == otio_clip.name
if clip.parent().kind == "Video"
]

otio_clip = clips.pop()
Expand Down
2 changes: 1 addition & 1 deletion openpype/plugins/publish/validate_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ValidateResources(pyblish.api.InstancePlugin):
"""

order = ValidateContentsOrder
label = "Resources"
label = "Validate Resources"

def process(self, instance):

Expand Down

0 comments on commit 0c37c0e

Please sign in to comment.