Use this command to directly manipulate and query the contents of the Command Window window. Note: Due to recent changes, certain flags will no longer work on the Script Editor Window. All flags will continue to work with the CommandWindow (old Script Editor).Note: This command cannot be used to create a new script editor window.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
clearHistory (ch) | bool | ||
|
|||
clearHistoryFile (chf) | bool | ||
Clear the file defined by the -hf/historyFilename flag, but only if -wh/writeHistory is true. Use this flag to start a new history file, since the default behaviour of the Command Window is to append to the existing file. |
|||
historyFilename (hfn) | unicode | ||
Sets or returns the name of the file that the Command Window will use to echo all of its history to. If this is an empty string when the -wh/writeHistory flag is set to true, then it will automatically be set to the default file. |
|||
input (i) | unicode | ||
Sets the text in the lower field of the Command Window. Set this value to an empty string to clear the field. Note: this flag only affects the Command Window and not the new script editor. To find out how to manipulate the new script editor please refer to the documentation on the cmdScrollFieldExecuter and cmdScrollFieldReporter. |
|||
suppressErrors (se) | bool | ||
|
|||
suppressInfo (si) | bool | ||
|
|||
suppressResults (sr) | bool | ||
|
|||
suppressStackWindow (ssw) | bool | ||
When true and when the stackTrace mechanism is on, this flag will suppress the display of the stack window. If stack trace is enabled then results will be returned to the output window instead of a separate stack window. Flag can have multiple arguments, passed either as a tuple or a list. |
|||
suppressWarnings (sw) | bool | ||
|
|||
writeHistory (wh) | bool | ||
|
Derived from mel command maya.cmds.scriptEditorInfo
Example:
import pymel.core as pm
# Set the text of the input area of the Script Editor.
pm.scriptEditorInfo(input='// select -all; delete;')
# Result: u'CommandWindow' #
# Clear the input area of the Script Editor.
pm.scriptEditorInfo(input="")
# Result: u'CommandWindow' #
# Begin recording the Script Editor history to a file called
# tempHistoryLog.txt in your maya directory.
pm.scriptEditorInfo( historyFilename='tempHistoryLog.txt', writeHistory=True )
# Result: u'CommandWindow' #
# Stop recording the Script Editor history
pm.scriptEditorInfo(writeHistory=False )
# Result: u'CommandWindow' #
# On Windows the following line would print something like "C:/maya/tempHistoryLog.txt"
# On Linux it would be "~/maya/tempHistoryLog.txt"
pm.scriptEditorInfo(query=True, historyFilename=True)
# Result: u'/Users/chad/Library/Preferences/Autodesk/maya/tempHistoryLog.txt' #
# Suppress all warning and info messages
pm.scriptEditorInfo(suppressWarnings=True)
# Result: u'CommandWindow' #
pm.scriptEditorInfo(suppressInfo=True)
# Result: u'CommandWindow' #