Announcement

Collapse
No announcement yet.

VRay Proxy Mass import script?

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

  • VRay Proxy Mass import script?

    I won't get into details, but I need the ability to import into a scene 344 VRay proxies at once. Is there script that can do this?

    Thanks!
    - Geoff

  • #2
    sure, it's easy enough. A simple scene with the functionality you need would be appreciated.
    Colin Senner

    Comment


    • #3
      Posting a scene isn't really necessary, I'm just looking for something that will ask you to pick whatever files you want from a folder and just plop them at 0,0,0, not even giving you the option of deciding where to put them.
      - Geoff

      Comment


      • #4
        easy. I'll post the code.
        Colin Senner

        Comment


        • #5
          are all the vrproxies in the same folder? Can they be?
          Colin Senner

          Comment


          • #6
            Just run this badboy, hit browse and select the folder where you want to import all of the .vrmesh files and it'll do it.

            Code:
            global rlt_massVRayProxyImport
            global thepath, thefiles
            
            try ( destroyDialog rlt_massVRayProxyImport ) catch ()
            rollout rlt_massVRayProxyImport "Mass VRayProxy Import" (
                button btn_browse "Browse"
                label lbl_found "0 files found"
                button btn_import "Import" enabled:false offset:[0,10] width:70
                
                on btn_browse pressed do (
                    if (thepath = getSavePath caption:"Select the folder where the vrmesh files are located." ) != undefined then (
                        if (thefiles = getFiles (thepath + "/*.vrmesh")).count != 0 then (
                            if thefiles.count == 1 then lbl_found.caption = "1 file found" else lbl_found.caption = (thefiles.count as string) + " files found"
                            btn_import.enabled = true
                        ) else
                            messageBox "No vrmesh files found" beep:false
                    )
                )
                
                on btn_import pressed do (
                    clearselection()
                    for f in thefiles do (
                        newProxy = VRayProxy filename:f
                        newProxy.pos = [0,0,0]
                        selectmore newProxy
                    )
                )
            )
            createDialog rlt_massVRayProxyImport 100 93
            -Colin
            Colin Senner

            Comment


            • #7
              Hey, wow! Thanks man! I'll check it out first thing tomorrow morning.
              - Geoff

              Comment


              • #8
                wowwwww great script, thanks
                www.kobo9.ch

                Comment

                Working...
                X