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 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
5 changes: 5 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,11 @@ def collect_resources(self, node):
source,
computed_source))

# renderman allows nodes to have filename attribute empty while
# you can have another incoming connection from different node.
if not source and cmds.nodeType(node).lower().startswith("pxr"):
Copy link
Collaborator

@BigRoy BigRoy Jun 7, 2022

Choose a reason for hiding this comment

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

There might be a better way to limit it to renderman nodes.

You could query the node types relevant to the Pixar Renderman plug-in and could check whether it's part of that plug-in?

E.g. here is how to do the same for Redshift node types:

from maya import cmds

redshift_node_types = set(cmds.pluginInfo("redshift4maya", query=True, dependNode=True))

You'd need to first ensure the plug-in is available/loaded however but you can query against that too - but it might be more explicit than the string comparison?

self.log.info("Renderman: source is empty, skipping...")
continue
# 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