mrv.maya.env
Covered: 21 lines
Missed: 1 lines
Skipped 8 lines
Percent: 95 %
 2
"""
 3
Allows to query the maya environment, like variables, version numbers and system
 4
paths.
 5
"""
 6
__docformat__ = "restructuredtext"
 8
from maya import cmds
10
__all__ = ("appVersion", )
12
def appVersion( ):
13
	"""
14
	:return: tuple( float( version ), int( bits ), string( versionString ) ), the
15
		version will be truncated to *not* include sub-versions
16
	:note: maya.cmds.about() will crash if called with an external interpreter
17
	"""
18
	bits = 32
19
	if cmds.about( is64=1 ):
20
		bits = 64
22
	versionString = cmds.about( v=1 )
23
	version = versionString.split( ' ' )[0]
24
	if version.find( '.' ) != -1:
25
		version = version[0:3]
28
	version = float( version )
29
	return ( version, bits, versionString )