
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The current limitations of using python in autodesk maya for maya commands. Topics include the requirement to pass fixed arguments individually instead of in tuples, the removal of flag names reserved in python, the lack of stack tracing in the script editor for python, and the need to print results explicitly.
Typology: Study notes
1 / 1
This page cannot be seen from the preview
Don't miss anything!
Python
For this release of Python in Maya, fixed arguments to Maya commands (for example, the x, y and z values for maya.cmds.move()) must be passed as individual arguments and cannot be packed into a tuple. Flag names or short forms of flags in Maya commands that are reserved words in Python have been removed from the Maya Python command syntax. For example: “is” is a reserved keyword in Python, and is is not a valid short form flag name. Only the long form of the flag is valid (for example, internalSet for the addAttr command). “break” is a reserved keyword in Python, and is not a valid long form flag. Only the short form of the flag is valid (for example, b for the uvLink and linkLink commands). Stacktracing (in the Script Editor, History > Show Stack Trace) only works for MEL. The stackTrace command was created for MEL to provide what Python does by default. Executing single Python commands echoes results to the Script editor, but executing several Python commands in the Script editor does not. This is a property of embedded Python. To see the returned results, you must explicitly print them.