MStatus dropped was removed from the Maya Python API since 2011

769 views
Skip to first unread message

san

unread,
Oct 25, 2012, 9:15:41 AM10/25/12
to python_in...@googlegroups.com
Hello,

I watched cmiVFX Python prog vol 2 today, at the point when Justin goes over creating node using Python API  I noticed, he has return OpenMaya.MStatus.kSuccess working in his Maya 2012 when it was removed in 2011 ? and still the node works ??

Paul Molodowitch

unread,
Oct 25, 2012, 9:26:34 AM10/25/12
to python_in...@googlegroups.com
MStatus was removed in the python api 2.0.  It still exists in the C++ api, and in the python 1.0 api.

Check out
for an overview of api 2.0...

If you're writing new code that doesn't need to support/interact with old code that's using the python 1.0 api, I highly suggest using the new 2.0 api.  Its MUCH easier to work with, and has far fewer ways to shoot yourself in the foot.

- Paul

On Thu, Oct 25, 2012 at 6:15 AM, san <niceg...@gmail.com> wrote:
Hello,

I watched cmiVFX Python prog vol 2 today, at the point when Justin goes over creating node using Python API  I noticed, he has return OpenMaya.MStatus.kSuccess working in his Maya 2012 when it was removed in 2011 ? and still the node works ??

Paul Molodowitch

unread,
Oct 25, 2012, 9:27:06 AM10/25/12
to python_in...@googlegroups.com

san

unread,
Oct 25, 2012, 10:31:11 AM10/25/12
to python_in...@googlegroups.com
thanks for the link Paul...

Justin Israel

unread,
Oct 25, 2012, 12:40:13 PM10/25/12
to python_in...@googlegroups.com
I wanted to use the API 1.0 to make sure it was fully compatible to people who were still on Maya 2011. Some studios don't upgrade to the new releases right away. But I figured it's good to learn the API 1.0 now, and then just get excited when they make it easier in 2.0.
Plus, they don't have every single class ported to API 2.0 (last I checked), and you can't mix objects between the API's

Paul Molodowitch

unread,
Oct 25, 2012, 1:22:27 PM10/25/12
to python_in...@googlegroups.com
On Thu, Oct 25, 2012 at 9:40 AM, Justin Israel <justin...@gmail.com> wrote:
I wanted to use the API 1.0 to make sure it was fully compatible to people who were still on Maya 2011. Some studios don't upgrade to the new releases right away. But I figured it's good to learn the API 1.0 now, and then just get excited when they make it easier in 2.0.
Plus, they don't have every single class ported to API 2.0 (last I checked), and you can't mix objects between the API's

All good points... wasn't meaning to criticize your choice of using/teaching 1.0... just wanted to show my appreciation for the hard work Chris + Dean put into the 2.0 api. =)

- Paul
 

Justin Israel

unread,
Oct 25, 2012, 3:10:37 PM10/25/12
to python_in...@googlegroups.com
Totally agree. Its way better, and I always wanted it to be more pythonic. I didn't see it as criticism as all.
Was just pointing out to san, the reason I chose to show API 1.0 example, is all.


--

šãñ

unread,
Oct 25, 2012, 3:49:14 PM10/25/12
to python_in...@googlegroups.com
thanks man for pointing me in the right direction!! but I have to say toward the end of vol2, bonus lesson of PyQT its too much of stuff, the code you went over didnt seemed to fit the scope of 1 video lecture...

although also, thanks for showing blogs of Blarg, Ozgur all I like to see is more and more code.
--

San's personal blog



Reply all
Reply to author
Forward
0 new messages