Maya Arnold RenderView : save rendered image as jpg with Python

544 views Asked by At

I'm trying to save already rendered image from the arnold renderview with Python or Mel (like after an interactive session or simple render). But so far I can't find how to do so, any help?

save as renderview

Here's what I tried :

import maya.cmds as cmds
editor = "renderView"
cmds.renderWindowEditor(editor, e=True, writeImage="C:/test.jpg")

Thanks!

2

There are 2 answers

5
Kartikey On

If I am not wrong , you are just trying to save your rendered images right?

so in that case you can use the following to save the images at a specific location before rendering them itself (I have only used it while doing arnold render using script as well), you can give it a shot by setting this attribute manually and then taking renders.

cmds.setAttr("defaultRenderGlobals.imageFilePrefix", file_path, type="string")

where file_path will something like destination + filename.extension

2
slimboJoe On

I'm working on a similar task. Try this bit of pure MEL code:

arnoldRenderView -opt "Save Image" "C:/testerImage.png"

I'm using this in Maya 2024 to save out rendered Arnold images. This little bit works great for me.