Merge pull request #3030 from BigRoy/fix3026

This commit is contained in:
Milan Kolar 2022-04-07 10:36:50 +02:00 committed by GitHub
commit e35b3220b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,14 @@ class ValidateCameraContents(pyblish.api.InstancePlugin):
# list when there are no actual cameras results in # list when there are no actual cameras results in
# still an empty 'invalid' list # still an empty 'invalid' list
if len(cameras) < 1: if len(cameras) < 1:
raise RuntimeError("No cameras in instance.") if members:
# If there are members in the instance return all of
# them as 'invalid' so the user can still select invalid
cls.log.error("No cameras found in instance "
"members: {}".format(members))
return members
raise RuntimeError("No cameras found in empty instance.")
# non-camera shapes # non-camera shapes
valid_shapes = cmds.ls(shapes, type=('camera', 'locator'), long=True) valid_shapes = cmds.ls(shapes, type=('camera', 'locator'), long=True)