Get RAPTOR

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.Register and RaptorSuiteWindow.RegisterKeyOwner replace 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

ToUse
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 BlocksRaptorSuiteExternalTool.ExclusivePick (RaptorSuiteExclusivePick)
Ask which tool is picking nowRaptorSuiteExternalTools.ExclusivePicking
Give a panel an icon for its side tab, header and Workspace rowRaptorSuitePanelDescriptor.Icon
Order an Inspector block, or draw it inside a component's sectionRaptorSuiteInspectorBlock.Order, RaptorSuiteInspectorBlock.Section
Hide a component's section when your block replaces itRaptorSuiteInspectorBlocks.HideComponentType(Type)

3D view and hotkeys

ToUse
Draw in RAPTOR's 3D passRaptorSuiteViewportOverlays.Register(id, phase, draw, order)
Add a row to a view's menu, after a named rowRaptorSuiteDisplayMenuItems.Register(id, icon, label, toggle, isOn, order, after)
Take over hotkeys while your panel is open, so RAPTOR's hotkeys do not fireRaptorSuiteWindow.RegisterKeyOwner(id, owns)
List your hotkeys on Settings → HotkeysRaptorSuiteShortcutRows.Register(ownerId, rows, after, hiddenIds, order)
Draw a label in the 3D view in RAPTOR's styleRaptorSuiteViewTags.Tag(centre, text, ink, glyphs, alpha)
Pick under the mouse the way RAPTOR doesRaptorSuitePicking.OccluderDistance, MeshHitWins, PlacePick
Keep the Player Reference visible while your tool is activeRaptorSuitePlayerReference.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 memberWhat it decides
ResolvePick, InsideVolumeWhat a click in the view picks
RegionSelectWhat a box-select includes
PaneUnder, DrawPanePicking and drawing in Top, Front and Side
Icon, RowTooltip, ColoursHow it looks in the Hierarchy
RowEvent, OwnsRowDrag, RowMenuClicks, drags and the right-click menu on its Hierarchy row
EditsItself, TakesEditCommandsWhether RAPTOR's edit commands apply to it
MovesFreely, AfterMoveHow it moves, and what runs after a move
AfterCopy, PasteReceivesCopy and paste
RefusesAsTargetWhether other objects can snap to it
SceneRootNameThe root object that holds them in the scene

Every member is optional. Providers with a lower Order answer first.

Related points:

ToUse
Add a section to the selection's right-click menuRaptorSuiteSelectionMenu.Contributors.Register(id, contributor, order)
Add a rule for dropping rows in the HierarchyRaptorSuiteHierarchyDrag.NestRules.Register(id, rule, slot, order)
Add a Body option for placed propsRaptorEntityBodyProviders.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 inRaptorModelTargets.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.

TypeWhat it means
IRaptorModelBoundaryThe nested model is never merged into its room.
IRaptorMovingPartThe 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.
RaptorMovingPartsThe 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.