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

Maya look: skip empty file attributes #3274

Merged
merged 3 commits into from
Jun 14, 2022
Merged
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
3 changes: 3 additions & 0 deletions openpype/hosts/maya/plugins/publish/collect_look.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ def collect_resources(self, node):
source,
computed_source))

if not source:
self.log.info("source is empty, skipping...")
continue
Copy link
Collaborator

@BigRoy BigRoy Jun 2, 2022

Choose a reason for hiding this comment

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

Would it be worth adding a comment in code to state why we'd sometimes want to skip collecting on a file node - as a reminder for our future selves.

Since technically with this change it also now allows a user to publish a look using a file node that doesn't have a texture set without that being validated against, yes?

Copy link
Member

Choose a reason for hiding this comment

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

Doesnt Arnold throw an error if this happens? If so we should defo validate.

Copy link
Member Author

Choose a reason for hiding this comment

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

I seems this is allowed only for Renderman as it seems. I can add logic just for that but I hate to have so much renderer specific codes....

Copy link
Member

Choose a reason for hiding this comment

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

I'm not quite sure if it should be our responsibility to check if a file node is empty or not. I would just allow it across the board and leave it to the artist. It's way too wide of a problem to potentially deal with it for all renderers and their usecases.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've limited it to renderman nodes, I believe this is the safest and easiest approch to it

# We replace backslashes with forward slashes because V-Ray
# can't handle the UDIM files with the backslashes in the
# paths as the computed patterns
Expand Down