Language:
Discover
By Skill Level
By Category

USkeletalMesh

Choose your OS:

Inheritance Hierarchy

Syntax

class USkeletalMesh :
    public UObject ,
    public IInterface_CollisionDataProvider ,
    public IInterface_AssetUserData ,
    public INodeMappingProviderInterface

Remarks

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).

Variables

Name Description

Public variable

UAssetImportDat ...

 

AssetImportData

Importing data and options used for this mesh

Protected variable

TArray < UAssetU ...

 

AssetUserData

Array of user data stored with the asset

Public variable

uint8 : 1

 

bEnablePerPolyCollision

Uses skinned data for collision data.

Public variable

uint8 : 1

 

bHasActiveClothingAssets

Caching optimization to avoid recalculating in non-editor builds

Public variable

uint8 : 1

 

bHasBeenSimplified

True if this mesh has ever been simplified with Simplygon.

Public variable

bool

 

bHasCustomDefaultEditorCamera

Should we use a custom camera transform when viewing this mesh in the tools

Public variable

uint8 : 1

 

bHasVertexColors

Whether or not the mesh has vertex colors

Public variable

UBodySetup *...

 

BodySetup

Physics data for the per poly collision case. In 99% of cases you will not need this and are better off using simple ragdoll collision (physics asset)

Public variable

uint32 : 1

 

bRequiresLODHysteresisConversion

If true on post load we need to calculate resolution independent LOD hysteresis from the loaded LOD hysteresis.

Public variable

uint32 : 1

 

bRequiresLODScreenSizeConversion

If true on post load we need to calculate resolution independent Display Factors from the loaded LOD screen sizes.

Public variable

uint8 : 1

 

bUseFullPrecisionUVs

If true, use 32 bit UVs. If false, use 16 bit UVs to save memory

Public variable

uint8 : 1

 

bUseHighPrecisionTangentBasis

If true, tangents will be stored at 16 bit vs 8 bit precision

Public variable

FVector

 

DefaultEditorCameraLocation

Default camera location

Public variable

FVector

 

DefaultEditorCameraLookAt

Default camera look at

Public variable

float

 

DefaultEditorCameraOrthoZoom

Default camera ortho zoom

Public variable

FRotator

 

DefaultEditorCameraRotation

Default camera rotation

Public variable

float

 

FloorOffset

Height offset for the floor mesh in the editor

Public variable

USkeletalMeshLO ...

 

LODSettings

Public variable

TArray < FSkelet ...

 

Materials

List of materials applied to this mesh.

Public variable

TArray < UClothi ...

 

MeshClothingAssets

Clothing assets imported to this mesh.

Public variable

FPerPlatformInt

 

MinLod

Minimum LOD to render.

Public variable

TMap < FName , in ...

 

MorphTargetIndexMap

Map of morph target name to index into USkeletalMesh::MorphTargets

Public variable

TArray < UMorphT ...

 

MorphTargets

WITH_EDITORONLY_DATA.

Protected variable

FVector

 

NegativeBoundsExtension

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.

Public variable

TArray < class U ...

 

NodeMappingData

Mapping data that is saved

Protected variable

FOnMeshChanged

 

OnMeshChanged

Public variable

UPhysicsAsset &...

 

PhysicsAsset

Physics and collision information used for this USkeletalMesh , set up in Physics Asset Editor.

Protected variable

FVector

 

PositiveBoundsExtension

The properties below are protected to force the use of the Set* methods for this data in code so we can keep the extended bounds up to date after changing the data.

Public variable

TSubclassOf < UA ...

 

PostProcessAnimBlueprint

Animation Blueprint class to run as a post process for this mesh.

Public variable

FPreviewAssetAt ...

 

PreviewAttachedAssetContainer

Attached assets component for this mesh

Public variable

TArray < FMatrix ...

 

RefBasesInvMatrix

Reference skeleton precomputed bases.

Public variable

FReferenceSkele ...

 

RefSkeleton

New Reference skeleton type

Public variable

FRenderCommandF ...

 

ReleaseResourcesFence

A fence which is used to keep track of the rendering thread releasing the static mesh resources.

Public variable

TArray < FTransf ...

 

RetargetBasePose

This is buffer that saves pose that is used by retargeting

Protected variable

FSkeletalMeshSa ...

 

SamplingInfo

Defines if and how to generate a set of precomputed data allowing targeted and fast sampling of this mesh on the CPU.

Public variable

UPhysicsAsset &...

 

ShadowPhysicsAsset

Physics asset whose shapes will be used for shadowing when components have bCastCharacterCapsuleDirectShadow or bCastCharacterCapsuleIndirectShadow enabled.

Public variable

USkeleton *

 

Skeleton

Skeleton of this skeletal mesh

Public variable

TEnumAsByte < EA ...

 

SkelMirrorAxis

Public variable

TEnumAsByte < EA ...

 

SkelMirrorFlipAxis

Public variable

TArray < struct ...

 

SkelMirrorTable

List of bones that should be mirrored.

Public variable

UThumbnailInfo ...

 

ThumbnailInfo

Information for thumbnail rendering

Public variable

FGuid

 

VertexColorGuid

The guid to compute the ddc key, it must be dirty when we change the vertex color.

Constructors

Name Description

Public function

USkeletalMesh

(
    const FObjectInitializer & ObjectIn...
)

USkeletalMesh

Public function

USkeletalMesh

(
    FVTableHelper & Helper
)

This is declared so we can use TUniquePtr with just a forward declare of that class.

Destructors

Name Description

Public function

~USkeletalMesh()

Functions

Name Description

Public function

void

 

AddBoneToReductionSetting

(
    int32 LODIndex,
    FName BoneName
)

Public function

void

 

AddBoneToReductionSetting

(
    int32 LODIndex,
    const TArray < FName >& BoneNames
)

Public function

void

 

AddClothingAsset

(
    UClothingAssetBase * InNewAsset
)

Adds an asset to this mesh with validation and event broadcast

Public function

void

 

AddLODInfo

(
    const FSkeletalMeshLODInfo & NewLOD...
)

Add New LOD info entry with entry

This is used by import code, where they want to override this

Public function

FSkeletalMes ...

 

AddLODInfo()

Add New LOD info entry to LODInfo array

Public function Static

void

 

AddReferencedObjects

(
    UObject * InThis,
    FReferenceCollector & Collector
)

Public function

void

 

AllocateResourceForRendering()

Allocate a new FSkeletalMeshRenderData and assign to SkeletalMeshRenderData member.

Public function

void

 

BuildPhysicsData()

Trigger a physics build to ensure per poly collision is created

Public function

void

 

CalculateExtendedBounds()

Calculate the extended bounds based on the imported bounds and the extension values

Public function

void

 

CalculateInvRefMatrices()

Pre-calculate refpose-to-local transforms.

Public function Static

void

 

CalculateRequiredBones

(
    FSkeletalMeshLODModel & LODModel,
    const FReferenceSkeleton & RefSkele...,
    const TMap < FBoneIndexType , FBoneIn ...
)

Calculate the required bones for a Skeletal Mesh LOD, including possible extra influences

Public function

bool

 

ComputeActiveClothingAssets()

Compute whether or not any bound clothing assets exist for this mesh

Public function

void

 

ConvertLegacyLODScreenSize()

WITH_EDITOR.

Public function

void

 

CopyMirrorTableFrom

(
    USkeletalMesh * SrcMesh
)

Utility for copying and converting a mirroring table from another USkeletalMesh .

Public function

void

 

CreateBodySetup()

Public function

void

 

DebugVerifySkeletalMeshLOD()

#if WITH_EDITOR

Public function

void

 

ExportMirrorTable

(
    TArray < FBoneMirrorExport >& Mirro...
)

Utility for copying and converting a mirroring table from another SkeletalMesh.

Public function

UMorphTarget ...

 

FindMorphTarget

(
    FName MorphTargetName
)

Find a named MorphTarget from the MorphSets array in the SkinnedMeshComponent.

Public function

UMorphTarget ...

 

FindMorphTargetAndIndex

(
    FName MorphTargetName,
    int32 & OutIndex
)

Public function

USkeletalMes ...

 

FindSocket

(
    FName InSocketName
)

WITH_EDITOR.

Public function

USkeletalMes ...

 

FindSocketAndIndex

(
    FName InSocketName,
    int32 & OutIndex
)

Find a socket object in this SkeletalMesh by name.

Public function

TArray < USke ...

 

GetActiveSocketList()

Returns the "active" socket list - all sockets from this mesh plus all non-duplicates from the skeleton Const ref return value as this cannot be modified externally

Public function

UBodySetup &...

 

GetBodySetup()

Public function

FBoxSphereBo ...

 

GetBounds()

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

Public function

UClothingAss ...

 

GetClothingAsset

(
    const FGuid & InAssetGuid
)

Get a clothing asset from its associated GUID (returns nullptr if no match is found)

Public function

int32

 

GetClothingAssetIndex

(
    UClothingAssetBase * InAsset
)

Get the index in the clothing asset array for a given asset (INDEX_NONE if InAsset isn't in the array)

Public function

int32

 

GetClothingAssetIndex

(
    const FGuid & InAssetGuid
)

Get the index in the clothing asset array for a given asset GUID (INDEX_NONE if there is no match)

Public function

void

 

GetClothingAssetsInUse

(
    TArray < UClothingAssetBase * > ...
)

Populates OutClothingAssets with all clothing assets that are mapped to sections in the mesh.

Public function

FMatrix

 

GetComposedRefPoseMatrix

(
    FName InBoneName
)

Get the component orientation of a bone or socket. Transforms by parent bones.

Public function

FMatrix

 

GetComposedRefPoseMatrix

(
    int32 InBoneIndex
)

Public function

const USkele ...

 

GetDefaultLODSetting()

Get Default LOD Setting of this mesh

Public function

FBoxSphereBo ...

 

GetImportedBounds()

Get the original imported bounds of the skel mesh

Public function

FSkeletalMes ...

 

GetImportedModel()

Get the imported data for this skeletal mesh.

Public function

FSkeletalMes ...

 

GetLODInfo

(
    int32 Index
)

Get LODInfo of the given index non-const

Public function

const FSkele ...

 

GetLODInfo

(
    int32 Index
)

Get LODInfo of the given index const

Public function

TArray < FSke ...

 

GetLODInfoArray()

Returns whole array of LODInfo

Public function

int32

 

GetLODNum()

Returns total number of LOD

Public function

TArray < USke ...

 

GetMeshOnlySocketList()

Returns the mesh only socket list - this ignores any sockets in the skeleton Return value is a non-const reference so the socket list can be changed

Public function

const TArray ...

 

GetMeshOnlySocketList()

Const version Returns the mesh only socket list - this ignores any sockets in the skeleton Return value is a non-const reference so the socket list can be changed

Public function

UNodeMapping ...

 

GetNodeMappingContainer

(
    UBlueprint * SourceAsset
)

Public function

FOnMeshChang ...

 

GetOnMeshChanged()

Public function

FMatrix

 

GetRefPoseMatrix

(
    int32 BoneIndex
)

Public function

FSkeletalMes ...

 

GetResourceForRendering()

Get the data to use for rendering.

Public function

const FSkele ...

 

GetSamplingInfo()

Public function

UClothingAss ...

 

GetSectionClothingAsset

(
    int32 InLodIndex,
    int32 InSectionIndex
)

WITH_EDITOR.

Public function

const UCloth ...

 

GetSectionClothingAsset

(
    int32 InLodIndex,
    int32 InSectionIndex
)

Public function

USkeletalMes ...

 

GetSocketByIndex

(
    int32 Index
)

Returns a socket by index.

Public function

const FMeshU ...

 

GetUVChannelData

(
    int32 MaterialIndex
)

Returns the UV channel data for a given material index.

Public function

uint32

 

GetVertexBufferFlags()

Computes flags for building vertex buffers.

Public function

bool

 

HasActiveClothingAssets()

Get whether or not any bound clothing assets exist for this mesh

Public function

bool

 

HasActiveClothingAssetsForLOD

(
    int32 LODIndex
)

Get whether or not any bound clothing assets exist for this mesh's given LOD

Public function Virtual

bool

 

HasCustomActorFactory()

This is a bit hacky.

Public function Virtual

bool

 

HasCustomActorReimportFactory()

This is a bit hacky.

Public function

void

 

ImportMirrorTable

(
    TArray < FBoneMirrorExport >& Mirro...
)

Utility for copying and converting a mirroring table from another SkeletalMesh.

Public function

void

 

InitBoneMirrorInfo()

Allocate and initialise bone mirroring table for this skeletal mesh.

Public function

void

 

InitMorphTargets()

Initialize MorphSets look up table : MorphTargetIndexMap

Public function

void

 

InitMorphTargetsAndRebuildRenderData()

Initialize morph targets and rebuild the render data

Public function

void

 

InitResources()

Initialize the mesh's render resources.

Public function

bool

 

IsSectionUsingCloth

(
    int32 InSectionIndex,
    bool bCheckCorrespondingSections
)

Checks whether the provided section is using APEX cloth.

Public function

bool

 

IsValidLODIndex

(
    int32 Index
)

Return true if given index's LOD is valid

Public function

bool

 

MirrorTableIsGood

(
    FString & ProblemBones
)

Utility for checking that the bone mirroring table of this mesh is good.

Public function

bool

 

NeedCPUData

(
    int32 LODIndex
)

True if this mesh LOD needs to keep it's data on CPU.

Public function

int32

 

NumSockets()

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

Public function

FOnPostMeshC ...

 

OnPostMeshCached()

Get multicast delegate broadcast post to mesh data caching

Public function

bool

 

RegisterMorphTarget

(
    UMorphTarget * MorphTarget,
    bool bInvalidateRenderData
)

If name conflicts, it will overwrite the reference

Public function

FDelegateHan ...

 

RegisterOnClothingChange

(
    const FSimpleMulticastDelegate::FDe...
)

WITH_EDITORONLY_DATA.

Public function

void

 

ReleaseCPUResources()

#if WITH_EDITOR

Public function

void

 

ReleaseResources()

Releases the mesh's render resources.

Public function

void

 

RemoveClothingAsset

(
    int32 InLodIndex,
    int32 InSectionIndex
)

WITH_EDITOR && WITH_APEX_CLOTHING.

Public function

void

 

RemoveLegacyClothingSections()

WITH_APEX_CLOTHING.

Public function

void

 

RemoveLODInfo

(
    int32 Index
)

Remove LOD info of given index

Public function

void

 

RemoveMeshSection

(
    int32 InLodIndex,
    int32 InSectionIndex
)

Removes a specified section from the skeletal mesh, this is a destructive action

Public function

void

 

ResetLODInfo()

Reset whole entry

Public function

void

 

SetImportedBounds

(
    const FBoxSphereBounds & InBounds
)

Set the original imported bounds of the skel mesh, will recalculate extended bounds

Public function

void

 

SetLODSettings

(
    USkeletalMeshLODSettings * InLO...
)

WITH_EDITORONLY_DATA.

Public function

void

 

SetNegativeBoundsExtension

(
    const FVector & InExtension
)

Set bound extension values in the negative direction of XYZ, positive value increases bound size

Public function

void

 

SetPositiveBoundsExtension

(
    const FVector & InExtension
)

Set bound extension values in the positive direction of XYZ, positive value increases bound size

Public function

void

 

SetSamplingInfo

(
    const FSkeletalMeshSamplingInfo & I...
)

Public function

void

 

UnregisterAllMorphTarget()

Public function

void

 

UnregisterMorphTarget

(
    UMorphTarget * MorphTarget
)

Public function

void

 

UnregisterOnClothingChange

(
    const FDelegateHandle & InHandle
)

Public function

void

 

UpdateGenerateUpToData()

Public function

void

 

UpdateUVChannelData

(
    bool bResetOverrides
)

Update the material UV channel data used by the texture streamer.

Public function

void

 

UpgradeOldClothingAssets()

Take clothing assets that were imported using APEX files before we moved away from the APEX simulation framework and upgrade them to UE4 UClothingAssets.

Public function

void

 

ValidateBoundsExtension()

Alters the bounds extension values to fit correctly into the current bounds (so negative values never extend the bounds etc.)

Public function

int32

 

ValidatePreviewAttachedObjects()

Makes sure all attached objects are valid and removes any that aren't.

NumberOfBrokenAssets

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

WITH_EDITOR.

Public function Virtual

void

 

GetAssetRegistryTagMetadata

(
    TMap < FName , FAssetRegistryTagMetad ...
)

Gathers a collection of asset registry tag metadata

Public function Virtual

void

 

GetAssetRegistryTags

(
    TArray < FAssetRegistryTag >& OutTa...
)

Public function Virtual

FString

 

GetDesc()

Returns a one line description of an object for viewing in the thumbnail view of the generic browser

Public function Virtual

FString

 

GetDetailedInfoInternal()

This will return detail info about this specific object.

Public function Virtual

void

 

GetResourceSizeEx

(
    FResourceSizeEx & CumulativeResourc...
)

Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific).

Public function Virtual

bool

 

IsReadyForFinishDestroy()

Called to check if the object is ready for FinishDestroy.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

void

 

PostLoad()

WITH_EDITOR.

Public function Virtual

void

 

PreSave

(
    const ITargetPlatform * TargetP...
)

Presave function.

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject serializer.

Overridden from IInterface_CollisionDataProvider

Name Description

Public function Virtual

bool

 

ContainsPhysicsTriMeshData

(
    bool InUseAllTriData
)

Interface for checking if the implementing objects contains triangle mesh collision data

Public function Virtual

bool

 

GetPhysicsTriMeshData

(
    FTriMeshCollisionData * Collisi...,
    bool InUseAllTriData
)

Interface for retrieving triangle mesh collision data from the implementing object

Public function Virtual

bool

 

WantsNegXTriMesh()

Do we want to create a negative version of this mesh

Overridden from IInterface_AssetUserData

Name Description

Public function Virtual

void

 

AddAssetUserData

(
    UAssetUserData * InUserData
)

Public function Virtual

const TArray ...

 

GetAssetUserDataArray()

Public function Virtual

UAssetUserDa ...

 

GetAssetUserDataOfClass

(
    TSubclassOf < UAssetUserData > InUse...
)

Public function Virtual

void

 

RemoveUserDataOfClass

(
    TSubclassOf < UAssetUserData > InUse...
)

Typedefs

Name

Description

FOnMeshChanged

Notification when anything changed

See Also

References

Module

Engine

Header

Runtime/Engine/Classes/Engine/SkeletalMesh.h