EditorSpatialGizmoPlugin

Inherits: Resource < Reference < Object

Used by the editor to define Spatial gizmo types.

Descripción

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.

Tutoriales

Métodos

void

add_material ( String name, SpatialMaterial material )

bool

can_be_hidden ( ) virtual

void

commit_handle ( EditorSpatialGizmo gizmo, int index, Variant restore, bool cancel=false ) virtual

EditorSpatialGizmo

create_gizmo ( Spatial spatial ) virtual

void

create_handle_material ( String name, bool billboard=false, Texture texture=null )

void

create_icon_material ( String name, Texture texture, bool on_top=false, Color color=Color( 1, 1, 1, 1 ) )

void

create_material ( String name, Color color, bool billboard=false, bool on_top=false, bool use_vertex_color=false )

String

get_handle_name ( EditorSpatialGizmo gizmo, int index ) virtual

Variant

get_handle_value ( EditorSpatialGizmo gizmo, int index ) virtual

SpatialMaterial

get_material ( String name, EditorSpatialGizmo gizmo=null )

String

get_name ( ) virtual

int

get_priority ( ) virtual

bool

has_gizmo ( Spatial spatial ) virtual

bool

is_handle_highlighted ( EditorSpatialGizmo gizmo, int index ) virtual

bool

is_selectable_when_hidden ( ) virtual

void

redraw ( EditorSpatialGizmo gizmo ) virtual

void

set_handle ( EditorSpatialGizmo gizmo, int index, Camera camera, Vector2 point ) virtual

Descripciones de Métodos

Añade un nuevo material a la lista de material interno para el plugin. Entonces se puede acceder a él con get_material. No debe ser sobreescrito.


  • bool can_be_hidden ( ) virtual

Sobreescribe este método para definir si el gizmo puede ser escondido o no. Devuelve true si no está sobrescrito.


Sobreescribe este método para confirmar los manejadores de los gizmos. Llamado por los gizmos activos de este plugin.


Override this method to return a custom EditorSpatialGizmo for the spatial nodes of your choice, return null for the rest of nodes. See also has_gizmo.


  • void create_handle_material ( String name, bool billboard=false, Texture texture=null )

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 get_material and used in EditorSpatialGizmo.add_handles. Should not be overridden.

You can optionally provide a texture to use instead of the default icon.


  • void create_icon_material ( String name, Texture texture, bool on_top=false, Color color=Color( 1, 1, 1, 1 ) )

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 get_material and used in EditorSpatialGizmo.add_unscaled_billboard. Should not be overridden.


  • void create_material ( String name, Color color, bool billboard=false, bool on_top=false, bool use_vertex_color=false )

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 get_material and used in EditorSpatialGizmo.add_mesh and EditorSpatialGizmo.add_lines. Should not be overridden.


Sobreescribir este método para proporcionar los nombres de los manejadores de los gizmos. Llamado por los gizmos activos de este plugin.


Obtiene el valor real de un manejador de un aparato. Llamado por los gizmos activos de este plugin.


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).


Sobrescribe este método para proporcionar el nombre que aparecerá en el menú de visibilidad del gizmo.


  • int get_priority ( ) virtual

Sobreescribe este método para establecer la prioridad del aparato. Valores más altos corresponden a una prioridad más alta. Si un aparato con mayor prioridad entra en conflicto con otro aparato, sólo se utilizará el aparato con mayor prioridad.

Todos los artilugios de edición incorporados devuelven una prioridad de -1. Si no se anula, este método devolverá 0, lo que significa que los gizmos personalizados sobreescribiran automáticamente los gizmos incorporados.


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.


Averigua si un manejador está resaltado o no. Llamado por los gizmos activos de este plugin.


  • bool is_selectable_when_hidden ( ) virtual

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


Llamada para redibujar el gizmo suministrado. Llamado por los gizmos activos de este plugin.


Actualizar el valor de un manejador después de haber sido actualizado. Llamado por los artilugios activos de este plugin.