3D outline reference

There are different outline types based on the Adding Outlinespage:

enum OUTLINE_TYPE {
	## Add an outline to the non-occluded parts of the mesh
	VISIBLE = 0,
	## Add an outline only to the occluded parts of the mesh
	HIDDEN = 1,
	## Add a complete outline to the mesh
	FULL = 2,
	## Add a silhouette to the occluded parts of the mesh
	SILHOUETTE = 3,
	## Add a silhouette and an outline to the mesh
	OUTLINE_SILHOUETTE = 4
}

Outline Utility Functions

MeshInstance3D get_outline_or_null(_node: Node3D) static
  • Return the outline if exists else return null

Variant get_outline_type_or_null(_outline: MeshInstance3D) static
  • Return the outline type metadata from the given outline node, or null if not found.

bool is_node_an_outline(_node: Node3D) static
  • Check if the given node is an outline by verifying its group membership.

Outline Management

void add_outline(_node: Node3D, _outline_type: OUTLINE_TYPE = OUTLINE_TYPE.VISIBLE) static
  • Add an outline to the given MeshInstance3D with a specified outline type.

void clear_outline(_node: Node3D) static
  • Try remove an outline from the given MeshInstance3D.

void set_outline_type(_node: Node3D, _outline_type: OUTLINE_TYPE) static
  • Add the selected outline material to the MeshInstance3D.

Basic Style Settings

void set_outline_color(_node: Node3D, _color: Color) static
  • Try get the outline from the node, if exists then set the color.

void set_outline_thickness(_node: Node3D, _thickness: float) static
  • Try get the outline from the node, if exists then set the thickness.

Emission Settings

void set_emission_enabled(_node: Node3D, _enabled: bool) static
  • Try get the outline from the node, if exists then set emission enabled state.

void set_emission_strength(_node: Node3D, _strength: float) static
  • Try get the outline from the node, if exists then set emission strength value.

Distance Fade Settings

void set_distance_fade_enabled(_node: Node3D, _enabled: bool) static
  • Try get the outline from the node, if exists then set the distance fade enabled.

void set_distance_fade_min_dist(_node: Node3D, _dist: float) static
  • Try get the outline from the node, if exists then set the minimum distance fade distance.

void set_distance_fade_max_dist(_node: Node3D, _dist: float) static
  • Try get the outline from the node, if exists then set the maximum distance fade distance.

void set_distance_scale_enabled(_node: Node3D, _enabled: bool) static
  • Try get the outline from the node, if exists then set distance scale enabled state.

Texture Settings

void set_texture_enabled(_node: Node3D, _enabled: bool) static
  • Try get the outline from the node, if exists then set texture enabled state.

void set_texture(_node: Node3D, _texture: Texture2D) static
  • Try get the outline from the node, if exists then set the outline texture.

void set_texture_multiply_with_color(_node: Node3D, _enabled: bool) static
  • Try get the outline from the node, if exists then set texture multiply with color state.

void set_texture_tiling(_node: Node3D, _tiling: Vector2) static
  • Try get the outline from the node, if exists then set texture tiling value.

void set_texture_offset(_node: Node3D, _offset: Vector2) static
  • Try get the outline from the node, if exists then set texture offset value.

Visibility Control

void show_outline(_node: Node3D) static
  • Try get the outline from the node, if exists then set visible to true.

void hide_outline(_node: Node3D) static
  • Try get the outline from the node, if exists then set visible to false.

Last updated