Go to: Synopsis. Return value. Keywords. Flags. Python examples.
format([stringArg=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
format is NOT undoable, NOT queryable, and NOT editable.
This command takes a format string, where the format string contains format specifiers. The format specifiers have a number associated with them relating to which parameter they represent to allow for alternate ordering of the passed-in values for other languages by merely changing the format string| string |
| Long name (short name) | Argument types | Properties | ||
|---|---|---|---|---|
stringArg(s)
|
string
|
|
||
|
||||
import maya.cmds as cmds
# The mel script below returns the sentence
# "Display all lambert and blinn nodes."
#
cmds.format( 'Display all ^1s and ^2s nodes.', stringArg=('lambert', 'blinn') )