Announcement

Collapse
No announcement yet.

Split render channels not saving when set via maxscript

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

  • Split render channels not saving when set via maxscript

    Hi all

    From a user input I set the raw vrimg file, then I use the dir and filename part of that file to also set the split channels, it saves the vrimg file but it does not save the split channels

    Code:
        RAWFile = getSaveFileName caption: "Save V-Ray image file" \
        filename: "C:/_VRay RAW Renders/" \
        types:"V-Ray image files (*.vrimg)|*.vrimg"
    
        if RAWFile!=undefined then
            (
                renderers.current.output_saveRawFile=true
                renderers.current.output_splitgbuffer=true
                renderers.current.output_rawFileName = RAWFile
                RAWSplitChannelFile = (getFilenamePath RAWFile) +  (getFilenameFile RAWFile) + (getFilenameType "*.exr")
                renderers.current.output_splitfilename = RAWSplitChannelFile
                max quick render
            )
    If however I keep the name I set for the channels, and merely click on browse and then ok and render, it DOES save the files?!?

    What am I missing here?
    Kind Regards,
    Morne

  • #2
    Hello

    You need to set something to renderers.current.output_splitbitmap like:

    Code:
    tmpbm = Bitmap 10 10 fileName:RAWFile
    save tmpbm
    renderers.current.output_splitbitmap = tmpbm
    
    max quick render
    
    close tmpbm
    free tmpbm
    so that it is initialized to the required Max structures. A similar thing happens when you click browse and OK.

    Best regards,
    Yavor
    Yavor Rubenov
    V-Ray for 3ds Max developer

    Comment


    • #3
      Originally posted by yavor.rubenov View Post
      Hello

      You need to set something to renderers.current.output_splitbitmap like:

      Code:
      tmpbm = Bitmap 10 10 fileName:RAWFile
      save tmpbm
      renderers.current.output_splitbitmap = tmpbm
      
      max quick render
      
      close tmpbm
      free tmpbm
      so that it is initialized to the required Max structures. A similar thing happens when you click browse and OK.

      Best regards,
      Yavor
      Jip, that did the trick
      Thanks Yavor
      Kind Regards,
      Morne

      Comment


      • #4
        Also see this thread for some more information:
        http://forums.chaosgroup.com/showthr...-folders/page3

        You don't need to render the temp bitmap, just save it first and then assign.

        Also, you can replace (getFilenameType "*.exr") with ".exr". ; )
        Rens Heeren
        Generalist
        WEBSITE - IMDB - LINKEDIN - OSL SHADERS

        Comment


        • #5
          Originally posted by Rens View Post
          Also see this thread for some more information:
          http://forums.chaosgroup.com/showthr...-folders/page3

          You don't need to render the temp bitmap, just save it first and then assign.

          Also, you can replace (getFilenameType "*.exr") with ".exr". ; )
          Cool thanks
          Over there at Mackevision dont you guys need some mid/senior generalists with junior scripting knowledge to eventually work into TD status?
          :- )
          Kind Regards,
          Morne

          Comment

          Working...
          X