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

概要

cmdScrollFieldExecuter([appendText=string], [autoCloseBraces=boolean], [clear=boolean], [commandCompletion=boolean], [copySelection=boolean], [currentLine=uint], [cutSelection=boolean], [execute=boolean], [executeAll=boolean], [filterKeyPress=script], [hasFocus=boolean], [hasSelection=boolean], [insertText=string], [load=boolean], [loadContents=string], [numberOfLines=uint], [objectPathCompletion=boolean], [pasteSelection=boolean], [redo=boolean], [removeStoredContents=string], [replaceAll=[string, string]], [saveSelection=string], [saveSelectionToShelf=boolean], [searchAndSelect=boolean], [searchDown=boolean], [searchMatchCase=boolean], [searchString=string], [searchWraps=boolean], [select=[uint, uint]], [selectAll=boolean], [selectedText=boolean], [showLineNumbers=boolean], [showTooltipHelp=boolean], [source=boolean], [sourceType=string], [spacesPerTab=uint], [storeContents=string], [tabsForIndent=boolean], [text=string], [textLength=boolean], [undo=boolean])

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

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

Maya に対してスクリプト コマンドを発行するために使用するスクリプト エディタ エクゼキュータ コントロールです。

戻り値

stringエクゼキュータ コントロールの名前

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

フラグ

appendText, autoCloseBraces, clear, commandCompletion, copySelection, currentLine, cutSelection, execute, executeAll, filterKeyPress, hasFocus, hasSelection, insertText, load, loadContents, numberOfLines, objectPathCompletion, pasteSelection, redo, removeStoredContents, replaceAll, saveSelection, saveSelectionToShelf, searchAndSelect, searchDown, searchMatchCase, searchString, searchWraps, select, selectAll, selectedText, showLineNumbers, showTooltipHelp, source, sourceType, spacesPerTab, storeContents, tabsForIndent, text, textLength, undo
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
load(ld) boolean createedit
このフィールドにロードするスクリプトを要求するプロンプトが表示されます。
source(src) boolean createedit
ソース スクリプトを要求するプロンプトが表示されます(ロードせずに実行)。
saveSelection(sv) string createedit
現在の選択項目をファイルに保存することを求めるプロンプトを表示します。指定した文字列の前に既定のファイル名プロンプトが追加されます。
saveSelectionToShelf(svs) boolean createedit
現在の選択項目をシェルフの項目に保存することを求めるプロンプトを表示します。
selectAll(sla) boolean createedit
すべてのテキストを選択します。
select(sl) [uint, uint] createedit
指定範囲内のテキストを選択します。
hasSelection(hsl) boolean query
現在、このコントロールに選択項目があるかどうかです。
selectedText(slt) boolean query
現在の選択範囲内のテキストです。
clear(clr) boolean createedit
フィールドをクリアします。
text(t) string createqueryedit
フィールド テキストを指定した文字列に置き換えます。
textLength(tl) boolean query
このテキスト フィールドの文字数です。
cutSelection(ct) boolean createedit
このフィールドから現在の選択項目をカットします。
copySelection(cp) boolean createedit
このフィールドから現在の選択項目をコピーします。
pasteSelection(pst) boolean createedit
現在のキャレット位置で、このフィールドにテキストをペーストします。
hasFocus(hf) boolean query
現在このコントロールにフォーカスがあるかどうかです。
undo(ud) boolean createedit
最後の操作を元に戻します。
redo(rd) boolean createedit
最後の操作をやり直します。
execute(exc) boolean createedit
現在の選択項目を実行します。項目が選択されていない場合、すべてのテキストを実行します。
executeAll(exa) boolean createedit
すべてのテキストを実行します。
storeContents(stc) string createedit
ファイル パスの完全な文字列が指定された場合は、このフィールドの内容がそのパスに格納されます。不完全なパス名の場合は、提供された文字列はファイル名のみに使用され、-loadContents および -removeStoredContents フラグの場合と同じように、内部で生成されたファイルのパスと拡張子が使用されます。いずれにしても、指定した名前が既に存在する場合は、固有のファイル名が新たに生成されます。完了時には、保存したファイルのファイル名を返します。完了しなかった場合は、空の文字列を返します。
loadContents(ldc) string createedit
指定したファイル名のファイルの内容をこのフィールドにロードします。このファイル名のパスと拡張子は、内部で指定されます。このコマンドは、この実行フィールドのこれまでのインスタンスに今回の内容をロードすることのみを目的とします。
removeStoredContents(rsc) string createedit
指定したファイル名で格納されているこのフィールドの内容を除去します。ファイルのパスと拡張子は、内部で指定されます。このコマンドは、この実行フィールドにこれまで格納された内容を除去することのみを目的とします。
appendText(at) string createedit
このフィールドの最後にテキストをアペンドします。
insertText(it) string createedit
指定したテキストをカーソルの位置に挿入し、現在選択されているテキストと置き換えます。選択範囲とカーソル位置は、select フラグを使用して設定できます。このフィールドの最後にテキストをアペンドします。
sourceType(st) string createquery
このコマンド エクゼキュータ フィールドのソース タイプを設定します。有効な値は「mel」(既定で有効)と「python」です。
showLineNumbers(sln) boolean createqueryedit
行番号カラムを表示/非表示にします。
commandCompletion(cco) boolean createqueryedit
コマンド完了を有効化/無効化します。
objectPathCompletion(opc) boolean createqueryedit
パス完了を有効化/無効化します。
showTooltipHelp(sth) boolean createqueryedit
コマンド実行ウィンドウのツール ヒントを有効化/無効化します。
searchDown(sd) boolean createqueryedit
カーソルの上下どちらを検索するかを指定します。
searchMatchCase(smc) boolean createqueryedit
検索で大文字/小文字を区別するかどうかを指定します。
searchWraps(sw) boolean createqueryedit
検索の先頭に戻るかどうかを指定します。
searchString(ss) string createqueryedit
検索する文字列を指定します。
searchAndSelect(sas) boolean query
指定した検索オプションを使用して指定した検索文字列を検索(と選択)します。
replaceAll(rpa) [string, string] createedit
フィールド テキスト内の最初の文字列のすべてのインスタンスを 2 番目の文字列に置き換えます。この操作で大文字小文字を区別するかどうかは
-searchMatchCase
フラグで設定します。
currentLine(cl) uint createqueryedit
カーソルがある現在行を設定/返します。
numberOfLines(nl) uint query
文書の総行数を返します。
spacesPerTab(spt) uint createqueryedit
1 つのタブ位置に相当するスペースの数を指定します(既定=4)。
filterKeyPress(fkp) script createqueryedit
キーを押したときのイベントを処理するために呼び出すスクリプトを設定します。この関数には以下のシグニチャが必要です。
proc int filterKeyPress(int $modifiers, string $key)

モディファイア:ビット マスクは Shift がビット 1、Ctrl がビット 3、Alt がビット 4、Windows キーボードでは「Windows」キー、Mac キーボードではコマンド キーがビット 5 です。
キー:押下するキーを指定します。キーは単一の ASCII 文字または特殊なキーボード文字のキーワード文字列の 1 つです。例: Up、Down、Right、Left、Home、End、age_Up、Page_Down、Insert Return、Space F1 ~ F12 です。
この関数は、キー イベントが処理されたことを示す 1、または処理されなかったことを示す 0 を返します。

tabsForIndent(tfi) boolean createqueryedit
インデントの際にタブ記号を表示するかどうかを指定します(既定 = オン)。
autoCloseBraces(acb) boolean createqueryedit
開き括弧の入力後、自動的に閉じ括弧を追加するか指定します。(既定 = オン)。

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

Python 例

import maya.cmds as cmds

# this will create a tiny window with a Mel command executer.
cmds.window()
cmds.columnLayout()
cmds.cmdScrollFieldExecuter(width=200, height=100)
cmds.showWindow()
# this will create a tiny window with a Python command executer.
cmds.window()
cmds.columnLayout()
cmds.cmdScrollFieldExecuter(width=200, height=100, sourceType="python")
cmds.showWindow()