EditorSpatialGizmo
Inherits: SpatialGizmo < Reference < Object Custom gizmo for editing Spatial objects.
Description
EditorSpatialGizmoPlugin for more information.
Methods
Method Descriptions
- add_collision_segments ( PoolVector3Array segments )
segmentsto the gizmo’s collision shape for picking. Call this function during redraw.
- add_collision_triangles ( TriangleMesh triangles ) TriangleMesh can be generated from a regular Mesh too. Call this function during redraw.
- add_handles ( PoolVector3Array handles, Material material, bool billboard=false, bool secondary=false ) Adds a list of handles (points) which can be used to deform the object being edited. redraw.
- add_lines ( PoolVector3Array lines, Material material, bool billboard=false, Color modulate=Color( 1, 1, 1, 1 ) ) redraw.
- add_mesh ( Mesh mesh, bool billboard=false, SkinReference skeleton=null, Material material=null )
billboardstate,skeletonandmaterial. Ifbillboardistrue, the mesh will rotate to always face the camera. Call this function during redraw.
- add_unscaled_billboard ( Material material, float default_scale=1, Color modulate=Color( 1, 1, 1, 1 ) ) redraw.
- clear ( ) Removes everything in the gizmo including meshes, collisions and handles.
- commit_handle ( int index, Variant restore, bool cancel=false ) virtual
add_handles).
cancelparameter istrue, an option to restore the edited value to the original is provided.
- String get_handle_name ( int index ) virtual add_handles). Handles can be named for reference to the user when editing.
- Variant get_handle_value ( int index ) virtual commit_handle.
- EditorSpatialGizmoPlugin get_plugin ( ) const EditorSpatialGizmoPlugin that owns this gizmo. It’s useful to retrieve materials using EditorSpatialGizmoPlugin.get_material.
- Spatial get_spatial_node ( ) const Returns the Spatial node associated with this gizmo.
- bool is_handle_highlighted ( int index ) virtual
trueif the handle at indexindexis highlighted by being hovered with the mouse.
- redraw ( ) virtual Spatial this gizmo refers to changes (the Spatial.update_gizmo is called).
- set_handle ( int index, Camera camera, Vector2 point ) virtual add_handles) in screen coordinates. Camera is also provided so screen coordinates can be converted to raycasts.
- set_hidden ( bool hidden )
true, the gizmo will be hidden. Iffalse, it will be shown.
- set_spatial_node ( Node node )
Spatial node for the gizmo.
nodemust inherit from Spatial.
