From 917013e353ce535d062b060a35d9ee6339fba2db Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 22 Apr 2022 12:33:55 +0200 Subject: [PATCH] Fix any render cameras check --- openpype/hosts/maya/plugins/publish/collect_render.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_render.py b/openpype/hosts/maya/plugins/publish/collect_render.py index 14b91570053..dfab8252d05 100644 --- a/openpype/hosts/maya/plugins/publish/collect_render.py +++ b/openpype/hosts/maya/plugins/publish/collect_render.py @@ -194,13 +194,11 @@ def process(self, context): assert render_products, "no render products generated" exp_files = [] multipart = False - render_cameras = [] for product in render_products: if product.multipart: multipart = True product_name = product.productName if product.camera and layer_render_products.has_camera_token(): - render_cameras.append(product.camera) product_name = "{}{}".format( product.camera, "_" + product_name if product_name else "") @@ -210,7 +208,8 @@ def process(self, context): product) }) - assert render_cameras, "No render cameras found." + has_cameras = any(product.camera for product in render_products) + assert has_cameras, "No render cameras found." self.log.info("multipart: {}".format( multipart))