Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Current Limitations of Python in Maya - Prof. Malcolm Kesson, Study notes of Typography

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

Pre 2010

Uploaded on 08/04/2009

koofers-user-d6i-2
koofers-user-d6i-2 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Python
Current limitations
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.

Partial preview of the text

Download Current Limitations of Python in Maya - Prof. Malcolm Kesson and more Study notes Typography in PDF only on Docsity!

Python

Current limitations

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.