draggerContext is undoable, queryable, and editable.
The draggerContext allows the user to program the behavior of the mouse
or an equivalent dragging device in MEL.
In query mode, return type is based on queried flag.
Long name (short name) |
Argument types |
Properties |
-exists(-ex)
|
|
|
|
Returns true or false depending upon whether the
specified object exists. Other flags are ignored.
|
|
-image1(-i1)
|
string
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
-image2(-i2)
|
string
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
-image3(-i3)
|
string
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Contexts support up to three icons that represent
the tool associated with the context.
|
|
-history(-ch)
|
boolean
|
|
|
If this is a tool command, turn the construction history on
for the tool in question.
|
|
-name(-n)
|
string
|
|
|
If this is a tool command, name the tool appropriately.
|
|
-initialize(-inz)
|
script
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Command called when the tool is entered.
|
|
-finalize(-fnz)
|
script
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Command called when the tool is exited.
|
|
-prePressCommand(-ppc)
|
script
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Command called when mouse dragger is pressed. It is called before
pressCommand, so it can be used for initialization of context.
|
|
-pressCommand(-pc)
|
script
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Command called when mouse dragger is pressed.
|
|
-dragCommand(-dc)
|
script
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Command called when mouse dragger is dragged.
|
|
-releaseCommand(-rc)
|
script
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Command called when mouse dragger is released.
|
|
-holdCommand(-hc)
|
script
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Command called when mouse dragger is held.
|
|
-anchorPoint(-ap)
|
float float float
|
|
|
Anchor point (double array) where dragger was initially pressed.
|
|
-dragPoint(-dp)
|
float float float
|
|
|
Drag point (double array) current position of dragger during drag.
|
|
-projection(-pr)
|
string
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Sets current projection of drag point. Valid types are:
viewPlane |
project to view plane |
objectViewPlane |
project to object plane (parallel to view plane) |
objectPlane |
project to specified plane defined by object location and normal (default) 0,1,0 |
plane |
project to specified plane defined by origin and normal (default) 0,1,0 |
sketchPlane |
project to sketch plane |
xAxis |
project to closest point on X axis |
yAxis |
project to closest point on Y axis |
zAxis |
project to closest point on Z axis |
boundingSphere |
project to closest point on object sphere bounds |
boundingBox |
project to closest point on object bounding box |
|
|
-plane(-pl)
|
float float float
|
![create create](../gfx/create.gif)
|
|
Provide normal of projection plane (see -projection flag for details).
|
|
-space(-sp)
|
string
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Sets current space that coordinates are reported in. Types are:
world |
world space (global) |
object |
object space (local) |
screen |
screen space |
|
|
-modifier(-mo)
|
string
|
|
|
Returns the current modifier type: ctrl, alt or none.
|
|
-button(-bu)
|
int
|
|
|
Returns the current mouse button (1,2,3).
|
|
-cursor(-cur)
|
string
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Cursor displayed while context is active. Valid values are:
"default", "hand", "crossHair", "dolly", "track", and "tumble".
|
|
-drawString(-ds)
|
string
|
![create create](../gfx/create.gif)
|
|
A string to be drawn at the current position of the pointer.
|
|
-undoMode(-um)
|
string
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Undo queue mode for the context actions.
Acceptable values are:
- "all" default behaviour when every action that happens during
dragger context activity is recorded as an individual undo chunk.
- "step" - all the actions that happen between each press and
release are combined into one undo chunk.
- "sequence" - all the actions that happen between very first press
and very last release are combined into single undo chunk. This works
exactly the same as "step" for a single step dragger context.
|
|
-stepsCount(-sc)
|
int
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Number of steps (press-drag-release sequences) for dragger context.
When combined with undoMode flag, several steps might be recorded as
single undo action.
|
|
-snapping(-snp)
|
boolean
|
![create create](../gfx/create.gif) ![query query](../gfx/query.gif)
|
|
Enable/disable snapping for dragger context.
|
|
-currentStep(-cs)
|
int
|
|
|
Current step (press-drag-release sequence) for dragger context.
When queried before first press event happened, returns 0.
|
|