unreal.SkeletalMeshEditorSubsystem
¶
- class unreal.SkeletalMeshEditorSubsystem(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
EditorSubsystem
USkeletalMeshEditorSubsystem Subsystem for exposing skeletal mesh functionality to scripts
C++ Source:
Module: SkeletalMeshEditor
File: SkeletalMeshEditorSubsystem.h
- classmethod assign_physics_asset(target_mesh, physics_asset) bool ¶
Assigns a PhysicsAsset to the given SkeletalMesh if it is compatible. Passing nullptr / None as the physics asset will always succeed and will clear the physics asset assignment for the target SkeletalMesh
- Parameters:
target_mesh (SkeletalMesh) – The mesh to attempt to assign the PhysicsAsset to
physics_asset (PhysicsAsset) – The physics asset to assign to the provided mesh (or nullptr/None)
- Returns:
Whether the physics asset was successfully assigned to the mesh
- Return type:
- classmethod create_physics_asset(skeletal_mesh) PhysicsAsset ¶
This function creates a PhysicsAsset for the given SkeletalMesh with the same settings as if it were created through FBX import
- Parameters:
skeletal_mesh (SkeletalMesh) –
- Return type:
- classmethod get_lod_build_settings(skeletal_mesh, lod_index) SkeletalMeshBuildSettings ¶
Copy the build options with the specified LOD build settings.
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to process.
lod_index (int32) – The LOD we get the reduction settings.
- Returns:
out_build_options (SkeletalMeshBuildSettings): The build settings where we copy the build options.
- Return type:
- classmethod get_lod_count(skeletal_mesh) int32 ¶
Retrieve the number of LOD contain in the specified skeletal mesh.
- Parameters:
skeletal_mesh (SkeletalMesh) –
- Returns:
The LOD number.
- Return type:
int32
- get_lod_material_slot(skeletal_mesh, lod_index, section_index) int32 ¶
Gets the material slot used for a specific LOD section.
- Parameters:
skeletal_mesh (SkeletalMesh) – SkeletalMesh to get the material index from.
lod_index (int32) – Index of the StaticMesh LOD.
section_index (int32) – Index of the StaticMesh Section.
- Returns:
MaterialSlotIndex Index of the material slot used by the section or INDEX_NONE in case of error.
- Return type:
int32
- get_num_sections(skeletal_mesh, lod_index) int32 ¶
Get number of sections for a LOD of a Skeletal Mesh
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to get number of vertices from.
lod_index (int32) – Index of the mesh LOD.
- Returns:
Number of sections. Returns INDEX_NONE if invalid mesh or LOD index.
- Return type:
int32
- get_num_verts(skeletal_mesh, lod_index) int32 ¶
Get number of mesh vertices for an LOD of a Skeletal Mesh
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to get number of vertices from.
lod_index (int32) – Index of the mesh LOD.
- Returns:
Number of vertices. Returns 0 if invalid mesh or LOD index.
- Return type:
int32
- get_section_cast_shadow(skeletal_mesh, lod_index, section_index) bool or None ¶
Get bCastShadow from a section of a LOD of a Skeletal Mesh
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to get number of vertices from.
lod_index (int32) – Index of the mesh LOD.
section_index (int32) – Index of the LOD section.
- Returns:
false if invalid mesh or LOD index or section index.
out_cast_shadow (bool): The function will set the bCastShadow used by the section
- Return type:
bool or None
- get_section_recompute_tangent(skeletal_mesh, lod_index, section_index) bool or None ¶
Get bRecomputeTangent from a section of a LOD of a Skeletal Mesh
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to get number of vertices from.
lod_index (int32) – Index of the mesh LOD.
section_index (int32) – Index of the LOD section.
- Returns:
false if invalid mesh or LOD index or section index.
out_recompute_tangent (bool): The function will set the bRecomputeTangent used by the section
- Return type:
bool or None
- get_section_recompute_tangents_vertex_mask_channel(skeletal_mesh, lod_index, section_index) uint8 or None ¶
Get RecomputeTangentsVertexMaskChannel from a section of a LOD of a Skeletal Mesh
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to get number of vertices from.
lod_index (int32) – Index of the mesh LOD.
section_index (int32) – Index of the LOD section.
- Returns:
false if invalid mesh or LOD index or section index.
out_recompute_tangents_vertex_mask_channel (uint8): The function will set the RecomputeTangentsVertexMaskChannel used by the section
- Return type:
uint8 or None
- get_section_visible_in_ray_tracing(skeletal_mesh, lod_index, section_index) bool or None ¶
Get bVisibleInRayTracing from a section of a LOD of a Skeletal Mesh
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to get number of vertices from.
lod_index (int32) – Index of the mesh LOD.
section_index (int32) – Index of the LOD section.
- Returns:
false if invalid mesh or LOD index or section index.
out_visible_in_ray_tracing (bool): The function will set the bVisibleInRayTracing used by the section
- Return type:
bool or None
- classmethod import_lod(base_mesh, lod_index, source_filename) int32 ¶
Import or re-import a LOD into the specified base mesh. If the LOD do not exist it will import it and add it to the base static mesh. If the LOD already exist it will re-import the specified LOD.
- Parameters:
base_mesh (SkeletalMesh) –
lod_index (int32) –
source_filename (str) –
- Returns:
The index of the LOD that was imported or re-imported. Will return INDEX_NONE if anything goes bad.
- Return type:
int32
- classmethod is_physics_asset_compatible(target_mesh, physics_asset) bool ¶
Checks whether a physics asset is compatible with the given SkeletalMesh
- Parameters:
target_mesh (SkeletalMesh) – The mesh to test for compatibility
physics_asset (PhysicsAsset) – The PhysicsAsset to test for compatibility
- Returns:
Whether the physics asset is compatible with the target SkeletalMesh
- Return type:
- classmethod regenerate_lod(skeletal_mesh, new_lod_count=0, regenerate_even_if_imported=False, generate_base_lod=False) bool ¶
Regenerate LODs of the mesh
- Parameters:
skeletal_mesh (SkeletalMesh) – The mesh that will regenerate LOD
new_lod_count (int32) – Set valid value (>0) if you want to change LOD count. Otherwise, it will use the current LOD and regenerate
regenerate_even_if_imported (bool) – If this is true, it only regenerate even if this LOD was imported before If false, it will regenerate for only previously auto generated ones
generate_base_lod (bool) – If this is true and there is some reduction data, the base LOD will be reduce according to the settings
- Returns:
true if succeed. If mesh reduction is not available this will return false.
- Return type:
- classmethod reimport_all_custom_lo_ds(skeletal_mesh) bool ¶
Re-import the specified skeletal mesh and all the custom LODs.
- Parameters:
skeletal_mesh (SkeletalMesh) –
- Returns:
true if re-import works, false otherwise see log for explanation.
- Return type:
- classmethod rename_socket(skeletal_mesh, old_name, new_name) bool ¶
Rename a socket within a skeleton
- Parameters:
skeletal_mesh (SkeletalMesh) – The mesh inside which we are renaming a socket
old_name (Name) – The old name of the socket
new_name (Name) – The new name of the socket
- Returns:
true if the renaming succeeded.
- Return type:
- classmethod set_lod_build_settings(skeletal_mesh, lod_index, build_options) None ¶
Set the LOD build options for the specified LOD index.
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to process.
lod_index (int32) – The LOD we will apply the build settings.
build_options (SkeletalMeshBuildSettings) – The build settings we want to apply to the LOD.
- set_section_cast_shadow(skeletal_mesh, lod_index, section_index, cast_shadow) bool ¶
Set bCastShadow for a section of a LOD of a Skeletal Mesh.
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to get number of vertices from.
lod_index (int32) – Index of the mesh LOD.
section_index (int32) – Index of the LOD section.
cast_shadow (bool) – The function will set the bCastShadow used by the section
- Returns:
false if invalid mesh or LOD index or section index.
- Return type:
- set_section_recompute_tangent(skeletal_mesh, lod_index, section_index, recompute_tangent) bool ¶
Set bRecomputeTangent for a section of a LOD of a Skeletal Mesh.
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to get number of vertices from.
lod_index (int32) – Index of the mesh LOD.
section_index (int32) – Index of the LOD section.
recompute_tangent (bool) – The function will set the bRecomputeTangent used by the section
- Returns:
false if invalid mesh or LOD index or section index.
- Return type:
- set_section_recompute_tangents_vertex_mask_channel(skeletal_mesh, lod_index, section_index, recompute_tangents_vertex_mask_channel) bool ¶
Set RecomputeTangentsVertexMaskChannel for a section of a LOD of a Skeletal Mesh.
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to get number of vertices from.
lod_index (int32) – Index of the mesh LOD.
section_index (int32) – Index of the LOD section.
recompute_tangents_vertex_mask_channel (uint8) – The function will set the RecomputeTangentsVertexMaskChannel used by the section
- Returns:
false if invalid mesh or LOD index or section index.
- Return type:
- set_section_visible_in_ray_tracing(skeletal_mesh, lod_index, section_index, visible_in_ray_tracing) bool ¶
Set bVisibleInRayTracing for a section of a LOD of a Skeletal Mesh.
- Parameters:
skeletal_mesh (SkeletalMesh) – Mesh to get number of vertices from.
lod_index (int32) – Index of the mesh LOD.
section_index (int32) – Index of the LOD section.
visible_in_ray_tracing (bool) – The function will set the bVisibleInRayTracing used by the section
- Returns:
false if invalid mesh or LOD index or section index.
- Return type: