RaptorSuiteApi
The Suite's state and actions for modules in other assemblies.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
Each member runs the same code path as the Suite. Controls are made with RaptorSuiteControls, and dialogs derive from RaptorSuiteModuleDialog.
public static class RaptorSuiteApiProperties
CurrentSuite
public static RaptorSuiteWindow CurrentSuite { get; }The Suite that dialogs and toasts use: the focused Suite window, or else any open one. Null when none is open.
GeometryMode
public static RaptorGeometryKind GeometryMode { get; }The Suite's geometry mode, which sets the kind of model new geometry makes and which models are editable. Always Mesh.
Methods
HaloDotted
public static void HaloDotted(Vector3 a, Vector3 b, Color color, float dash)Draws the draw tool's dotted guide stroke: dashes of color, dash screen pixels long, over a thin dark halo line. Leaves Handles.color set to color. Call it while drawing in a Scene view.
| Parameter | Type | Description |
|---|---|---|
| a | Vector3 | The stroke's start, in world space. |
| b | Vector3 | The stroke's end, in world space. |
color | Color | The stroke colour. |
dash | float | The dash length in screen pixels. |
HaloLine
public static void HaloLine(Vector3 a, Vector3 b, Color color, float width)Draws the draw tool's solid guide stroke: color at width over a dark halo width + 2.5 wide. Leaves Handles.color set to color. Call it on Repaint while drawing in a Scene view.
| Parameter | Type | Description |
|---|---|---|
| a | Vector3 | The stroke's start, in world space. |
| b | Vector3 | The stroke's end, in world space. |
color | Color | The stroke colour. |
width | float | The stroke's width in pixels. |
HierarchyDropRefusal
public static string HierarchyDropRefusal(Transform target, GameObject go)Checks whether go may move under target by the Hierarchy drag's rules.
| Parameter | Type | Description |
|---|---|---|
target | Transform | The new parent; null means the scene root. |
go | GameObject | The object. |
Returns: Null when the move is allowed, an empty string when it is refused without a message (for example onto the object itself or where it already is), else the reason.
HierarchyMove
public static int HierarchyMove(Transform target, IList<GameObject> dragged)Performs a Hierarchy drop. Every object in dragged that may land moves under target and keeps its world pose. The move is one Undo step, and the model rebuilds once.
| Parameter | Type | Description |
|---|---|---|
target | Transform | The new parent; null means the scene root. |
dragged | IList<GameObject> | The objects being moved. |
Returns: How many objects moved.
HierarchyRefusal
public static string HierarchyRefusal(Transform target, IList<GameObject> dragged)Gets the first object's refusal when none of dragged may land under target. An empty string means the drop is refused without a message.
| Parameter | Type | Description |
|---|---|---|
target | Transform | The new parent; null means the scene root. |
dragged | IList<GameObject> | The objects being moved. |
Returns: The refusal, or null when at least one object may land.
InvalidateChrome
public static void InvalidateChrome()Marks the Suite's cached chrome (the toolbar, bars, panels and Mesh-mode pane images) as stale so it redraws on the next repaint. Call it after a change the Suite can't detect through input, selection, Undo or object-change events.
KindLockReason
public static string KindLockReason(GameObject go)Gets why go can't be edited because of its model's kind, such as a read-only model of the older kind.
| Parameter | Type | Description |
|---|---|---|
go | GameObject | The object. |
Returns: The reason, or null when the model kind allows editing.
NeedsBake
public static bool NeedsBake(RaptorModel model)Whether model's baked mesh is stale or was never baked. Reads the same cached flag as the BAKE pill. False for null.
| Parameter | Type | Description |
|---|---|---|
model | RaptorModel | The model. |
Returns: True when it needs a bake.
Notify
public static void Notify(string message)Shows a short toast for 2 seconds over the Suite window, or else over the last active Scene view. An empty message shows nothing.
| Parameter | Type | Description |
|---|---|---|
message | string | The message. |
OpenDialog
public static bool OpenDialog(RaptorSuiteModuleDialog dialog)Opens dialog in CurrentSuite, closing any dialog already showing there.
| Parameter | Type | Description |
|---|---|---|
dialog | RaptorSuiteModuleDialog | The dialog to open. |
Returns: True when the dialog opened. False when no Suite is open, Settings is open, the first-open data folder prompt is showing, or dialog is null.
OpenDialog
public static bool OpenDialog(RaptorSuiteWindow suite, RaptorSuiteModuleDialog dialog)Opens dialog in suite, closing any dialog already showing there.
| Parameter | Type | Description |
|---|---|---|
suite | RaptorSuiteWindow | The Suite window to open it in. |
dialog | RaptorSuiteModuleDialog | The dialog to open. |
Returns: True when the dialog opened. False when suite is null, Settings is open in it, the first-open data folder prompt is showing, or dialog is null.
OpenModuleDialog
public static RaptorSuiteModuleDialog OpenModuleDialog(RaptorSuiteWindow suite)Gets the module dialog showing in suite.
| Parameter | Type | Description |
|---|---|---|
suite | RaptorSuiteWindow | The Suite window. |
Returns: The dialog, or null when none is open or a core dialog is open.
SelectedModel
public static RaptorModel SelectedModel()Gets the model the draw tool's panels act on: the RaptorModel on or above the active selected object.
Returns: The model, or null when no part of a model is selected.
Related types
- RaptorSuiteModuleDialog: The base class for a module's dialog in the RAPTOR Suite.
- RaptorSuiteControls: Suite-style controls for tools in other assemblies, such as RAPTOR Render's Ray-traced preview settings.
- RaptorGeometryKind: Which kind of geometry a model holds.
- RaptorSuiteWindow: The RAPTOR Suite editor window.
- RaptorModel: The root of a RAPTOR model and its output container.