scriptCtx is undoable, queryable, and editable.
This command allows a user to create their own tools based on
the selection tool. A number of selection lists can be collected,
the behaviour of the selection and the selection masks are fully
customizable, etc.
In query mode, return type is based on queried flag.
Long name (short name) |
Argument types |
Properties |
|
-baseClassName(-bcn)
|
string
|
|
|
This string will be used to produce MEL function names for
the property sheets for the tool. For example, if
"myScriptTool" was given, the functions "myScriptToolValues"
and "myScriptToolProperties" will be used for the
property sheets. The default is "scriptTool".
|
|
-cumulativeLists(-cls)
|
boolean
|
|
|
If set, the selection lists will be cumulative. For example,
the second list will contain all the items from the first list,
the third all the items from the second list etc. Make sure
your script specified above takes that into account. Relevant
if there is more than one selection set.
|
|
-enableRootSelection(-ers)
|
boolean
|
|
|
If set, the items to be selected are at their root transform
level. Default is false.
|
|
-exists(-ex)
|
|
|
|
Returns true or false depending upon whether the
specified object exists. Other flags are ignored.
|
|
-exitUponCompletion(-euc)
|
boolean
|
|
|
If set, completing the last selection set will exit the
tool. Default is true.
|
|
-expandSelectionList(-esl)
|
boolean
|
|
|
If set, the selection lists will expand to have a single
component in each item. You probably want this as a default, otherwise
two isoparms on the same surface will show up as 1 item.
To ensure that components on the same object are returned in the order in
which they are selected, use the selectPref -trackSelectionOrder on
command in your -toolStart script to enable ordered
selection, then restore it to its original value in your
-toolFinish script.
|
|
-finalCommandScript(-fcs)
|
script
|
|
|
Supply the script that will be run when the user presses the
enter key and the context is completed. Depending on the
number of selection sets you have, the script can make use
of variables string $Selection1[], $Selection2[], ...
|
|
-forceAddSelect(-fas)
|
boolean
|
|
|
If set to true, together with -setAutoToggleSelection (see
below) on the first selection set, causes the first selection after
the computation of the previous result to be "shift" selection,
unless a modifier key is pressed. Default is false.
Flags for each selection set. These flags are multi-use.
|
|
-history(-ch)
|
boolean
|
|
|
If this is a tool command, turn the construction history on
for the tool in question.
|
|
-ignoreInvalidItems(-iii)
|
boolean
|
|
|
If you have multiple selection sets, the state of the
selection set is recorded at the time you "complete it". You could
then delete some of the items in that list and end up with
invalid items in one or more of your selection sets. If this
flag is set, those items will be detected and ignored. You will
never know it happened. Its as if they were never selected in
the first place, except that your selection set now does not
have as many items as it may need. If this flag is not set,
you will get a warning and your final command callback script
will likely not execute because of an error condition.
|
|
-image1(-i1)
|
string
|
|
|
First of three possible icons representing the tool
associated with the context.
|
|
-image2(-i2)
|
string
|
|
|
Second of three possible icons representing the tool
associated with the context.
|
|
-image3(-i3)
|
string
|
|
|
Third of three possible icons representing the tool
associated with the context.
|
|
-lastAutoComplete(-lac)
|
boolean
|
|
|
True if auto complete is set for the last selection set,
false otherwise. Mostly used for query, but if present in conjuction
with -sac/setAutoComplete flag, -sac flag takes precedence.
|
|
-name(-n)
|
string
|
|
|
If this is a tool command, name the tool appropriately.
|
|
-setAllowExcessCount(-sae)
|
boolean
|
|
|
If set, the number if items is to be interpreted as the minimum.
|
|
-setAutoComplete(-sac)
|
boolean
|
|
|
If set to true, as soon as the specified number of items is
selected the tool will start the next selection set or run the command.
|
|
-setAutoToggleSelection(-sat)
|
boolean
|
|
|
If set to true, it is as if "shift" key is pressed when there
are no modifiers pressed. That means that you get the "toggle select"
behaviour by default. This only applies to the 3D view, and the
selection done in the hypergraph, outliner or elsewhere is still
a subject to the usual rules.
|
|
-setDoneSelectionPrompt(-dsp)
|
string
|
|
|
If setAutoComplete is not set (see below) this string will be
shown as soon as the tool has enough items for a particular selection
set. If this is not set, but is needed, the same string as set with
-setSelectionPrompt flag will be used.
|
|
-setNoSelectionHeadsUp(-snh)
|
string
|
|
|
Supply a string that will be shown as a heads up prompt when
there is nothing selected. This must be set separately for each
selection set.
|
|
-setNoSelectionPrompt(-snp)
|
string
|
|
|
Supply a string that will be shown as help when there is
nothing selected. This must be set separately for each
selection set.
|
|
-setSelectionCount(-ssc)
|
int
|
|
|
The number of items in this selection set. 0 means as many as
you need until completion.
|
|
-setSelectionHeadsUp(-ssh)
|
string
|
|
|
Supply a string that will be shown as a heads up prompt when
there is something selected. This must be set separately for each
selection set.
|
|
-setSelectionPrompt(-ssp)
|
string
|
|
|
Supply a string that will be shown as help when there is
something selected. This must be set separately for each
selection set.
|
|
-showManipulators(-sm)
|
boolean
|
|
|
If set, the manipulators will be shown for any active objects.
Basically, it is as if you are in the Show Manipulator tool.
|
|
-title(-t)
|
string
|
|
|
Supply a string that will be used as a precursor to all the
messages; i.e., the "name" of the tool.
|
|
-toolCursorType(-tct)
|
string
|
|
|
Supply the string identifier to set the tool cursor type
when inside of tool. The following are the valid ids:
"create", "dolly", "edit", "pencil", "track", "trackHorizontal",
"trackVertical", "transformation", "tumble", "zoom", "zoomIn",
"zoomOut", "flyThrough", "dot", "fleur",
"leftArrow", "question", "doubleHorizArrow", "doubleVertArrow",
"sizing", "dollyIn", "dollyOut", "brush", "camera", "noAccess",
"input", "output", "leftCycle", "rightCycle", "rightExpand",
"knife".
|
|
-toolFinish(-tf)
|
script
|
|
|
Supply the script that will be run when the user exits
the script.
|
|
-toolStart(-ts)
|
script
|
|
|
Supply the script that will be run when the user first
enters the script
|
|
-totalSelectionSets(-tss)
|
int
|
|
|
Total number of selection sets.
|
|