RaptorSuiteGizmoTargets
Lets a module's object kinds act like RAPTOR objects: gizmos, picking, Hierarchy rows, copy and paste.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
public static class RaptorSuiteGizmoTargetsProperties
Ids
public static IReadOnlyList<string> Ids { get; }The registered provider ids, in the order they are asked.
MarksTakePress
public static bool MarksTakePress { get; }Whether a press on a shown mark takes the click. True when the Target is Object or the Target row does not apply. When false, the press goes to the Select tool's pick.
ObjectMode
public static bool ObjectMode { get; }Whether Mesh mode is on with the Mesh tool in Object mode, where the Suite's object gizmo runs.
ObjectTargetHeld
public static bool ObjectTargetHeld { get; }Whether Target Object is the active pick. While true, marks that are otherwise hidden are shown.
RotateMode
public static bool RotateMode { get; }Whether the current gizmo mode is Rotate.
SuiteGizmoShown
public static bool SuiteGizmoShown { get; }Whether the Suite's object gizmo is on the current selection. This requires Mesh mode, the Mesh tool in Object mode, the Suite's 3D pass running in this tool state, and every selected object being a target. While this is false, a provider draws its own gizmo.
TargetScopeApplies
public static bool TargetScopeApplies { get; }Whether the Target row governs the Select tool's whole-object picks.
Methods
Invalidate
public static void Invalidate()Refreshes the selection's gizmo targets. Call it after a change outside Undo or Selection, such as creating or deleting an owned object.
MoveModeFits
public static bool MoveModeFits(MoveMode mode)Whether mode is Move, Rotate or Set pivot: the object gizmo's modes for a kind without Provider.AllowScale. Scale may still reach an object its kind's Provider.ScalesSize takes.
| Parameter | Type | Description |
|---|---|---|
mode | MoveMode | The gizmo mode. |
Returns: True when it fits.
Register
public static void Register(Provider provider)Adds a provider, or replaces the one with the same id. The provider is asked at its Provider.Order. A null provider or one with an empty id is ignored.
| Parameter | Type | Description |
|---|---|---|
provider | Provider | The provider. |
Call from an [InitializeOnLoad] static constructor on the main thread. A callback that throws is logged and does not stop the others.
Unregister
public static void Unregister(string id)Removes a provider. Does nothing when the id is not registered.
| Parameter | Type | Description |
|---|---|---|
id | string | The provider's id. |
Related types
- RaptorSuiteGizmoTargets.KindColours: A kind's Hierarchy colour in the colour-blind safe and Unity-like palettes.
- RaptorSuiteGizmoTargets.Provider: One kind of module object and the callbacks RAPTOR uses for it.