Announcement

Collapse
No announcement yet.

Grabbing the output filename and path from the VFB with maxscript.

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

  • Grabbing the output filename and path from the VFB with maxscript.

    Hi,

    I'm trying to get a vrlmap to create/load based off the output image path in the VFB (split render channels option)

    This is what I have been using for the standard max frame buffer that works:

    Code:
    getFileNamePath rendOutputFilename + getFileNameFile rendOutputFilename + ".vrlmap"
    but if I disable the max output image and use the Vray frame buffer instead, it just creates the file in the last saved output directory that 3dsmax used (with the actual image output in the correct place as specified in split render channels)

    I'm guessing this string needs to tell it to use the Vray output instead, I thought vr.output_fileName might work, but it just gets ignored.

    Any ideas?

    Thanks.

  • #2
    So assuming you've used vr = renderers.current then you'll likely use vr.output_rawFileName as the path to get your render name.

    Comment


    • #3
      Originally posted by joconnell View Post
      So assuming you've used vr = renderers.current then you'll likely use vr.output_rawFileName as the path to get your render name.
      Ah yes, thanks for that. Was using the wrong vr.output which wasn't enabled.

      Code:
      getFileNamePath vr.output_splitfilename + getFileNameFile vr.output_splitfilename + ".vrlmap"
      This worked, but is it possible to get it to dump that file in a newly created folder? I've tried creating the temp folder in the output path location:
      Code:
      tempFolder = getFileNamePath vr.output_splitfilename + getFileNameFile vr.output_splitfilename + "\\_temp" makeDir tempFolder
      And then setting the lcpath creation to:
      Code:
      tempFolder + ".vrlmap"
      But all it does it call the vrlmap _temp.vrlmap (which is confusing), not put it in the _temp folder. Any idea what I'm missing? Thanks.

      Comment


      • #4
        Do a "print tempfolder" command to see what it's outputting, often in between your getFileNamePath and getFileNameFile you'll have to add in some slashes so it knows where the folder break is so you might need to use
        tempFolder = getFileNamePath vr.output_splitfilename + "\" + getFileNameFile vr.output_splitfilename + "\\_temp" makeDir tempFolder

        Comment

        Working...
        X