

(The dictionary is applied to the string later, before it is executed. The format operation is passed a dictionary of items for the substitution where the names of the values are 1, 2, and so on. However, Python’s format operator is used to do the substitutions. If the callback is a string which is to be evaluated, then Maya does string substitution as in MEL. The value of the float slider is substituted for this positional argument when the callback is run.įor Python, two different ways of substituting values from controls in callbacks are supported. For example, the callback MEL script for a float slider control could contain #1.

Positional arguments refer to the arguments that UI elements pass to their callback scripts. Python: skinCluster (q=True, inf='joint1', dr=True) Query where a flag/argument does not take a value Query where a flag/argument takes a value MEL: move -objectSpace 2.0 1.0 1.0 nurbsSphere1

The same as MEL except arguments must come first (You can also use a tuple or tuples, a list of lists, or a tuple of lists.) Use a list to hold the multiple flag values MEL: ls -type nurbsSurface -type transform Use a tuple to specify multiple arguments All old flags have been left in place.įlags with no arguments get a boolean True/False switch In all cases, the flags are backwards compatible. The use of all of these flags is documented in the CommandsPython reference documentation.

