Announcement

Collapse
No announcement yet.

Maxscript: Is Vray Installed?

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

  • Maxscript: Is Vray Installed?

    What would be a good maxscript method for determining if Vray is installed? Not if vray is the current renderer, just to see if the renderer is even installed on the system? Thanks.

    - Neil

  • #2
    This is what I have so far BTW:

    fn sLibVrayTest =
    (
    disableSceneRedraw()
    answer = true
    s = for obj in selection collect obj
    try (testCam = VRayPhysicalCamera())
    catch (answer = false)
    delete testCam
    if s != #() then select s
    enableSceneRedraw()
    completeRedraw()
    return answer
    )

    But there's gotta be something cleaner than that.

    - Neil

    Comment


    • #3
      Why so complicated? You could simply check if one of the MaxScript global functions provided by V-Ray is different from "undefined". There are a number of these that you can use - see here for a list: http://help.chaosgroup.com/vray/help..._maxscript.htm

      So your code could be something like this:
      Code:
      fn sLibVrayTest =
      (
        return (doVRayObjectProperties!=undefined)
      )
      Best regards,
      Vlado
      I only act like I know everything, Rogers.

      Comment


      • #4
        Originally posted by vlado View Post
        Why so complicated?
        That's why I asked, I assumed there was an easier thing I could test for, I just didn't know what it was. Thanks Vlado!

        - Neil

        Comment


        • #5
          Hey Neil

          Totally off topic.
          Love the new avatar, just recently broke out some of my childhood books for my daughter who is 6, including Wheedle on the Needle.
          Gavin Jeoffreys
          Freelance 3D Generalist

          Comment


          • #6
            Actually, been using this Avatar for over a decade on various sites. But yes, I love the Wheedle, glad you're passing on the book to your daughter. Plan on doing the same when my daughter is a bit older.

            - Neil

            Comment


            • #7
              I always did this way, though some maxscript files could retain while vray being uninstalled...
              Code:
              fn isVrayInstalled = not Vray==undefined

              Comment

              Working...
              X