unreal.SkeletalMesh

class unreal.SkeletalMesh(outer=None, name='None')

Bases: unreal.Object

SkeletalMesh is geometry bound to a hierarchical skeleton of bones which can be animated for the purpose of deforming the mesh. Skeletal Meshes are built up of two parts; a set of polygons composed to make up the surface of the mesh, and a hierarchical skeleton which can be used to animate the polygons. The 3D models, rigging, and animations are created in an external modeling and animation application (3DSMax, Maya, Softimage, etc). https://docs.unrealengine.com/latest/INT/Engine/Content/Types/SkeletalMeshes/:

C++ Source:

  • Module: Engine
  • File: SkeletalMesh.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_import_data (AssetImportData): [Read-Write] Importing data and options used for this mesh
  • asset_user_data (Array(AssetUserData)): [Read-Write] Array of user data stored with the asset
  • enable_per_poly_collision (bool): [Read-Write] Uses skinned data for collision data. Per poly collision cannot be used for simulation, in most cases you are better off using the physics asset
  • lod_info (Array(SkeletalMeshLODInfo)): [Read-Write] Struct containing information for each LOD level, such as materials to use, and when use the LOD.
  • lod_settings (SkeletalMeshLODSettings): [Read-Write] LODSettings
  • materials (Array(SkeletalMaterial)): [Read-Write] List of materials applied to this mesh.
  • mesh_clothing_assets (Array(ClothingAssetBase)): [Read-Write] Clothing assets imported to this mesh. May or may not be in use currently on the mesh. Ordering not guaranteed, use the provided getters to access elements in this array whenever possible
  • min_lod (PerPlatformInt): [Read-Write] Minimum LOD to render. Can be overridden per component as well as set here for all mesh instances here
  • morph_targets (Array(MorphTarget)): [Read-Write] Morph Targets
  • negative_bounds_extension (Vector): [Read-Write] Bound extension values in addition to imported bound in the negative direction of XYZ,
    positive value increases bound size and negative value decreases bound size. The final bound would be from [Imported Bound - Negative Bound] to [Imported Bound + Positive Bound].
  • node_mapping_data (Array(NodeMappingContainer)): [Read-Write] Mapping data that is saved
  • physics_asset (PhysicsAsset): [Read-Write] Physics and collision information used for this USkeletalMesh, set up in Physics Asset Editor. This is used for per-bone hit detection, accurate bounding box calculation and ragdoll physics for example.
  • positive_bounds_extension (Vector): [Read-Write] Bound extension values in addition to imported bound in the positive direction of XYZ,
    positive value increases bound size and negative value decreases bound size. The final bound would be from [Imported Bound - Negative Bound] to [Imported Bound + Positive Bound].
  • post_process_anim_blueprint (type(Class)): [Read-Write] Animation Blueprint class to run as a post process for this mesh. This blueprint will be ran before physics, but after the main anim instance for any skeletal mesh component using this mesh.
  • sampling_info (SkeletalMeshSamplingInfo): [Read-Write] Defines if and how to generate a set of precomputed data allowing targeted and fast sampling of this mesh on the CPU.
  • shadow_physics_asset (PhysicsAsset): [Read-Write] Physics asset whose shapes will be used for shadowing when components have bCastCharacterCapsuleDirectShadow or bCastCharacterCapsuleIndirectShadow enabled. Only spheres and sphyl shapes in the physics asset can be supported. The more shapes used, the higher the cost of the capsule shadows will be.
  • skel_mirror_axis (AxisType): [Read-Write] Skel Mirror Axis
  • skel_mirror_flip_axis (AxisType): [Read-Write] Skel Mirror Flip Axis
  • skel_mirror_table (Array(BoneMirrorInfo)): [Read-Write] List of bones that should be mirrored.
  • skeleton (Skeleton): [Read-Only] Skeleton of this skeletal mesh *
  • thumbnail_info (ThumbnailInfo): [Read-Only] Information for thumbnail rendering
  • use_full_precision_u_vs (bool): [Read-Write] If true, use 32 bit UVs. If false, use 16 bit UVs to save memory
  • use_high_precision_tangent_basis (bool): [Read-Write] If true, tangents will be stored at 16 bit vs 8 bit precision
find_socket(socket_name) → SkeletalMeshSocket

Find a socket object in this SkeletalMesh by name. Entering NAME_None will return NULL. If there are multiple sockets with the same name, will return the first one.

Parameters:socket_name (Name) –
Returns:
Return type:SkeletalMeshSocket
find_socket_and_index(socket_name) -> (SkeletalMeshSocket, out_index=int32)

Find a socket object in this SkeletalMesh by name. Entering NAME_None will return NULL. If there are multiple sockets with the same name, will return the first one. Also returns the index for the socket allowing for future fast access via GetSocketByIndex()

Parameters:socket_name (Name) –
Returns:out_index (int32):
Return type:int32
get_bounds() → BoxSphereBounds

Get the extended bounds of this mesh (imported bounds plus bounds extension)

Returns:
Return type:BoxSphereBounds
get_imported_bounds() → BoxSphereBounds

Get the original imported bounds of the skel mesh

Returns:
Return type:BoxSphereBounds
get_node_mapping_container(source_asset) → NodeMappingContainer

Get Node Mapping Container

Parameters:source_asset (Blueprint) –
Returns:
Return type:NodeMappingContainer
get_socket_by_index(index) → SkeletalMeshSocket

Returns a socket by index. Max index is NumSockets(). The meshes sockets are accessed first, then the skeletons.

Parameters:index (int32) –
Returns:
Return type:SkeletalMeshSocket
is_section_using_cloth(section_index, check_corresponding_sections=True) → bool

Checks whether the provided section is using APEX cloth. if bCheckCorrespondingSections is true disabled sections will defer to correspond sections to see if they use cloth (non-cloth sections are disabled and another section added when cloth is enabled, using this flag allows for a check on the original section to succeed)

Parameters:
  • section_index (int32) – Index to check
  • check_corresponding_sections (bool) – Whether to check corresponding sections for disabled sections
Returns:

Return type:

bool

lod_settings

(SkeletalMeshLODSettings) – [Read-Write] LODSettings

materials

(Array(SkeletalMaterial)) – [Read-Only] List of materials applied to this mesh.

mesh_clothing_assets

(Array(ClothingAssetBase)) – [Read-Only] Clothing assets imported to this mesh. May or may not be in use currently on the mesh. Ordering not guaranteed, use the provided getters to access elements in this array whenever possible

morph_targets

(Array(MorphTarget)) – [Read-Write] Morph Targets

negative_bounds_extension

(Vector) – [Read-Only] Bound extension values in addition to imported bound in the negative direction of XYZ, positive value increases bound size and negative value decreases bound size. The final bound would be from [Imported Bound - Negative Bound] to [Imported Bound + Positive Bound].

node_mapping_data

(Array(NodeMappingContainer)) – [Read-Only] Mapping data that is saved

num_sockets() → int32

Returns the number of sockets available. Both on this mesh and it’s skeleton.

Returns:
Return type:int32
physics_asset

(PhysicsAsset) – [Read-Only] Physics and collision information used for this USkeletalMesh, set up in Physics Asset Editor. This is used for per-bone hit detection, accurate bounding box calculation and ragdoll physics for example.

positive_bounds_extension

(Vector) – [Read-Only] Bound extension values in addition to imported bound in the positive direction of XYZ, positive value increases bound size and negative value decreases bound size. The final bound would be from [Imported Bound - Negative Bound] to [Imported Bound + Positive Bound].

post_process_anim_blueprint

(type(Class)) – [Read-Only] Animation Blueprint class to run as a post process for this mesh. This blueprint will be ran before physics, but after the main anim instance for any skeletal mesh component using this mesh.

shadow_physics_asset

(PhysicsAsset) – [Read-Only] Physics asset whose shapes will be used for shadowing when components have bCastCharacterCapsuleDirectShadow or bCastCharacterCapsuleIndirectShadow enabled. Only spheres and sphyl shapes in the physics asset can be supported. The more shapes used, the higher the cost of the capsule shadows will be.

skeleton

(Skeleton) – [Read-Only] Skeleton of this skeletal mesh *