EditorSpatialGizmo
Category: Core
Custom gizmo for editing Spatial objects.
Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. See for more information.
- void add_collision_segments ( PoolVector3Array segments )
- void add_collision_triangles ( triangles )
Add collision triangles to the gizmo for picking. A TriangleMesh can be generated from a regular too. Call this function during redraw.
Add a list of handles (points) which can be used to deform the object being edited.
- void add_lines ( lines, Material material, billboard=false )
Add lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during redraw.
- void add_unscaled_billboard ( material, float default_scale=1 )
Add an unscaled billboard for visualization. Call this function during .
- void clear ( )
Commit a handle being edited (handles must have been previously added by ).
If the cancel parameter is , an option to restore the edited value to the original is provided.
- String get_handle_name ( index ) virtual
Get the name of an edited handle (handles must have been previously added by add_handles).
Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling .
- EditorSpatialGizmoPlugin get_plugin ( ) const
Returns the that owns this gizmo. It’s useful to retrieve materials using EditorSpatialGizmoPlugin.get_material.
- get_spatial_node ( ) const
Returns the Spatial node associated with this gizmo.
- bool is_handle_highlighted ( index ) virtual
Get whether a handle is highlighted or not.
- void redraw ( ) virtual
This function is called when the Spatial this gizmo refers to changes (the Spatial.update_gizmo is called).
- void set_handle ( index, Camera camera, point ) virtual
The Camera is also provided so screen coordinates can be converted to raycasts.
- void set_hidden ( hidden )