Tool extension points
Add toolbar tools, panels, 3D view drawing, hotkeys and new kinds of scene object.
A module uses these points to add a tool to RAPTOR's window. All are in Raptor.Editor, namespace Raptor.EditorTools, except the two moving-part interfaces, which are in Raptor.Components.
Every registry on this page follows these rules:
- Register from an
[InitializeOnLoad]static constructor on the main thread. - Registering an id again adds no second entry.
RaptorSuiteGizmoTargets.RegisterandRaptorSuiteWindow.RegisterKeyOwnerreplace the first entry. The others keep it. - Entries are read when RAPTOR needs them, so load order does not matter.
- A callback that throws is logged once and left out.
Toolbar, panel and Inspector
| To | Use |
|---|---|
| Place your tool on the toolbar. Lower comes first. RAPTOR's tools are at 100 (Props), 200 (Lights) and 500 (Ruler). | RaptorSuiteExternalTool.RailOrder |
| Let your active tool take every click and box-select in the views instead of Blocks | RaptorSuiteExternalTool.ExclusivePick (RaptorSuiteExclusivePick) |
| Ask which tool is picking now | RaptorSuiteExternalTools.ExclusivePicking |
| Give a panel an icon for its side tab, header and Workspace row | RaptorSuitePanelDescriptor.Icon |
| Order an Inspector block, or draw it inside a component's section | RaptorSuiteInspectorBlock.Order, RaptorSuiteInspectorBlock.Section |
| Hide a component's section when your block replaces it | RaptorSuiteInspectorBlocks.HideComponentType(Type) |
3D view and hotkeys
| To | Use |
|---|---|
| Draw in RAPTOR's 3D pass | RaptorSuiteViewportOverlays.Register(id, phase, draw, order) |
| Add a row to a view's menu, after a named row | RaptorSuiteDisplayMenuItems.Register(id, icon, label, toggle, isOn, order, after) |
| Take over hotkeys while your panel is open, so RAPTOR's hotkeys do not fire | RaptorSuiteWindow.RegisterKeyOwner(id, owns) |
| List your hotkeys on Settings → Hotkeys | RaptorSuiteShortcutRows.Register(ownerId, rows, after, hiddenIds, order) |
| Draw a label in the 3D view in RAPTOR's style | RaptorSuiteViewTags.Tag(centre, text, ink, glyphs, alpha) |
| Pick under the mouse the way RAPTOR does | RaptorSuitePicking.OccluderDistance, MeshHitWins, PlacePick |
| Keep the Player Reference visible while your tool is active | RaptorSuitePlayerReference.RegisterShowAll(id, showAll) |
Declare Mesh-mode hotkeys as [Shortcut]s in RaptorSuiteWindow.MeshShortcutContext, so they follow the same rules as RAPTOR's.
Custom scene objects
Register a RaptorSuiteGizmoTargets.Provider and RAPTOR handles your objects like built-in ones. Logic's Volumes, Markers and Buttons work this way.
| Provider member | What it decides |
|---|---|
ResolvePick, InsideVolume | What a click in the view picks |
RegionSelect | What a box-select includes |
PaneUnder, DrawPane | Picking and drawing in Top, Front and Side |
Icon, RowTooltip, Colours | How it looks in the Hierarchy |
RowEvent, OwnsRowDrag, RowMenu | Clicks, drags and the right-click menu on its Hierarchy row |
EditsItself, TakesEditCommands | Whether RAPTOR's edit commands apply to it |
MovesFreely, AfterMove | How it moves, and what runs after a move |
AfterCopy, PasteReceives | Copy and paste |
RefusesAsTarget | Whether other objects can snap to it |
SceneRootName | The root object that holds them in the scene |
Every member is optional. Providers with a lower Order answer first.
Related points:
| To | Use |
|---|---|
| Add a section to the selection's right-click menu | RaptorSuiteSelectionMenu.Contributors.Register(id, contributor, order) |
| Add a rule for dropping rows in the Hierarchy | RaptorSuiteHierarchyDrag.NestRules.Register(id, rule, slot, order) |
| Add a Body option for placed props | RaptorEntityBodyProviders.Register(provider) |
| Draw a box with RAPTOR's three-click gesture (corner, far corner, height) | RaptorSuiteBoxDraw |
| Decide which model and container a new object goes in | RaptorModelTargets.Default(), RaptorGameplayContainers.Resolve(model, scene, sceneRootName) |
Moving parts
A component on a nested model's root can make that model a separate bake unit. RAPTOR reads the interface directly, without a registry.
| Type | What it means |
|---|---|
| IRaptorModelBoundary | The nested model is never merged into its room. |
| IRaptorMovingPart | The nested model moves. If ContributesGIAtRest is false, it is lit by probes and nothing in it is static. If true, it is baked at its rest pose. |
| RaptorMovingParts | The rules the bake uses for parts. |
A row on Settings → Modules
RaptorModules.Register(id, label, RaptorModuleKind.Module) adds a row under Add-ons. With no detector, the row shows On.