hi all,
I have stumbled upon a show-stopper, which should probably be quite easy, but I can't find a solution:
In a post-render script, I need to get the filename of the just-rendered file, so I can let some external command loose on it.
This should work in batch-render, of course, because it is meant to process a lot of files.
The idea is to launch a custom program per rendered file, that takes the filename of the rendered file, and stuffs extra information (like the current camera matrix, focal length etc.) into the file (or writes a companion file, whichever works better... stuffing extra metadata in an .exr file would be ideal... I already have a tool to do that, it's commandline-driven so I can call it from MEL... if only I had that filename to pass as a parameter.)
So the whole idea is: while still in the PostRender script, how do I get the filename of the frame that just got rendered?
it's puzzling me...
As a test, I tried to put this in a postrender script, but it doesn't write out files per frame ;-(
(as far as I can see, currentime -q is _not_ the answer (??) just try)
////////////////////////////////////////////////////
$frame = currentTime -q;
string $filename = "C:/temp/test_" + $frame + ".txt";
print($filename);
int $file = fopen $filename "w";
fprint $file ("This is a little companion test file for frame " + $frame);
fclose $file;
////////////////////////////////////////////////////
anyone?
greetz!
loki