From d6eb231ff707a87c05d7a6b0f64ff811af676c72 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 26 May 2023 16:11:10 +0200 Subject: [PATCH] Cleanup logs + cosmetics --- .../maya/plugins/publish/validate_camera_contents.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/validate_camera_contents.py b/openpype/hosts/maya/plugins/publish/validate_camera_contents.py index 1ce8026fc2..1b30bda4e2 100644 --- a/openpype/hosts/maya/plugins/publish/validate_camera_contents.py +++ b/openpype/hosts/maya/plugins/publish/validate_camera_contents.py @@ -34,7 +34,7 @@ class ValidateCameraContents(pyblish.api.InstancePlugin): cameras = cmds.ls(shapes, type='camera', long=True) if len(cameras) != 1: cls.log.error("Camera instance must have a single camera. " - "Found {0}: {1}".format(len(cameras), cameras)) + "Found {0}: {1}".format(len(cameras), cameras)) invalid.extend(cameras) # We need to check this edge case because returning an extended @@ -51,7 +51,8 @@ class ValidateCameraContents(pyblish.api.InstancePlugin): raise RuntimeError("No cameras found in empty instance.") if not cls.validate_shapes: - cls.log.info("not validating shapes in the content") + cls.log.debug("Not validating shapes in the camera content" + " because 'validate shapes' is disabled") return invalid # non-camera shapes @@ -60,13 +61,10 @@ class ValidateCameraContents(pyblish.api.InstancePlugin): if shapes: shapes = list(shapes) cls.log.error("Camera instance should only contain camera " - "shapes. Found: {0}".format(shapes)) + "shapes. Found: {0}".format(shapes)) invalid.extend(shapes) - - invalid = list(set(invalid)) - return invalid def process(self, instance):