PDA

View Full Version : render current frame to custom path in python



alpha666
03-19-2014, 11:40 AM
I am trying to do an export script from lightwave in python.
for that I need to render the current frame at a custom path ( along with a depth map).
I have found only the command lwsdk.command("RenderFrame") that launch a render but I don't know how to manipulate the GUI to save this image in Python.

Thanks in advance for any advice or any useful link.

ernpchan
03-19-2014, 12:14 PM
You can call the commands below like so:

lwsdk.command('SaveRGB(1)'
lwsdk.command('SaveRGBPrefix(filename)')

alpha666
03-20-2014, 03:16 AM
sorry, but the commands does not works. ( you have to suppress the parenthesis to make the commands pass the parser)
And those two commands does not seems to do anything. ( the python answer is 1 but no image is appearing at the path specified)

ernpchan
03-20-2014, 09:38 AM
I'll double check my syntax but that was copied out of a working script.

Those two commands just enable options in the Render Globals panel. They don't generate the image.