unreal.GeometryScript_Materials
¶
- class unreal.GeometryScript_Materials(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrary
Geometry Script Library Mesh Material Functions
C++ Source:
Plugin: GeometryScripting
Module: GeometryScriptingCore
File: MeshMaterialFunctions.h
- classmethod clear_material_i_ds(target_mesh, clear_value=0, debug=None) DynamicMesh ¶
Clear Material IDs
- Parameters:
target_mesh (DynamicMesh) –
clear_value (int32) –
debug (GeometryScriptDebug) –
- Return type:
- classmethod compact_material_i_ds(target_mesh, source_material_list, debug=None) -> (DynamicMesh, compacted_material_list=Array[MaterialInterface])¶
Compact the MaterialIDs of the TargetMesh, ie remove any un-used MaterialIDs and remap the remaining N in-use MaterialIDs to the range [0,N-1]. Optionally compute a Compacted list of Materials.
- Parameters:
target_mesh (DynamicMesh) –
source_material_list (Array[MaterialInterface]) – Input Material list, assumption is that SourceMaterialList.Num() == number of MaterialIDs on mesh at input
debug (GeometryScriptDebug) –
- Returns:
compacted_material_list (Array[MaterialInterface]): new Compacted Material list, one-to-one with new compacted MaterialIDs
- Return type:
- classmethod delete_triangles_by_material_id(target_mesh, material_id, defer_change_notifications=False, debug=None) -> (DynamicMesh, num_deleted=int32)¶
Delete all triangles in TargetMesh with the given MaterialID
- Parameters:
target_mesh (DynamicMesh) –
material_id (int32) –
defer_change_notifications (bool) –
debug (GeometryScriptDebug) –
- Returns:
num_deleted (int32): number of deleted triangles is returned here
- Return type:
int32
- classmethod enable_material_i_ds(target_mesh, debug=None) DynamicMesh ¶
Enable Material IDs
- Parameters:
target_mesh (DynamicMesh) –
debug (GeometryScriptDebug) –
- Return type:
- classmethod get_all_triangle_material_i_ds(target_mesh) -> (DynamicMesh, material_id_list=GeometryScriptIndexList, has_material_i_ds=bool)¶
Get All Triangle Material IDs
- Parameters:
target_mesh (DynamicMesh) –
- Returns:
material_id_list (GeometryScriptIndexList):
has_material_i_ds (bool):
- Return type:
tuple
- classmethod get_material_i_ds_of_triangles(target_mesh, triangle_id_list, debug=None) -> (DynamicMesh, material_id_list=GeometryScriptIndexList)¶
Get Material IDs Of Triangles
- Parameters:
target_mesh (DynamicMesh) –
triangle_id_list (GeometryScriptIndexList) –
debug (GeometryScriptDebug) –
- Returns:
material_id_list (GeometryScriptIndexList):
- Return type:
- classmethod get_max_material_id(target_mesh) -> (int32, has_material_i_ds=bool)¶
Get Max Material ID
- Parameters:
target_mesh (DynamicMesh) –
- Returns:
has_material_i_ds (bool):
- Return type:
- classmethod get_triangle_material_id(target_mesh, triangle_id) -> (int32, is_valid_triangle=bool)¶
Get Triangle Material ID
- Parameters:
target_mesh (DynamicMesh) –
triangle_id (int32) –
- Returns:
is_valid_triangle (bool):
- Return type:
- classmethod get_triangles_by_material_id(target_mesh, material_id, debug=None) -> (DynamicMesh, triangle_id_list=GeometryScriptIndexList)¶
Get Triangles by Material ID
- Parameters:
target_mesh (DynamicMesh) –
material_id (int32) –
debug (GeometryScriptDebug) –
- Returns:
triangle_id_list (GeometryScriptIndexList):
- Return type:
- classmethod remap_material_i_ds(target_mesh, from_material_id, to_material_id, debug=None) DynamicMesh ¶
Remap Material IDs
- Parameters:
target_mesh (DynamicMesh) –
from_material_id (int32) –
to_material_id (int32) –
debug (GeometryScriptDebug) –
- Return type:
- classmethod set_all_triangle_material_i_ds(target_mesh, triangle_material_id_list, defer_change_notifications=False, debug=None) DynamicMesh ¶
Set All Triangle Material IDs
- Parameters:
target_mesh (DynamicMesh) –
triangle_material_id_list (GeometryScriptIndexList) –
defer_change_notifications (bool) –
debug (GeometryScriptDebug) –
- Return type:
- classmethod set_material_id_for_mesh_selection(target_mesh, selection, material_id, defer_change_notifications=False, debug=None) DynamicMesh ¶
Set a new MaterialID on all the triangles of the given Selection.
- Parameters:
target_mesh (DynamicMesh) –
selection (GeometryScriptMeshSelection) –
material_id (int32) – new Material ID to set
defer_change_notifications (bool) – if true, the UDynamicMesh does not emit a change event/signal for this modification
debug (GeometryScriptDebug) –
- Return type:
- classmethod set_material_id_on_triangles(target_mesh, triangle_id_list, material_id, defer_change_notifications=False, debug=None) DynamicMesh ¶
Set Material IDOn Triangles
- Parameters:
target_mesh (DynamicMesh) –
triangle_id_list (GeometryScriptIndexList) –
material_id (int32) –
defer_change_notifications (bool) –
debug (GeometryScriptDebug) –
- Return type:
- classmethod set_polygroup_material_id(target_mesh, group_layer, polygroup_id, material_id, defer_change_notifications=False, debug=None) -> (DynamicMesh, is_valid_polygroup_id=bool)¶
Set a new MaterialID on all the triangles of TargetMesh with the given PolyGroup.
- Parameters:
target_mesh (DynamicMesh) –
group_layer (GeometryScriptGroupLayer) – PolyGroup Layer to use as basis for PolyGroups
polygroup_id (int32) – PolyGroup ID that specifies Triangles to set to new MaterialID
material_id (int32) – explicit new MaterialID to set
defer_change_notifications (bool) – if true, the UDynamicMesh does not emit a change event/signal for this modification
debug (GeometryScriptDebug) –
- Returns:
is_valid_polygroup_id (bool):
- Return type:
- classmethod set_triangle_material_id(target_mesh, triangle_id, material_id, defer_change_notifications=False) -> (DynamicMesh, is_valid_triangle=bool)¶
Set Triangle Material ID
- Parameters:
target_mesh (DynamicMesh) –
triangle_id (int32) –
material_id (int32) –
defer_change_notifications (bool) –
- Returns:
is_valid_triangle (bool):
- Return type: