scriptCtx [-baseClassName string] [-cumulativeLists boolean] [-enableRootSelection boolean] [-exitUponCompletion boolean] [-expandSelectionList boolean] [-finalCommandScript script] [-forceAddSelect boolean] [-ignoreInvalidItems boolean] [-lastAutoComplete boolean] [-setAllowExcessCount boolean] [-setAutoComplete boolean] [-setAutoToggleSelection boolean] [-setDoneSelectionPrompt string] [-setNoSelectionHeadsUp string] [-setNoSelectionPrompt string] [-setSelectionCount int] [-setSelectionHeadsUp string] [-setSelectionPrompt string] [-showManipulators boolean] [-title string] [-toolCursorType string] [-toolFinish script] [-toolStart script] [-totalSelectionSets int]
string
scriptCtx は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。
このコマンドを使用すると、ユーザはセレクション ツールに基づいて独自のツールを作成することができます。多数のセレクション リストを収集する、選択項目の動作やセレクション マスクは完全にカスタマイズできるなどが可能です。 このコマンドは、実行前に処理されます。キーワード「$Selection#」(# は 1 以上の数字)には、セレクション セットを指定します。コンテキストには、$Selection# キーワードの代わりに置き換えられる複数のセレクション セットを MEL 文字配列の形式で指定することができます。セットごとに固有の項目をセットに指定する場合は、各セットで指定する必要があります。下記の例を参照してください。 さらに、作成するセレクションのタイプを指定するために、「selectType」コマンドのセレクション タイプ フラグをここで使用することができます。| string | コンテキスト名 |
戻り値の型は照会モードでは照会フラグが基になります。
| ロング ネーム(ショート ネーム) | 引数型 | プロパティ | ||
|---|---|---|---|---|
-title(-t)
|
string
|
|
||
|
||||
-finalCommandScript(-fcs)
|
script
|
|
||
|
||||
-toolStart(-ts)
|
script
|
|
||
|
||||
-toolFinish(-tf)
|
script
|
|
||
|
||||
-toolCursorType(-tct)
|
string
|
|
||
|
||||
-totalSelectionSets(-tss)
|
int
|
|
||
|
||||
-cumulativeLists(-cls)
|
boolean
|
|
||
|
||||
-expandSelectionList(-esl)
|
boolean
|
|
||
|
||||
-showManipulators(-sm)
|
boolean
|
|
||
|
||||
-enableRootSelection(-ers)
|
boolean
|
|
||
|
||||
-ignoreInvalidItems(-iii)
|
boolean
|
|
||
|
||||
-exitUponCompletion(-euc)
|
boolean
|
|
||
|
||||
-baseClassName(-bcn)
|
string
|
|
||
|
||||
-lastAutoComplete(-lac)
|
boolean
|
|
||
|
||||
-forceAddSelect(-fas)
|
boolean
|
|
||
|
||||
-setNoSelectionPrompt(-snp)
|
string
|
|
||
|
||||
-setSelectionPrompt(-ssp)
|
string
|
|
||
|
||||
-setDoneSelectionPrompt(-dsp)
|
string
|
|
||
|
||||
-setNoSelectionHeadsUp(-snh)
|
string
|
|
||
|
||||
-setSelectionHeadsUp(-ssh)
|
string
|
|
||
|
||||
-setSelectionCount(-ssc)
|
int
|
|
||
|
||||
-setAllowExcessCount(-sae)
|
boolean
|
|
||
|
||||
-setAutoComplete(-sac)
|
boolean
|
|
||
|
||||
-setAutoToggleSelection(-sat)
|
boolean
|
|
||
|
||||
// Simple example of "attach curve" tool created using scriptCtx. This tool
// prompts the user to select two curves to attach. As soon as two curves
// are selected, the attach is performed. It uses the selection type
// flag 'curveParameterPoint' from "selectType" command to specify the
// selection mask for this tool.
scriptCtx
-title "Attach Curve"
-totalSelectionSets 1
-fcs "select -r $Selection1; performAttachCrv 0;"
-cumulativeLists true
-expandSelectionList true
-setNoSelectionPrompt "Select two curves close to the attachment points"
-setSelectionPrompt "Select a second curve close to the attachment point"
-setDoneSelectionPrompt "Never used because setAutoComplete is set"
-setAutoToggleSelection true
-setSelectionCount 2
-setAutoComplete true
-curveParameterPoint true
attachTool;
// And a more complex example of fillet blend tool (two sets of any number
// of "surface curves"). Notice how the selection lists are passed as
// arguments to the callback function, performBlendGiven.
scriptCtx
-i1 "blendSurface.xpm"
-title "Fillet Blend Tool"
-toolCursorType "edit"
-totalSelectionSets 2
-cumulativeLists false
-showManipulators true
-expandSelectionList true
-fcs ("performBlendGiven $Selection1 $Selection2")
-setNoSelectionPrompt ("Select left edge surface curves.")
-setSelectionPrompt ("Select additional surface curves for " +
"the left edge or hit ENTER to start " +
"the right edge selection.")
-setAutoToggleSelection true
-setAutoComplete false
-setSelectionCount 0
-isoparm true
-curveOnSurface true
-surfaceEdge true
-setNoSelectionPrompt "Select right edge surface curves."
-setSelectionPrompt ("Select additional surface curves " +
"for the right edge or hit " +
"ENTER to compute blend.")
-setAutoToggleSelection true
-setAutoComplete false
-setSelectionCount 0
-isoparm true // selectType flag
-curveOnSurface true // selectType flag
-surfaceEdge true // selectType flag
blendContext;
// Here's Birail 3+ where you select any number of curves, then 2 rails:
scriptCtx
-i1 "birail3Gen.xpm"
-title "Birail 3+ Tool"
-toolCursorType "edit"
-totalSelectionSets 2
-cumulativeLists true
-expandSelectionList true
-fcs ("select -r $Selection2; " +
"performBirail 0 3 \"birailThreePlusProfileContext\"")
-setNoSelectionPrompt "Select any number of profiles"
-setSelectionPrompt "Select additional profiles or hit ENTER"
-setDoneSelectionPrompt ("Profiles selected. " +
"Hit ENTER to start rail selection.")
-setAutoToggleSelection true
-setAutoComplete false
-setSelectionCount 0
-nurbsCurve true
-isoparm true
-curveOnSurface true
-surfaceEdge true
-polymeshEdge true
-setNoSelectionPrompt "Select two rails"
-setSelectionPrompt "Select the second rail"
-setDoneSelectionPrompt ("Rails selected. " +
"Hit ENTER to compute birail.")
-setAutoToggleSelection true
-setAutoComplete false
-setSelectionCount 2
-nurbsCurve true
-isoparm true
-curveOnSurface true
-surfaceEdge true
-polymeshEdge true
birailThreePlusProfileContext;
// userBirailContextCallback has "true" as the first argument, which suggests
// that $Selection2 contains all of $Selection1 items (as -cumulativeLists
// true is specified in the tool creation.)