Announcement

Collapse
No announcement yet.

Proxy Instance Error

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

  • Proxy Instance Error

    I try to run this,
    It asks me "all proxy with same mrmesh file will be converted into instances. Are you sure?" I click yes and I get error:
    Type Error: call needs function or class, got:undefined

    I don't know if this is built in with SP5 or is it from the Vlado's script. ( when upgrading to max 2011, I installed all scripts I was using for max 2009)

    Here is the text in Maxscript:

    macroScript VRayProxyLister category:"VRay" buttontext:"VRayProxy instance check" tooltip:"Check for VRayProxy's with the same .vrmesh file" (
    local res=queryBox "VRayProxy's with the same .vrmesh file will be converted to instances. Are you sure?" title:"VRayProxy instance check"
    if res then enumVRayProxies()
    )


    Please help me.
    for my blog and tutorials:
    www.alfasmyrna.com

  • #2
    Are you sure you copied all scripts? Looks like some script is missing.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      This is the script in my script folder:

      fn compVRayProxyFunc a b = (
      if (a[1]<b[1]) then return -1;
      if (a[1]>b[1]) then return 1;
      return 0;
      )

      fn enumVRayProxies = (
      files=#()
      for node in $* do (
      if (classof node==VRayProxy) then (
      append files #(node.fileName, node)
      )
      )
      qsort files compVRayProxyFunc
      if files.count==0 then messageBox "There are no VRayProxy's in the scene" title:"VRayProxy instance check" beep:false
      else (
      fileName=files[1][1]
      origNode=files[1][2]
      for i=2 to files.count do (
      if (files[i][1]!=fileName) then (
      fileName=files[i][1]
      origNode=files[i][2]
      ) else (
      format "% : %\n" files[i][1] files[i][2]
      instanceReplace files[i][2] origNode
      )
      )
      )
      )

      macroScript VRayProxyLister category:"VRay" buttontext:"VRayProxy instance check" tooltip:"Check for VRayProxy's with the same .vrmesh file" (
      local res=queryBox "VRayProxy's with the same .vrmesh file will be converted to instances. Are you sure?" title:"VRayProxy instance check"
      if res then enumVRayProxies()
      )





      This was what was in display in maxscript window after error message :

      macroScript VRayProxyLister category:"VRay" buttontext:"VRayProxy instance check" tooltip:"Check for VRayProxy's with the same .vrmesh file" (
      local res=queryBox "VRayProxy's with the same .vrmesh file will be converted to instances. Are you sure?" title:"VRayProxy instance check"
      if res then enumVRayProxies()
      )
      for my blog and tutorials:
      www.alfasmyrna.com

      Comment


      • #4
        Vlado,
        is there a way to make this script wok in max 2011?
        for my blog and tutorials:
        www.alfasmyrna.com

        Comment


        • #5
          same here, it helps you to optimize your scenes, any hints of making it work on max 2011 could be great...

          regards,
          ----------------------------------------------------------------------------------------
          Arch Pedro A. Solano
          "Save the irradiance map, save the render"
          Vray 3.10.03|3DMax 2011 x64|Intel Core i7-2600 CPU @3.4GHz|16GB Ram|Windows 7 Ultimate SP1
          Follow us on facebook
          Visit us on PSolano

          Comment


          • #6
            Isn't there any way to adjust this script for max 2011?
            I really need it.
            for my blog and tutorials:
            www.alfasmyrna.com

            Comment


            • #7
              The script works fine in 3ds Max 2011, but you need to save it into an actual .ms file in your scripts\startup folder of 3ds Max. Otherwise, you will have to paste the whole thing into a new MaxScript and re-evaluate it each time you want to use it.

              Best regards,
              Vlado
              Last edited by vlado; 28-05-2010, 06:59 AM.
              I only act like I know everything, Rogers.

              Comment


              • #8
                Thanks, I think I have placed it under enu folder before. Now it is working
                for my blog and tutorials:
                www.alfasmyrna.com

                Comment


                • #9
                  I'm having an issue with this script, worked before but now I'm getting:

                  " -- No ""<"" function for undefined "

                  pop up error.

                  Comment


                  • #10
                    I've re run the script, same error with this line highlighted "if (a[1]<b[1]) then return -1;"

                    Comment


                    • #11
                      Is it possible that you have a VRayProxy object with no file name specified?

                      Best regards,
                      Vlado
                      I only act like I know everything, Rogers.

                      Comment


                      • #12
                        Thanks, that worked I had two proxies w/o a file. But now I get this error:

                        "-- Unknown system exception"

                        and it higlights this line of code:

                        format "% : %\n" files[i][1] files[i][2]

                        Thanks Vlado!

                        Comment


                        • #13
                          This one I'm not sure about, the line just prints out some text. You can comment it out (put -- before the format command), re-evaluate the script (with Ctrl+E) and run it again to see if it helps.

                          Best regards,
                          Vlado
                          I only act like I know everything, Rogers.

                          Comment


                          • #14
                            All is well now

                            Thanks again!

                            Comment

                            Working...
                            X