Is there a way to read the frame number that is currently rendering from V-Ray's VFB? I would like to use that value to drive the file output name.
Here is the code that I am using as a pre-render script. It works only for the current frame that is set in the 3ds Max time slider.
Found solution to read out which frame number is rendering, but still can't get that value into Pre-render script.
I appreciate any help!
Here is the code that I am using as a pre-render script. It works only for the current frame that is set in the 3ds Max time slider.
Code:
mat = sceneMaterials["myMat"] /*Material to get names*/ matNo = (mat.switchNum as integer) matObj = mat.switchMtl f = currentTime.frame /*??? want to get frame number that is currently rendering*/ matName = matObj[f+1].name rendSaveFile = true fileLoc = "C:/Users/xyz/Desktop/" fileExt = ".png" rendOutputFilename = fileLoc + matName + fileExt
Code:
fn myCallback = currentTime.frame as integer callbacks.addScript #prerenderframe myCallback id:#myCtCallback
I appreciate any help!
Comment