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

Maya - Look: Skip invalid connections #207

Merged
merged 1 commit into from
Jun 7, 2020
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
8 changes: 7 additions & 1 deletion pype/plugins/maya/publish/collect_look.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,13 @@ def collect(self, instance):
if looksets:
for look in looksets:
for at in shaderAttrs:
con = cmds.listConnections("{}.{}".format(look, at))
try:
con = cmds.listConnections("{}.{}".format(look, at))
except ValueError:
# skip attributes that are invalid in current
# context. For example in the case where
# Arnold is not enabled.
continue
if con:
materials.extend(con)

Expand Down