ジャンプ先: 概要. 戻り値. フラグ. Python 例.

概要

scriptEditorInfo([clearHistory=boolean], [clearHistoryFile=boolean], [historyFilename=string], [input=string], [suppressErrors=boolean], [suppressInfo=boolean], [suppressResults=boolean], [suppressStackWindow=boolean], [suppressWarnings=boolean], [writeHistory=boolean])

注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。

scriptEditorInfo は、取り消し可能、照会可能、および 編集可能 です。

Command Window ウィンドウの内容を直接操作と照会するには、このコマンドを使用します。

注: 最近の変更により、一部のフラグはスクリプト エディタ(Script Editor)ウィンドウで動作しなくなりました。CommandWindow (旧スクリプト エディタ)では、すべてのフラグが引き続き動作します。

注: このコマンドを使用して新しいスクリプト エディタ ウィンドウを作成することはできません。

戻り値

string返された Command Window ウィンドウの名前。

照会モードでは、戻り値のタイプは照会されたフラグに基づきます。

フラグ

clearHistory, clearHistoryFile, historyFilename, input, suppressErrors, suppressInfo, suppressResults, suppressStackWindow, suppressWarnings, writeHistory
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
clearHistory(ch) boolean edit
Command Window の上部のフィールド内で読み取り専用のテキストをクリアします。
input(i) string edit
Command Window の下部のフィールド内でテキストを設定します。フィールドをクリアするため、この値は空の文字列に設定します。注: このフラグは Command Window にのみ作用し、新しいスクリプト エディタには作用しません。新しいスクリプト エディタを操作する方法については、cmdScrollFieldExecuter と cmdScrollFieldReporter のマニュアルを参照してください。
historyFilename(hfn) string queryedit
Command Window がすべてのヒストリをエコーするために使用するファイル名を設定するか返します。-wh/writeHistory フラグが true に設定されているときにこれが空の文字列である場合、既定のファイルに自動的に設定されます。
writeHistory(wh) boolean queryedit
true の場合、Command Window はヒストリをすべて -hf/historyFilename フラグに定義されたファイルに返します。このフラグは、ファイルの書き込みを効果的にオン/オフにします。
clearHistoryFile(chf) boolean edit
-wh/writeHistory が true の場合にのみ、-hf/historyFilename フラグによって定義されているファイルをクリアします。新しいヒストリ ファイルを開始するには、このフラグを使用します。Command Window の既定の動作は、既存のファイルへのアペンドです。
suppressErrors(se) boolean queryedit
true の場合、Command Window とスクリプト エディタにはエラー メッセージが表示されません。
suppressWarnings(sw) boolean queryedit
true の場合、Command Window とスクリプト エディタには警告メッセージが表示されません。
suppressInfo(si) boolean queryedit
true の場合、Command Window とスクリプト エディタには Maya によって生成された情報メッセージが表示されません。
suppressResults(sr) boolean queryedit
true の場合、Command Window とスクリプト エディタにはコマンドの結果が表示されません。
suppressStackWindow(ssw) boolean queryedit
このフラグが true で stackTrace メカニズムがオンになっている場合、スタック ウィンドウの表示が抑制されます。スタック トレースを有効にすると、独立したスタック ウィンドウの代わりに出力ウィンドウに結果が返されます。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。

Python 例

import maya.cmds as cmds

# Set the text of the input area of the Script Editor.
cmds.scriptEditorInfo(input='// select -all; delete;')
# Clear the input area of the Script Editor.
cmds.scriptEditorInfo(input="")
# Begin recording the Script Editor history to a file called
# tempHistoryLog.txt in your maya directory.
cmds.scriptEditorInfo( historyFilename='tempHistoryLog.txt', writeHistory=True )
# Stop recording the Script Editor history
cmds.scriptEditorInfo(writeHistory=False )
# On Windows the following line would print something like "C:/maya/tempHistoryLog.txt"
# On Linux it would be "~/maya/tempHistoryLog.txt"
cmds.scriptEditorInfo(query=True, historyFilename=True)
# Suppress all warning and info messages
cmds.scriptEditorInfo(suppressWarnings=True)
cmds.scriptEditorInfo(suppressInfo=True)