getting Maya's version with python

8,672 views
Skip to first unread message

Panupat Chongstitwattana

unread,
Dec 9, 2011, 2:48:15 AM12/9/11
to python_in...@googlegroups.com
Is there a Python command I can use to get the version of Maya it's
running in? 2010, 2011, 2012 etc.

Kurian O.S

unread,
Dec 9, 2011, 2:56:42 AM12/9/11
to python_in...@googlegroups.com
cmds.about() ?


On Friday, December 9, 2011, Panupat Chongstitwattana <panu...@gmail.com> wrote:
> Is there a Python command I can use to get the version of Maya it's
> running in? 2010, 2011, 2012 etc.
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
>

--
--:: Kurian ::--

Panupat Chongstitwattana

unread,
Dec 9, 2011, 3:08:08 AM12/9/11
to python_in...@googlegroups.com
This one seems to give me a pop up window. Is there a to get the
version into a string without the pop up?

张宇

unread,
Dec 9, 2011, 3:35:24 AM12/9/11
to python_in...@googlegroups.com
from pymel import versions

versions.current()


2011/12/9 Panupat Chongstitwattana <panu...@gmail.com>



--
http://thatboy.me 


Panupat Chongstitwattana

unread,
Dec 9, 2011, 4:07:59 AM12/9/11
to python_in...@googlegroups.com
Thanks!

I also found sys.argv[0] which contains the path to maya.exe. It
depends on where you install your Maya, but the default location will
have 2011, 2012 in the string we can check also.

Kurian O.S

unread,
Dec 9, 2011, 4:24:01 AM12/9/11
to python_in...@googlegroups.com
cmds.about(version=true)

Kurian O.S

unread,
Dec 9, 2011, 4:35:14 AM12/9/11
to python_in...@googlegroups.com

import maya.cmds as cmds

v = cmds.about(version=True)

print v


please check the about command help from maya you can get a lot of data from the help

--
--:: Kurian ::--

cat...@gmail.com

unread,
Oct 21, 2014, 7:25:54 PM10/21/14
to python_in...@googlegroups.com
Mate! Thank you very much! I know this is an old post, but thank you anyway.
Reply all
Reply to author
Forward
0 new messages