mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
🐛 handle empty materials list
This commit is contained in:
parent
19f0a77966
commit
c0926104d5
1 changed files with 5 additions and 1 deletions
|
|
@ -367,7 +367,11 @@ class CollectLook(pyblish.api.InstancePlugin):
|
|||
self.log.debug("Found the following sets:\n{}".format(look_sets))
|
||||
# Get the entire node chain of the look sets
|
||||
# history = cmds.listHistory(look_sets, allConnections=True)
|
||||
history = cmds.listHistory(materials, allConnections=True)
|
||||
# if materials list is empty, listHistory() will crash with
|
||||
# RuntimeError
|
||||
history = []
|
||||
if materials:
|
||||
history = cmds.listHistory(materials, allConnections=True)
|
||||
|
||||
# Since we retrieved history only of the connected materials
|
||||
# connected to the look sets above we now add direct history
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue