def mayaVersion(): """Returns maya's currently active maya version ie. 2016 :return: maya version :rtype: int """ return int(MGlobal.mayaVersion())
if extension and (ma.group('ext') is not None): version += "-" + ma.group('ext') return version def bitness(): """ The bitness of python running inside Maya as an int. """ # NOTE: platform.architecture()[0] returns '64bit' on OSX 10.6 (Snow Leopard) # even when Maya is running in 32-bit mode. The struct technique # is more reliable. return struct.calcsize("P") * 8 _is64 = bitness() == 64 _current = _MGlobal.apiVersion() _fullName = _MGlobal.mayaVersion() _shortName = parseVersionStr(_fullName, extension=False) _installName = _shortName + ('-x64' if (_is64 and _current < 201600) else '') v85 = 200700 v85_SP1 = 200701 v2008 = 200800 v2008_SP1 = 200806 v2008_EXT2 = 200806 v2009 = 200900 v2009_EXT1 = 200904 v2009_SP1A = 200906 v2010 = 201000 v2011 = 201100 v2011_HOTFIX1 = 201101
return version def bitness(): """ The bitness of python running inside Maya as an int. """ # NOTE: platform.architecture()[0] returns '64bit' on OSX 10.6 (Snow Leopard) # even when Maya is running in 32-bit mode. The struct technique # is more reliable. return struct.calcsize("P") * 8 _is64 = bitness() == 64 _current = _MGlobal.apiVersion() _fullName = _MGlobal.mayaVersion() _shortName = parseVersionStr(_fullName, extension=False) _installName = _shortName + ('-x64' if _is64 else '') v85 = 200700 v85_SP1 = 200701 v2008 = 200800 v2008_SP1 = 200806 v2008_EXT2 = 200806 v2009 = 200900 v2009_EXT1 = 200904 v2009_SP1A = 200906 v2010 = 201000 v2011 = 201100 v2011_HOTFIX1 = 201101 v2011_HOTFIX2 = 201102