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

Hiero - effect collection fixes #4038

Merged
Merged
Changes from all commits
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
12 changes: 7 additions & 5 deletions openpype/hosts/hiero/plugins/publish/precollect_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,7 @@ def create_otio_time_range_from_timeline_item_data(track_item):
return hiero_export.create_otio_time_range(
frame_start, frame_duration, fps)

@staticmethod
def collect_sub_track_items(tracks):
def collect_sub_track_items(self, tracks):
"""
Returns dictionary with track index as key and list of subtracks
"""
Expand All @@ -336,19 +335,22 @@ def collect_sub_track_items(tracks):
for track in tracks:
items = track.items()

effet_items = track.subTrackItems()

# skip if no clips on track > need track with effect only
if items:
if not effet_items:
continue

# skip all disabled tracks
if not track.isEnabled():
continue

track_index = track.trackIndex()
_sub_track_items = phiero.flatten(track.subTrackItems())
_sub_track_items = phiero.flatten(effet_items)

_sub_track_items = list(_sub_track_items)
# continue only if any subtrack items are collected
if not list(_sub_track_items):
if not _sub_track_items:
continue

enabled_sti = []
Expand Down