From 552fe5dccf7e538d6b8d94b0c5fdf2f0ce2aa946 Mon Sep 17 00:00:00 2001 From: CAILLOT Cyprien Date: Tue, 22 Aug 2023 18:08:47 +0200 Subject: [PATCH] fix arnold metadaa plugin when post_mel_command return None --- .../plugins/maya/publish/validate_arnold_camera_metadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quad_pyblish_module/plugins/maya/publish/validate_arnold_camera_metadata.py b/quad_pyblish_module/plugins/maya/publish/validate_arnold_camera_metadata.py index 1a503c9..861177e 100644 --- a/quad_pyblish_module/plugins/maya/publish/validate_arnold_camera_metadata.py +++ b/quad_pyblish_module/plugins/maya/publish/validate_arnold_camera_metadata.py @@ -126,7 +126,7 @@ def process(self, instance): # Add post render mel command to validate metadata post_mel_command = 'python("from quad_pyblish_module.plugins.maya.publish.validate_arnold_camera_metadata import ' \ 'ValidateArnoldCameraMetadata; ValidateArnoldCameraMetadata().process(None)")' - post_mel_current_value = lib.get_attribute('defaultRenderGlobals.postMel') - if not post_mel_command in post_mel_current_value: + post_mel_current_value = lib.get_attribute('defaultRenderGlobals.postMel') or '' + if post_mel_command not in post_mel_current_value: post_mel_command += '; ' + post_mel_current_value lib.set_attribute('postMel', post_mel_command, 'defaultRenderGlobals')