unreal.GeometryScript_WeightMaps¶
- class unreal.GeometryScript_WeightMaps(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibraryGeometry Script Library Mesh Weight Map Functions
C++ Source:
Plugin: GeometryScripting
Module: GeometryScriptingCore
File: MeshWeightMapFunctions.h
- classmethod find_or_add_mesh_weight_map(target_mesh, name, debug=None) -> (DynamicMesh, weight_map_handle=GeometryScriptWeightMapHandle)¶
Find or add a weight layer with the requested name.
- Parameters:
target_mesh (DynamicMesh)
name (Name)
debug (GeometryScriptDebug)
- Returns:
weight_map_handle (GeometryScriptWeightMapHandle):
- Return type:
- classmethod get_mesh_weight_map_values(target_mesh, weight_map_handle, skip_gaps, debug=None) -> (DynamicMesh, weight_values=GeometryScriptScalarList, has_vertex_id_gaps=bool)¶
Get the values of a given mesh weight map as a scalar list
- Parameters:
target_mesh (DynamicMesh)
weight_map_handle (GeometryScriptWeightMapHandle)
skip_gaps (bool) – Whether to skip invalid vertex IDs in a non-compact mesh.
debug (GeometryScriptDebug)
- Returns:
weight_values (GeometryScriptScalarList): The weights of each vertex in the Target Mesh
has_vertex_id_gaps (bool): Whether any values in the list correspond to ‘skipped’ vertices. Will only be true if SkipGaps is false, and the Target Mesh is non-compact.
- Return type:
tuple
- classmethod remove_mesh_weight_map(target_mesh, weight_map_handle, debug=None) DynamicMesh¶
Remove the requested weight layer, if present.
- Parameters:
target_mesh (DynamicMesh)
weight_map_handle (GeometryScriptWeightMapHandle)
debug (GeometryScriptDebug)
- Return type:
- classmethod set_mesh_constant_weight_map_value(target_mesh, weight_map_handle, weight, debug=None) DynamicMesh¶
Set all weights in the given layer to a constant value
- Parameters:
target_mesh (DynamicMesh)
weight_map_handle (GeometryScriptWeightMapHandle)
weight (float) – The constant value to set
debug (GeometryScriptDebug)
- Return type:
- classmethod set_mesh_selection_weight_map_value(target_mesh, weight_map_handle, selection, weight, debug=None) DynamicMesh¶
Set the weights on selected vertices to a constant value.
- Parameters:
target_mesh (DynamicMesh)
weight_map_handle (GeometryScriptWeightMapHandle)
selection (GeometryScriptMeshSelection)
weight (float) – The constant weight to set
debug (GeometryScriptDebug)
- Return type:
- classmethod set_mesh_weight_map_values(target_mesh, weight_values, weight_map_handle, skip_gaps, debug=None) DynamicMesh¶
Set the values of a given mesh weight map from a scalar list.
- Parameters:
target_mesh (DynamicMesh)
weight_values (GeometryScriptScalarList) – The weights to set on each vertex in the Target Mesh. Length must be the same as Target Mesh’s Max Vertex ID, or the Vertex Count if Skip Gaps is true.
weight_map_handle (GeometryScriptWeightMapHandle)
skip_gaps (bool) – Whether to skip invalid vertex IDs in a non-compact mesh
debug (GeometryScriptDebug)
- Return type: