Announcement

Collapse
No announcement yet.

Mel or Python command to get V-Ray render path?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mel or Python command to get V-Ray render path?

    Hey all, does anyone know where I can find the documentation for V-Ray specific mel or python commands, or does anyone know the answer to my qn?

    I am trying to get the final resolved output path... as in:

    In vray common tab:
    Path: p:/ztesting/jobexample/mayaproject/
    file name: userFolder/<scene>/<layer>/<version>

    should be p:/ztesting/jobexample/mayaproject/userFolder/littlejobbie/foreground/12/scenename_xxxx.exr

    I can get the general Maya output path, but not the V-Ray specific one.

    I have started writing a script to build it up manually, but there are so many variables like digit padding and extensions etc...

    Any help or pointers would be appreciated,

    Thanks,

    Jono

  • #2
    Code:
    def getVRayRealImageNamePrefix(prefix, renderLayer, camera):
        prefix = prefix.replace("<Layer>", renderLayer)
        prefix = prefix.replace("<layer>", renderLayer)
        prefix = prefix.replace("%Layer", renderLayer)
        prefix = prefix.replace("%layer", renderLayer)
        prefix = prefix.replace("%l", renderLayer)
    
        return mel.eval('vrayTransformFilename("%s", "%s", "", 0, 0)' % (prefix, camera))
    Do an os.path.join with the image output dir and you are done.
    Last edited by bigbossfr; 05-10-2015, 03:41 PM.
    www.deex.info

    Comment

    Working...
    X