WriteImage Issue with Batch Rendering with Python

WriteImage Issue with Batch Rendering with Python

srdirksen
Explorer Explorer
604 Views
1 Reply
Message 1 of 2

WriteImage Issue with Batch Rendering with Python

srdirksen
Explorer
Explorer

Hi everyone,

 

Sorry if this is a dumb question. I used this code to batch render images in Maya 2022.1 and it worked fine before. Now I'm using Maya 2023 and everything works the same except for the life of me I cannot save the image. I've tried different paths and no luck, I can't find the image anywhere.

 

import maya.cmds as cmds
import maya.mel as mel


mel.eval('renderWindowRender redoPreviousRender renderView')
editor = 'renderView'
formatManager = createImageFormats.ImageFormats()
formatManager.pushRenderGlobalsForDesc("JPEG")
cmds.renderWindowEditor(editor, e=True, writeImage='C:/Users/name/Documents/testImage.jpg')
formatManager.popRenderGlobals()

 

Did something change with Maya 2023 or is my approach totally wrong? Thank you for any help. 

605 Views
1 Reply
Reply (1)
Message 2 of 2

teddude75
Collaborator
Collaborator

Batch render is cmds.arnoldRender ( batch= True) and sequence render is mel.eval('renderSequence') . They both use render settings to save files and use all the necessary setting from there. Here is documentation on batch rendering for Arnold 

https://docs.arnoldrenderer.com/display/A5AFMUG/Batch+Rendering