RaptorPropMode
An alternative placing workflow inside the Prop tool, registered by project code.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
RAPTOR gives each mode a chip on the Prop band. While the mode is on, RAPTOR passes it the 3D pane's events, repaints and hotkeys (Q / E, , / ., Esc). The mode can use the Prop tool's surface pick, parenting, refusals and ghost through RaptorPropTool.
public sealed class RaptorPropModeFields
DrawOptions
public Func<Rect, float> DrawOptions;Draws the mode's options on the Prop band while the mode is on, after its chip. Returns the width used.
DrawScene
public Action<SceneView> DrawScene;Called on the 3D pane's Repaint, after the camera renders. Use it for ghosts and gizmos.
Entered
public Action Entered;Called when the mode is switched on.
Escape
public Func<bool> Escape;Called when Esc is pressed while the mode is on. Return true if the mode handled it (for example by clearing its selection), or false to let RAPTOR exit the mode.
Exited
public Action Exited;Called when the mode is switched off.
HandleSceneEvent
public Func<SceneView, Event, bool> HandleSceneEvent;Receives 3D pane events while the mode is on (in beforeSceneGui). Return true to consume the event. Do not call Use() on MouseMove events.
IconGlyph
public string IconGlyph;The chip's icon name.
Id
public string Id;A stable id, used as the SessionState key value.
Key
public Func<KeyCode, EventModifiers, bool> Key;Receives any other key while the mode is on, at the window root in the TrickleDown phase, so it sees keys such as Delete before the Suite. Return true to consume the key. Only consume keys the mode owns.
Label
public string Label;A short name, shown on the chip while the mode is on and as the tooltip's title.
Tooltip
public string Tooltip;The chip's tooltip text.
Turn
public Action<int, bool> Turn;Called for RAPTOR's turn hotkeys , / . with a direction of -1 or +1. The bool is true for a fine turn (Ctrl). A mode can also bind additional hotkeys (RaptorPropTool.PromoteShortcutContext).
Related types
- RaptorPropTool: Connects RAPTOR's prop placement (the Props drawer and Place tool) to the project's prop catalogue.