EditorSpatialGizmoPlugin

Used by the editor to define Spatial gizmo types.

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.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

addMaterial
void addMaterial(String name, SpatialMaterial material)

Adds a new material to the internal material list for the plugin. It can then be accessed with getMaterial. Should not be overridden.

canBeHidden
bool canBeHidden()

Override this method to define whether the gizmo can be hidden or not. Returns true if not overridden.

commitHandle
void commitHandle(EditorSpatialGizmo gizmo, long index, VariantArg2 restore, bool cancel)

Override this method to commit gizmo handles. Called for this plugin's active gizmos.

createGizmo
Ref!EditorSpatialGizmo createGizmo(Spatial spatial)

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
void createHandleMaterial(String name, bool billboard)

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.addHandles. Should not be overridden.

createIconMaterial
void createIconMaterial(String name, Texture texture, bool on_top, Color color)

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.addUnscaledBillboard. Should not be overridden.

createMaterial
void createMaterial(String name, Color color, bool billboard, bool on_top, bool use_vertex_color)

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.addMesh and EditorSpatialGizmo.addLines. Should not be overridden.

getHandleName
String getHandleName(EditorSpatialGizmo gizmo, long index)

Override this method to provide gizmo's handle names. Called for this plugin's active gizmos.

getHandleValue
Variant getHandleValue(EditorSpatialGizmo gizmo, long index)

Gets actual value of a handle from gizmo. Called for this plugin's active gizmos.

getMaterial
Ref!SpatialMaterial getMaterial(String name, EditorSpatialGizmo gizmo)

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
String getName()

Override this method to provide the name that will appear in the gizmo visibility menu.

getPriority
long getPriority()

Override this method to set the gizmo's priority. Higher values correspond to higher priority. If a gizmo with higher priority conflicts with another gizmo, only the gizmo with higher priority will be used. All built-in editor gizmos return a priority of -1. If not overridden, this method will return 0, which means custom gizmos will automatically override built-in gizmos.

hasGizmo
bool hasGizmo(Spatial spatial)

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
bool isHandleHighlighted(EditorSpatialGizmo gizmo, long index)

Gets whether a handle is highlighted or not. Called for this plugin's active gizmos.

isSelectableWhenHidden
bool isSelectableWhenHidden()

Override this method to define whether a Spatial with this gizmo should be selectable even when the gizmo is hidden.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(EditorSpatialGizmoPlugin other)
opEquals
bool opEquals(typeof(null) n)
redraw
void redraw(EditorSpatialGizmo gizmo)

Callback to redraw the provided gizmo. Called for this plugin's active gizmos.

setHandle
void setHandle(EditorSpatialGizmo gizmo, long index, Camera camera, Vector2 point)

Update the value of a handle after it has been updated. Called for this plugin's active gizmos.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
EditorSpatialGizmoPlugin _new()

Construct a new instance of EditorSpatialGizmoPlugin. Note: use memnew!EditorSpatialGizmoPlugin instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta