Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Maya: Allow to select invalid camera contents if no cameras found #3030

Merged
merged 1 commit into from
Apr 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ def get_invalid(cls, instance):
# list when there are no actual cameras results in
# still an empty 'invalid' list
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
valid_shapes = cmds.ls(shapes, type=('camera', 'locator'), long=True)
Expand Down