Re: [Maya-Python] Digest for python_inside_maya@googlegroups.com - 16 Messages in 6 Topics

9 views
Skip to first unread message

郭金锋

unread,
Mar 8, 2013, 2:20:31 AM3/8/13
to python_in...@googlegroups.com
Hi guys,
Since Maya has introduced Python API 2.0, but not having all classes in 1.0, is there any tips for starters to manage well between 1.0 and 2.0? 
e.g. Is it always better to import maya.api.*** when possible? 
Is there any syntax difference when using same classes in between using 1.0 and 2.0?

Justin Israel

unread,
Mar 8, 2013, 3:32:10 AM3/8/13
to python_in...@googlegroups.com
The Maya Python Api 2.0 doc has a list of notes detailing the differences:

The main syntax differences would be where they use return types instead of pointer/reference parameters, and python attributes instead of getter/setters

If you need to use both, because of the lack of completeness in the 2.0 package, it would be good to keep them imported to distinct namespaces, to avoid mixing objects:

import maya.api.OpenMaya as om2  # or something like this




--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To post to this group, send email to python_in...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages