Skip to content

Commit

Permalink
fix arnold metadaa plugin when post_mel_command return None
Browse files Browse the repository at this point in the history
  • Loading branch information
CAILLOT Cyprien committed Aug 22, 2023
1 parent 805eb58 commit 552fe5d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')

0 comments on commit 552fe5d

Please sign in to comment.