Added check for out set

This commit is contained in:
wikoreman 2018-09-25 12:10:26 +02:00
parent 8c8e3789fb
commit 5bc4a2bb9f

View file

@ -20,6 +20,12 @@ class ValidateAnimationContent(pyblish.api.InstancePlugin):
def get_invalid(cls, instance):
assert 'out_hierarchy' in instance.data, "Missing `out_hierarchy` data"
out_set = next((i for i in instance.data["setMembers"] if
i.endswith("out_SET")), None)
assert out_set, ("Instance '%s' has no objectSet named: `OUT_set`" %
instance.name)
# All nodes in the `out_hierarchy` must be among the nodes that are
# in the instance. The nodes in the instance are found from the top
# group, as such this tests whether all nodes are under that top group.