Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

commandEcho([addFilter=[string,...]], [filter=[string,...]], [lineNumbers=boolean], [state=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

commandEcho is undoable, queryable, and NOT editable.

This command controls what is echoed to the command window.

Return value

None

In query mode, return type is based on queried flag.

Flags

addFilter, filter, lineNumbers, state
Long name (short name) Argument types Properties
state(st) boolean createquery
If true then all commands are echoed to the command window. If false then only relevant commands are echoed.
filter(f) [string,...] createquery
This flag allows you to filter out unwanted commands when echo all commands is enabled. You can provide a partial command name, so all commands that start with a substring specified in filter entry will be filtered out. If filter is empty, all commands are echoed to the command window.
addFilter(af) [string,...] create
This flag allows you to append filters to the current list of filtered commands when echo all commands is enabled. Just like the filter flag, you can provide a partial command name, so all commands that start with a substring specified in the addFilter entry will be filtered out.
lineNumbers(ln) boolean createquery
If true then file name and line number information is provided in error and warning messages. If false then no file name and line number information is provided in error and warning messages.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# Echo everything
cmds.commandEcho( state=True )
# Go back to normal
cmds.commandEcho( state=False )
# Display line number information in messages.  This is the default.
cmds.commandEcho( lineNumbers=True )
# Do not display line number information in messages.
cmds.commandEcho( lineNumbers=False )
# Do not display changeToolIcon, escapeCurrentTool or autoUpdateAttrEd commands when echoing everything
cmds.commandEcho( filter=('changeToolIcon', 'escapeCurrentTool', 'autoUpdateAttrEd') );
# Do not display setLastFocusedCommandReporter or setLastFocusedCommandExecuter when echoing everything
cmds.commandEcho( filter=('setLastFocusedCommand') );
#  Add to the current filter
cmds.commandEcho( addFilter=('addToolIcon') );