I am modeling at still image (as opposed to an animation). In a typical fashion, i work a little on the scene, render, evaluate, repeat as needed. So I am attempting to put a little MEL script in the Render Settings > Pre Render MEL box that will auto increment the Version Label before each render.
Here is the code
[codebox]int $i;
$i = (getAttr("defaultRenderGlobals.renderVersion"));
setAttr -type "string" defaultRenderGlobals.renderVersion ($i + 1);[/codebox]
Super simple. And it kinda works. If the Version Label is set to 1 before I render, the value is incremented to 2 and I get the desired file name ( ie "render_image-2.psd"), but when I check the render settings after the render the value in the Render Settings > Version Label field has not changed. In this scenario, it is still 1. If I render again, I get the same results as the previous render ( ie "render_image-2.psd").
It works, but it doesn't.
Any idea why?
I'm running Maya 2009 on a Mac.
Thanks,
Paul