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

Commit

Permalink
Merge pull request #207 from pypeclub/bugfix/collect_look_vray
Browse files Browse the repository at this point in the history
Maya - Look: Skip invalid connections
  • Loading branch information
mkolar authored Jun 7, 2020
2 parents 3c3005a + 4fab9da commit 993a92a
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit 993a92a

Please sign in to comment.