Throw warning instead of assertion error

This commit is contained in:
wikoreman 2018-09-25 11:43:46 +02:00
parent 772f8515c9
commit 8c8e3789fb

View file

@ -29,8 +29,11 @@ class CollectAnimationOutputGeometry(pyblish.api.InstancePlugin):
out_set = next((i for i in instance.data["setMembers"] if
i.endswith("out_SET")), None)
assert out_set, ("Expecting out_SET for instance of family"
" '%s'" % family)
if out_set is None:
warning = "Expecting out_SET for instance of family '%s'" % family
self.log.warning(warning)
return
members = cmds.ls(cmds.sets(out_set, query=True), long=True)
# Get all the relatives of the members