Results 1 to 3 of 3

Thread: grap mental ray Version via python

  1. #1
    Join Date
    Jun 2012
    Location
    Germany / Munich
    Posts
    39

    Default grap mental ray Version via python

    Hi Pros,

    …once again,

    I am looking for a python command to check which MR-Version my Maya is using.
    The Outliner tells me when I start Maya, but I want to use a script to give this
    Information via XML to our render-queue-manager.

    Outliner:
    Code:
    mental ray for Maya 2013 
    mental ray: version 3.10.1.4, Jan 31 2012, revision 165283
    can you help me out, and tell me the python command to grap the MR-Version.
    For the Maya-Version I can use something like:

    Code:
    import maya.cmds as cmds
    
    getMRVersion = int(cmds.about(version=True)[:4])
    print getMRVersion
    Thanks,

    Cheers, 5inch
    Last edited by 5inch; July 26th, 2012 at 10:57.
    ...It isn’t about how hard you hit, it's about how hard you can get hit and keep moving forward. How much can you take and keep moving forward? That's how winning is done.----Rocky Balboa

  2. #2
    Join Date
    Jun 2012
    Location
    Germany / Munich
    Posts
    39

    Default

    ok, i found this one:

    http://download.autodesk.com/us/maya...luginInfo.html

    import maya.cmds as cmds

    # List the plugins that are currently loaded
    cmds.pluginInfo( query=True, listPlugins=True )
    ...It isn’t about how hard you hit, it's about how hard you can get hit and keep moving forward. How much can you take and keep moving forward? That's how winning is done.----Rocky Balboa

  3. #3
    Join Date
    Jun 2012
    Location
    Germany / Munich
    Posts
    39

    Default grap mental ray Version via python

    Ok, I found it on my own,
    Sorry for the easy question, cheers, 5inch


    Code:
    import maya.cmds as cmds
    
    # List the plugins that are currently loaded
    plugin = cmds.pluginInfo( query=True, listPlugins=True, version=True )
    mrplugin = 'Mayatomr'
    
    for i in plugin:
        print i
    
    if mrplugin in plugin:
        print 'yes, there is MR', '\n'
        mrPlugin = cmds.pluginInfo( 'Mayatomr.mll',query=True, version=True )
        print mrPlugin
        
    elif mrplugin not in plugin:
        print '\n', 'no, MR loaded'
    ...It isn’t about how hard you hit, it's about how hard you can get hit and keep moving forward. How much can you take and keep moving forward? That's how winning is done.----Rocky Balboa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •