unreal.GeometryScript_VertexColors

class unreal.GeometryScript_VertexColors(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: BlueprintFunctionLibrary

Geometry Script Library Mesh Vertex Color Functions

C++ Source:

  • Plugin: GeometryScripting

  • Module: GeometryScriptingCore

  • File: MeshVertexColorFunctions.h

classmethod convert_mesh_vertex_colors_linear_to_srgb(target_mesh, debug=None) DynamicMesh

Apply a Linear to SRGB color transformation on all vertex colors on the mesh.

Parameters:
Return type:

DynamicMesh

classmethod convert_mesh_vertex_colors_srgb_to_linear(target_mesh, debug=None) DynamicMesh

Apply a SRGB to Linear color transformation on all vertex colors on the mesh.

Parameters:
Return type:

DynamicMesh

classmethod get_mesh_per_vertex_colors(target_mesh, blend_split_vertex_values=True) -> (DynamicMesh, color_list=GeometryScriptColorList, is_valid_color_set=bool, has_vertex_id_gaps=bool)

Get a list of single vertex colors for each mesh vertex in the TargetMesh, derived from the VertexColor Overlay. The VertexColor Overlay may store multiple colors for a single vertex (ie different colors for that vertex on different triangles) In such cases the colors can either be averaged, or the last color seen will be used, depending on the bBlendSplitVertexValues parameter.

Parameters:
  • target_mesh (DynamicMesh) –

  • blend_split_vertex_values (bool) – control how multiple colors at the same vertex should be interpreted

Returns:

color_list (GeometryScriptColorList): output color list will be stored here. Size will be equal to the MaxVertexID of TargetMesh (not the VertexCount!)

is_valid_color_set (bool): will be set to true if the VertexColor Overlay was valid

has_vertex_id_gaps (bool): will be set to true if some vertex indices in TargetMesh were invalid, ie MaxVertexID > VertexCount

Return type:

tuple

classmethod set_mesh_constant_vertex_color(target_mesh, color, flags, clear_existing=False, debug=None) DynamicMesh

Set all vertex colors (optionally specific channels) in the TargetMesh VertexColor Overlay to a constant value

Parameters:
Return type:

DynamicMesh

classmethod set_mesh_per_vertex_colors(target_mesh, vertex_color_list, debug=None) DynamicMesh

Set all vertex colors in the TargetMesh VertexColor Overlay to the specified per-vertex colors

Parameters:
Return type:

DynamicMesh

classmethod set_mesh_selection_vertex_color(target_mesh, selection, color, flags, create_color_seam=False, debug=None) DynamicMesh

Set the colors in the TargetMesh VertexColor Overlay identified by the Selection to a constant value. For a Vertex Selection, each existing VertexColor Overlay Element for the vertex is updated. For a Triangle or Polygroup Selection, all Overlay Elements in the identified Triangles are updated.

Parameters:
  • target_mesh (DynamicMesh) –

  • selection (GeometryScriptMeshSelection) –

  • color (LinearColor) – the constant color to set

  • flags (GeometryScriptColorFlags) – specify which RGBA channels to set (default all channels)

  • create_color_seam (bool) – if true, a “hard edge” in the vertex colors is created, by creating new Elements for all the triangles in the selection. If enabled, Vertex selections are converted to Triangle selections, and Flags is ignored.

  • debug (GeometryScriptDebug) –

Return type:

DynamicMesh