Announcement

Collapse
No announcement yet.

VRay version & maxscript.

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

  • VRay version & maxscript.

    Help me, please, how to check up version of VRay with maxscript?

    (sorry for my bad English)
    V-RayMax Converter PRO
    MAXTools

  • #2
    the var/command/whatever:
    renderers.current

    returns this:
    VRay_Adv_1_09_03n:VRay_Adv_1_09_03n

    you can get it as a string with the (renderers.current as string)..
    and you can search it for say Adv by using the

    findstring (renderers.current as string) "Adv"

    from there you can check it like..

    If (findstring (renderers.current as string) "Adv") != undefined then
    (
    --do whatever you wanted to lock only to the Adv version here..
    )

    good luck.
    Dave Buchhofer. // Vsaiwrk

    Comment


    • #3
      Big thank, dbuchhofer You have very much helped me!

      I tried to receive version VRay with fallowing command:

      vray ()

      For what it is intended and in what cases of her it is possible to apply?
      V-RayMax Converter PRO
      MAXTools

      Comment


      • #4
        If (findstring (renderers.current as string) "Adv") != undefined then
        (
        --do whatever you wanted to lock only to the Adv version here..
        )
        It shows the version current renderer. How it is possible to receive version VRay if it is not chosen as current renderer? Whether how to receive it is installed VRay and if it is installed - what his version? Excuse for additional questions.
        V-RayMax Converter PRO
        MAXTools

        Comment


        • #5
          Hi 3dZver nice to see you here. You can find out whether Vray is installed by finding any vray-related file, for example VRender60.dlr in Plugins directory

          Comment


          • #6
            to see which vray is installed i believe you do something like this (I may be wrong.. can check once i get back to work.) anyway, searching for a few of these terms in the maxscript help will set you on the right track.

            Code:
            rendererlist = rendererClass.classes 
            -- returns all the installed renderers as an array
            
            for i = 1 to rendererlist.count where (findstring (rendererlist[i] as string) "Vray") != undefined do vrayClass = i
             -- loop through the array until it finds a rendererclass that is Vray.. and mark down that  index..
            
            rendererlist [vrayClass] 
            -- that will be the last entry in the list that has the word "Vray" inside it.
            Dave Buchhofer. // Vsaiwrk

            Comment


            • #7
              Hi COOPER! I too am glad to see you here. Thank for your advice, but it is a little not that it is necessary for me. dbuchhofer has understood me correctly and has very much helped me.

              Many thanks to you dbuchhofer!

              The most simple way to receive the version installed VRay:

              vray ()

              V-RayMax Converter PRO
              MAXTools

              Comment


              • #8
                Yea, I think i misunderstood the question But mabye it'll help someone someday to apply vray as the renderer through maxscript.. Hehe.
                Dave Buchhofer. // Vsaiwrk

                Comment

                Working...
                X