Skip to content
Merged
Changes from 2 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
17 changes: 7 additions & 10 deletions client/ayon_nuke/plugins/publish/collect_writes.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,6 @@ def _get_existing_frames_representation(
"tags": []
}

# set slate frame
collected_frames = self._add_slate_frame_to_collected_frames(
instance,
collected_frames,
first_frame
)

if len(collected_frames) == 1:
representation['files'] = collected_frames.pop()
else:
Expand Down Expand Up @@ -363,7 +356,7 @@ def _add_slate_frame_to_collected_frames(
expected_slate_frame = first_frame - 1
expected_slate_path = write_node["file"].evaluate(expected_slate_frame)

if not os.path.exists(expected_slate_path):
if os.path.exists(expected_slate_path):
slate_frame = os.path.basename(expected_slate_path)
collected_frames.insert(0, slate_frame)
Comment on lines -369 to 364

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this does make more sense 🤔 - @jakubjezek001 @moonyuet any thoughts?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed.


Expand Down Expand Up @@ -426,8 +419,12 @@ def _get_collected_frames(self, instance):
if filename in expected_filenames
]

return collected_frames

# set slate frame
return self._add_slate_frame_to_collected_frames(
instance,
collected_frames,
first_frame
)

def _find_downstream_time_warp_node(start_node):
# HACK: no idea why calling `dependentNodes` the first time
Expand Down
Loading