Validate against multiple collections per instance.

This commit is contained in:
Toke Stuart Jepsen 2022-12-21 12:19:23 +00:00
parent 2c9613b55e
commit 0fc1e357a3

View file

@ -29,6 +29,13 @@ class ValidateXgen(pyblish.api.InstancePlugin):
msg = "Invalid nodes in the objectset:\n{}".format(remainder_nodes)
assert not remainder_nodes, msg
# Only one collection per instance.
palette_amount = len(instance.data["xgenPalettes"])
msg = "Only one collection per instance allow. Found {}:\n{}".format(
palette_amount, instance.data["xgenPalettes"]
)
assert palette_amount == 1, msg
# Cant have deactive modifiers in collection cause Xgen will try and
# look for them when loading.
palette = instance.data["xgenPalette"].replace("|", "")