Struct EditorSpatialGizmoPlugin
Used by the editor to define Spatial gizmo types.
struct EditorSpatialGizmoPlugin
;
EditorSpatialGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending EditorSpatialGizmoPlugin
for the simpler gizmos, or creating a new EditorSpatialGizmo
type. See the tutorial in the documentation for more info.
Methods
Name | Description |
---|---|
addMaterial
|
Adds a new material to the internal material list for the plugin. It can then be accessed with getMaterial . Should not be overridden.
|
canBeHidden
|
Override this method to define whether the gizmo can be hidden or not. Returns true if not overridden.
|
commitHandle
|
Override this method to commit gizmo handles. Called for this plugin's active gizmos. |
createGizmo
|
Override this method to return a custom EditorSpatialGizmo for the spatial nodes of your choice, return null for the rest of nodes. See also hasGizmo .
|
createHandleMaterial
|
Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with getMaterial and used in EditorSpatialGizmo . Should not be overridden.
|
createIconMaterial
|
Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with getMaterial and used in EditorSpatialGizmo . Should not be overridden.
|
createMaterial
|
Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with getMaterial and used in EditorSpatialGizmo and EditorSpatialGizmo . Should not be overridden.
|
getHandleName
|
Override this method to provide gizmo's handle names. Called for this plugin's active gizmos. |
getHandleValue
|
Gets actual value of a handle from gizmo. Called for this plugin's active gizmos. |
getMaterial
|
Gets material from the internal list of materials. If an EditorSpatialGizmo is provided, it will try to get the corresponding variant (selected and/or editable).
|
getName
|
Override this method to provide the name that will appear in the gizmo visibility menu. |
getPriority
|
|
hasGizmo
|
Override this method to define which Spatial nodes have a gizmo from this plugin. Whenever a Spatial node is added to a scene this method is called, if it returns true the node gets a generic EditorSpatialGizmo assigned and is added to this plugin's list of active gizmos.
|
isHandleHighlighted
|
Gets whether a handle is highlighted or not. Called for this plugin's active gizmos. |
isSelectableWhenHidden
|
Override this method to define whether Spatial with this gizmo should be selecteble even when the gizmo is hidden. |
redraw
|
Callback to redraw the provided gizmo. Called for this plugin's active gizmos. |
setHandle
|
Update the value of a handle after it has been updated. Called for this plugin's active gizmos. |