Announcement

Collapse
No announcement yet.

Get Vray Version programatically?

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

  • Get Vray Version programatically?

    Is there a way to get the installed VRay version through a python script? I don't see an ENV Variable or a Registry Key.
    Gavin Greenwalt
    im.thatoneguy[at]gmail.com || Gavin[at]SFStudios.com
    Straightface Studios

  • #2
    I found you could run vray.exe -version and then regex the stdout but is there a better approach?
    Gavin Greenwalt
    im.thatoneguy[at]gmail.com || Gavin[at]SFStudios.com
    Straightface Studios

    Comment


    • #3
      With maxscript you could use:
      vrayversion()

      or you could use:
      getFileVersion("$max/plugins/vrender2016.dlr")
      (assuming you're checking in 2016)

      They format the output slightly different
      Last edited by Morne; 06-03-2018, 05:23 AM.
      Kind Regards,
      Morne

      Comment


      • #4
        For the newest V-Ray versions (3.6.x) you can parse the first line from vraylog.txt file, located in %TEMP% in Windows, the version is stated in that line.

        Ivan Slavchev

        SysOps

        Chaos Group

        Comment


        • #5
          Thanks Ivan. How long does that %TEMP%\vraylog.txt file last though? And is it created without any renders being done? I'm trying to keep tabs on rendernode version numbers (so maxscript is out too). I have a solution using the exe -version flag. But it's a little slow.
          Gavin Greenwalt
          im.thatoneguy[at]gmail.com || Gavin[at]SFStudios.com
          Straightface Studios

          Comment


          • #6
            The vrayVersion() MaxScript command is the best way to get the exact version. It is available in V-Ray 3.6 as well.

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

            Comment


            • #7
              Originally posted by im.thatoneguy View Post
              Thanks Ivan. How long does that %TEMP%\vraylog.txt file last though? And is it created without any renders being done? I'm trying to keep tabs on rendernode version numbers (so maxscript is out too). I have a solution using the exe -version flag. But it's a little slow.
              The log is created when you start 3dsMax with V-Ray installed and is re-created on every 3dsMax start. It'll stay in the folder unless it's deleted on purpose.
              Ivan Slavchev

              SysOps

              Chaos Group

              Comment

              Working...
              X