Announcement

Collapse
No announcement yet.

vray scripts

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

  • vray scripts

    hiho

    if i have to render an extern scene I must open and edit the save path for GI and some other setting
    if loading need 5min i waste ages of livetime

    how whould look a script wich run before render start to enable disable "dont render final image"
    or "if GI enabled and GI = IRRmode set GI mode multiframe incremental and save path to X"

    I wonder why Vray can not be accessed by render comandline directly
    comparing to Maya and Final Render I can modifiy all importend FR settings directly via cmd
    is there no way for Max n Vray but script ?
    __________________________________
    - moste powerfull Render farm in world -
    RebusFarm --> 1450 nodes ! --> 2.900 CPU !! --> 20.000 cores !!!
    just 2,9 to 1.2 cent per GHZ hour --> www.rebusfarm.net

  • #2
    Very easy, 2m script. incoming
    Colin Senner

    Comment


    • #3
      Code:
      global VRayEnabled
      global rlt_QuickRenderSetup
      global isDontRenderFinalImage
      
      fn VRayEnabled = ( if (matchPattern (renderers.current as string) pattern:"*V_Ray*" ignoreCase:true) then true else false )
      
      try (destroyDialog rlt_QuickRenderSetup) catch ()
      
      rollout rlt_QuickRenderSetup "Quick Render Setup" (
          checkBox chk_dontRenderFinalImage "Don't Render Final Image" checked:false
          button btn_Execute "Execute"
          
          on rlt_QuickRenderSetup open do (
              if VRayEnabled() then isDontRenderFinalImage = renderers.current.options_dontRenderImage
              
              chk_dontRenderFinalImage.checked = isDontRenderFinalImage
          )
          
          on chk_dontRenderFinalImage changed state do (
              isDontRenderFinalImage = state
          )
      
          on btn_Execute pressed do (
              if VRayEnabled() then (
                  local vr = renderers.current
                  renderSceneDialog.close()
                  vr.options_dontRenderImage = isDontRenderFinalImage
                  
                  if vr.gi_on == false then (
                      if (queryBox "Turn on GI?" title:"GI is currently off") then vr.gi_on = true
                  )
                  
                  if vr.adv_irradmap_mode != 1 then (
                      if (queryBox "Turn on Multiframe Incremental?" title:"Multiframe Incremental is current not on") then vr.adv_irradmap_mode = 1
                  )
                  
                  if vr.gi_on and vr.adv_irradmap_mode == 1 then (
                      -- GI is on and Irradiance map is set to "Multiframe Incremental"    
                      if (local saveFilename = getSaveFileName caption:"Select where to save the Irradiance Map" types:"vrimg(*.vrimg)|*.vrimg") != undefined then (
                          vr.adv_irradmap_autoSave = true
                          vr.adv_irradmap_autoSaveFileName = saveFilename
                      ) else messageBox "IMAP Save not set" beep:false
                  )
                  
              ) else messageBox "VRay not the current Renderer!" beep:false
          )
      )
      createDialog rlt_QuickRenderSetup 200 55
      Colin Senner

      Comment


      • #4
        thanks a bunch but by far too much script
        i just like to run it via cmdline before render starts so

        "renderers.current.options_dontRenderImage=tru e"
        and
        "renderers.current.options_dontRenderImage=fal se"

        is enough to switch that

        lets see if i can decrypt ur script to switch the GI modes and save path/name (will be passed from backburner to script before render starts)
        __________________________________
        - moste powerfull Render farm in world -
        RebusFarm --> 1450 nodes ! --> 2.900 CPU !! --> 20.000 cores !!!
        just 2,9 to 1.2 cent per GHZ hour --> www.rebusfarm.net

        Comment

        Working...
        X