Post render frame MEL - last rendered frame


#1

Hey, maybe I’m missing something obvious: is there a way to query Maya to find the last rendered frame?

I’m using Octane renderer, which adds some ridiculous garbage to the name of your rendered file. Specifically, it adds something like “__4636” to the file name, then adds “_passes” to the frame number value. I want to write a quick “post render frame MEL” script that, when each frame finishes rendering, would query Maya to get the path to just-completed frame and then rename it by stripping the additional garbage off. This way, as soon as the file is saved the problem would be corrected without any further effort.

Unfortunately, I can’t find anything in the Maya docs that would help me identify the name and path of the file that Maya just rendered. Can anyone think of a solution?


#2

If you can make PostRenderFrameMEL working))…you can either specify output image folder yourself or deduce it via succession of commands like file -sceneName , frame number,padding etc. , and some string parsing…not that trivial actually :slight_smile:


#3

I agree. This is not really trivial simply because in most cases the final image name is defined by the plugin, not by maya. The reason is that e.g. the renderer can output several files for one frame which maya itself does not know anything from.
What you can try is to check the image output folder for new files after each frame and check/rename them.