Language:
Discover
By Skill Level
By Category

USkinnedMeshComponent

Choose your OS:

Inheritance Hierarchy

Syntax

class USkinnedMeshComponent : public UMeshComponent

Remarks

Skinned mesh component that supports bone skinned mesh rendering. This class does not support animation.

Variables

Name Description

Public variable

TArray < FActive ...

 

ActiveMorphTargets

Array indicating all active morph targets.

Public variable

FAnimUpdateRate ...

 

AnimUpdateRateParams

Animation update rate control.

Protected variable

bool

 

bCachedLocalBoundsUpToDate

True when CachedLocalBounds is up to date.

Public variable

uint32 : 1

 

bCanHighlightSelectedSections

Whether or not we can highlight selected sections - this should really only be done in the editor

Public variable

uint32 : 1

 

bCastCapsuleDirectShadow

Whether to use the capsule representation (when present) from a skeletal mesh's ShadowPhysicsAsset for direct shadowing from lights.

Public variable

uint32 : 1

 

bCastCapsuleIndirectShadow

Whether to use the capsule representation (when present) from a skeletal mesh's ShadowPhysicsAsset for shadowing indirect lighting (from lightmaps or skylight).

Public variable

uint32 : 1

 

bComponentUseFixedSkelBounds

Misc.When true, skip using the physics asset etc.

Public variable

uint32 : 1

 

bConsiderAllBodiesForBounds

If true, when updating bounds from a PhysicsAsset, consider all BodySetups, not just those flagged with bConsiderForBounds.

Public variable

uint32 : 1

 

bCPUSkinning

Whether or not to CPU skin this component, requires render data refresh after changing

Public variable

uint32 : 1

 

bDisableMorphTarget

Disable Morphtarget for this component.

Public variable

bool

 

bDisplayDebugUpdateRateOptimizations

Enable on screen debugging of update rate optimization.

Protected variable

bool

 

bDoubleBufferedComponentSpaceTransforms

Are we using double buffered ComponentSpaceTransforms

Public variable

bool

 

bEnableUpdateRateOptimizations

Update Rate.

Public variable

uint32 : 1

 

bForceWireframe

Forces the mesh to draw in wireframe mode.

Public variable

uint32 : 1

 

bHideSkin

Don't bother rendering the skin.

Protected variable

bool

 

bNeedToFlipSpaceBaseBuffers

Track whether we still need to flip to recently modified buffer

Public variable

TArray < uint8 >

 

BoneVisibilityStates

Array of bone visibilities (containing one of the values in EBoneVisibilityStatus for each bone).

Public variable

uint32 : 1

 

bPerBoneMotionBlur

If true, use per-bone motion blur on this skeletal mesh (requires additional rendering, can be disabled to save performance).

Public variable

uint32 : 1

 

bRecentlyRendered

True if mesh has been recently rendered, false otherwise

Public variable

uint32 : 1

 

bUseBoundsFromMasterPoseComponent

When true, we will just using the bounds from our MasterPoseComponent.

Protected variable

FBoxSphereBound ...

 

CachedLocalBounds

LocalBounds cached, so they're computed just once.

Public variable

float

 

CapsuleIndirectShadowMinVisibility

Controls how dark the capsule indirect shadow can be.

Public variable

int32

 

ChunkIndexPreview

Index of the chunk to preview... If set to -1, all chunks will be rendered

Protected variable

int32

 

CurrentEditableComponentTransforms

The index for the ComponentSpaceTransforms buffer we can currently write to

Protected variable

int32

 

CurrentReadComponentTransforms

The index for the ComponentSpaceTransforms buffer we can currently read from

Public variable

uint8

 

CustomSortAlternateIndexMode

Editor only.

Public variable

int32

 

ForcedLodModel

Level of detail.If 0, auto-select LOD level. if >0, force to (ForcedLodModel-1).

Public variable

TArray < struct ...

 

LODInfo

LOD array info. Each index will correspond to the LOD index

Protected variable

TArray < int32 >

 

MasterBoneMap

Mapping between bone indices in this component and the parent one.

Protected variable

int32

 

MasterBoneMapCacheCount

Incremented every time the master bone map changes.

Public variable

TWeakObjectPtr <...

 

MasterPoseComponent

MasterPoseComponent.

Public variable

int32

 

MaterialIndexPreview

Index of the material to preview... If set to -1, all section will be rendered

Public variable

float

 

MaxDistanceFactor

High (best) DistanceFactor that was desired for rendering this USkeletalMesh last frame.

Public variable

TEnumAsByte < EM ...

 

MeshComponentUpdateFlag

This is update frequency flag even when our Owner has not been rendered recently

Public variable

FSkeletalMeshOb ...

 

MeshObject

Object responsible for sending bone transforms, morph target state etc. to render thread.

Public variable

int32

 

MinLodModel

This is the min LOD that this component will use.

Public variable

TArray < float >

 

MorphTargetWeights

Array of weights for all morph targets.

Public variable

int32

 

OldPredictedLODLevel

LOD level from previous frame, so we can detect changes in LOD to recalc required bones.

Public variable

FOnAnimUpdateRa ...

 

OnAnimUpdateRateParamsCreated

Delegate when AnimUpdateRateParams is created, to override its default settings.

Public variable

UPhysicsAsset &...

 

PhysicsAssetOverride

WITH_EDITORONLY_DATA Physics.

Public variable

int32

 

PredictedLODLevel

Best LOD that was 'predicted' by UpdateSkelPose.

Public variable

float

 

ProgressiveDrawingFraction

Editor only.

Protected variable

FSkelMeshRefPos ...

 

RefPoseOverride

Information for current ref pose override, if present

Public variable

int32

 

SectionIndexPreview

Index of the section to preview... If set to -1, all section will be rendered

Public variable

USkeletalMesh &...

 

SkeletalMesh

The skeletal mesh used by this component.

Protected variable

TArray < TWeakOb ...

 

SlavePoseComponents

If set, this component has slave pose components that are associated with this Note this is weak object ptr, so it will go away unless you have other strong reference

Public variable

float

 

StreamingDistanceMultiplier

Rendering options.

Public variable

FColor

 

WireframeColor

Wireframe color

Constructors

Name Description

Public function

USkinnedMeshComponent

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Protected function Virtual

void

 

AddSlavePoseComponent

(
    USkinnedMeshComponent * Skinned...
)

Add a slave component to the SlavePoseComponents array

Protected function Virtual

bool

 

AllocateTransformData()

Allocate Transform Data array including SpaceBases, BoneVisibilityStates

Public function

void

 

AnimUpdateRateSetParams

(
    uint8 UpdateRateShift,
    float DeltaTime,
    const bool& bInRecentlyRendered,
    const float& InMaxDistanceFactor,
    const bool& bPlayingRootMotion
)

Updates AnimUpdateRateParams, used by SkinnedMeshComponents.

Public function

bool

 

BoneIsChildOf

(
    FName BoneName,
    FName ParentBoneName
)

Tests if BoneName is child of (or equal to) ParentBoneName.

Protected function

FBoxSphereBo ...

 

CalcMeshBound

(
    const FVector & RootOffset,
    bool UsePhysicsAsset,
    const FTransform & Transform
)

Update Mesh Bound information based on input

Public function Virtual

void

 

ClearRefPoseOverride()

Clear any applied ref pose override

Public function

void

 

ClearSkinWeightOverride

(
    int32 LODIndex
)

Clear any applied skin weight override

Public function

void

 

ClearVertexColorOverride

(
    int32 LODIndex
)

Clear any applied vertex color override

Public function Virtual

void

 

ComputeSkinnedPositions

(
    TArray < FVector >& OutPositions
)

CPU evaluation of the positions of all vertices (returned in component space)

Protected function Virtual

void

 

DeallocateTransformData()

Public function Virtual

void

 

FinalizeBoneTransform()

Finalize bone transform of this current tick After this function, any query to bone transform should be latest of the data

Public function

FName

 

FindClosestBone

(
    FVector TestLocation,
    FVector * BoneLocation,
    float IgnoreScale,
    bool bRequirePhysicsAsset
)

Finds the closest bone to the given location

Public function

FName

 

FindClosestBone_K2

(
    FVector TestLocation,
    FVector & BoneLocation,
    float IgnoreScale,
    bool bRequirePhysicsAsset
)

Finds the closest bone to the given location

Public function Virtual

UMorphTarget ...

 

FindMorphTarget

(
    FName MorphTargetName
)

Find a named MorphTarget from the current SkeletalMesh

Protected function

void

 

FlipEditableSpaceBases()

Flip the editable space base buffer

Public function

FVector

 

GetBoneAxis

(
    FName BoneName,
    EAxis::Type Axis
)

Finds a vector pointing along the given axis of the given bone

Public function

int32

 

GetBoneIndex

(
    FName BoneName
)

Find the index of bone by name.

Public function

FVector

 

GetBoneLocation

(
    FName BoneName,
    EBoneSpaces::Type Space
)

Get Bone Location

Vector of the bone

Public function

FMatrix

 

GetBoneMatrix

(
    int32 BoneIndex
)

Get Bone Matrix from index

the matrix of the bone at the specified index

Public function

FName

 

GetBoneName

(
    int32 BoneIndex
)

Get Bone Name from index

the name of the bone at the specified index

Public function

void

 

GetBoneNames

(
    TArray < FName >& BoneNames
)

Fills the given array with the names of all the bones in this component's current SkeletalMesh

Public function

FQuat

 

GetBoneQuaternion

(
    FName BoneName,
    EBoneSpaces::Type Space
)

Get Bone Rotation in Quaternion

Quaternion of the bone

Public function

FTransform

 

GetBoneTransform

(
    int32 BoneIndex,
    const FTransform & LocalToWorld
)

Get world space bone transform from bone index, also specifying the component transform to use

Public function

FTransform

 

GetBoneTransform

(
    int32 BoneIndex
)

Get Bone Transform from index

the transform of the bone at the specified index

Public function

const FBoxSp ...

 

GetCachedLocalBounds()

Public function

const TArray ...

 

GetComponentSpaceTransforms()

Access ComponentSpaceTransforms for reading

Public function

void

 

GetCPUSkinnedVertices

(
    TArray < struct FFinalSkinVertex >&...,
    int32 InLODIndex
)

Get CPU skinned vertices for the specified LOD level.

Public function

const TArray ...

 

GetEditableComponentSpaceTransforms()

Public function

TArray < FTra ...

 

GetEditableComponentSpaceTransforms()

Get Access to the current editable space bases

Public function

TArray < FTra ...

 

GetEditableSpaceBases()

Public function

const TArray ...

 

GetEditableSpaceBases()

Public function Virtual

int32

 

GetLODBias()

Get the LOD Bias of this component

Public function

const TArray ...

 

GetMasterBoneMap()

Public function

int32

 

GetNumBones()

Returns the number of bones in the skeleton.

Public function

int32

 

GetNumComponentSpaceTransforms()

Get current number of component space transorms

Public function

int32

 

GetNumSpaceBases()

Public function

FName

 

GetParentBone

(
    FName BoneName
)

Get Parent Bone of the input bone

Public function

UPhysicsAsse ...

 

GetPhysicsAsset()

Return PhysicsAsset for this SkeletalMeshComponent It will return SkeletalMesh's PhysicsAsset unless PhysicsAssetOverride is set for this component

Public function Virtual

const FSkelM ...

 

GetRefPoseOverride()

Accessor for RefPoseOverride

Public function

FVector

 

GetRefPosePosition

(
    int32 BoneIndex
)

Gets the local-space position of a bone in the reference pose.

Local space reference position

Public function

FSkeletalMes ...

 

GetSkeletalMeshResource()

Gets the skeletal mesh resource used for rendering the component.

Public function Virtual

FVector

 

GetSkinnedVertexPosition

(
    int32 VertexIndex
)

Simple, CPU evaluation of a vertex's skinned position (returned in component space)

Public function

FSkinWeightV ...

 

GetSkinWeightBuffer

(
    int32 LODIndex
)

Returns skin weight vertex buffer to use for specific LOD (will look at override)

Public function

FName

 

GetSocketBoneName

(
    FName InSocketName
)

Returns bone name linked to a given named socket on the skeletal mesh component.

Public function

USkeletalMes ...

 

GetSocketByName

(
    FName InSocketName
)

SkeletalMeshSocket of named socket on the skeletal mesh component, or NULL if not found.

Public function

const TArray ...

 

GetSpaceBases()

Public function

FColor

 

GetVertexColor

(
    int32 VertexIndex
)

Returns color of the vertex.

Public function

FVector2D

 

GetVertexUV

(
    int32 VertexIndex,
    uint32 UVChannel
)

Returns texture coordinates of the vertex.

Public function Virtual

void

 

HideBone

(
    int32 BoneIndex,
    EPhysBodyOp PhysBodyOption
)

Hides the specified bone. You can also set option for physics body.

Public function

void

 

HideBoneByName

(
    FName BoneName,
    EPhysBodyOp PhysBodyOption
)

Hides the specified bone with name.

Public function

void

 

InitLODInfos()

WITH_EDITOR.

Public function

void

 

InvalidateCachedBounds()

Invalidate Cached Bounds, when Mesh Component has been updated.

Public function

bool

 

IsBoneHidden

(
    int32 BoneIndex
)

Determines if the specified bone is hidden.

true if hidden

Public function

bool

 

IsBoneHiddenByName

(
    FName BoneName
)

Determines if the specified bone is hidden.

true if hidden

Public function Virtual

bool

 

IsPlayingNetworkedRootMotionMontage()

Public function Virtual

bool

 

IsPlayingRootMotion()

Public function Virtual

bool

 

IsPlayingRootMotionFromEverything()

Public function Virtual

void

 

PostInitMeshObject

(
    FSkeletalMeshObject *
)

Function to operate on mesh object after its created, but before it's attached.

Public function

void

 

RebuildVisibilityArray()

Rebuild BoneVisibilityStates array. Mostly refresh information of bones for BVS_HiddenByParent

Public function Virtual

void

 

RefreshBoneTransforms

(
    FActorComponentTickFunction * T...
)

Update functions Refresh Bone Transforms Each class will need to implement this function Ideally this function should be atomic (not relying on Tick or any other update.)

Public function

void

 

RefreshSlaveComponents()

Refresh Slave Components if exists

Protected function

void

 

RefreshUpdateRateParams()

Recreates update rate params and internal tracker data

Public function

void

 

ReleaseResources()

Release any rendering resources owned by this component

Protected function

void

 

ReleaseUpdateRateParams()

Removes update rate params and internal tracker data

Protected function Virtual

void

 

RemoveSlavePoseComponent

(
    USkinnedMeshComponent * Skinned...
)

Remove a slave component from the SlavePoseComponents array

Public function

void

 

SetCapsuleIndirectShadowMinVisibility

(
    float NewValue
)

Public function

void

 

SetCastCapsuleDirectShadow

(
    bool bNewValue
)

Public function

void

 

SetCastCapsuleIndirectShadow

(
    bool bNewValue
)

Public function

void

 

SetComponentSpaceTransformsDoubleBuffering

(
    bool bInDoubleBufferedComponentSpac...
)

Public function

void

 

SetForcedLOD

(
    int32 InNewForcedLOD
)

Set MinLodModel of the mesh component

Public function

void

 

SetForceWireframe

(
    bool InForceWireframe
)

Sets the value of the bForceWireframe flag and reattaches the component as necessary.

Public function

void

 

SetMasterPoseComponent

(
    USkinnedMeshComponent * NewMast...
)

Set MasterPoseComponent for this component

Public function

void

 

SetMaterialPreview

(
    int32 InMaterialIndexPreview
)

Public function

void

 

SetMinLOD

(
    int32 InNewMinLOD
)

Set MinLodModel of the mesh component

Public function Virtual

void

 

SetPhysicsAsset

(
    UPhysicsAsset * NewPhysicsAsset,
    bool bForceReInit
)

Override the Physics Asset of the mesh.

Public function Virtual

void

 

SetRefPoseOverride

(
    const TArray < FTransform >& NewRef...
)

Apply an override for the current mesh ref pose

Public function

void

 

SetSectionPreview

(
    int32 InSectionIndexPreview
)

Sets the value of the SectionIndexPreview flag and reattaches the component as necessary.

Public function Virtual

void

 

SetSkeletalMesh

(
    USkeletalMesh * NewMesh,
    bool bReinitPose
)

Change the SkeletalMesh that is rendered for this Component.

Public function

void

 

SetSkinWeightOverride

(
    int32 LODIndex,
    const TArray < FSkelMeshSkinWeightIn ...
)

Allow override of skin weights on a per-component basis.

Public function

void

 

SetSpaceBaseDoubleBuffering

(
    bool bInDoubleBufferedBlendSpaces
)

Public function

void

 

SetVertexColorOverride

(
    int32 LODIndex,
    const TArray < FColor >& VertexColo...
)

Allow override of vertex colors on a per-component basis.

Public function

void

 

SetVertexColorOverride_LinearColor

(
    int32 LODIndex,
    const TArray < FLinearColor >& Vert...
)

Allow override of vertex colors on a per-component basis, taking array of Blueprint-friendly LinearColors.

Public function Virtual

bool

 

ShouldCPUSkin()

Function returns whether or not CPU skinning should be applied Allows the editor to override the skinning state for editor tools

Protected function Virtual

bool

 

ShouldTickPose()

Should tick pose (by calling TickPose) in Tick

: return true if should Tick. false otherwise.

Protected function

bool

 

ShouldUpdateBoneVisibility()

Return true if it needs update. Return false if not

Protected function Virtual

bool

 

ShouldUpdateTransform

(
    bool bLODHasChanged
)

Should update transform in Tick

: return true if need transform update. false otherwise.

Public function

bool

 

ShouldUseUpdateRateOptimizations()

Public function

void

 

ShowMaterialSection

(
    int32 MaterialID,
    bool bShow,
    int32 LODIndex
)

Show/Hide Material - technical correct name for this is Section, but seems Material is mostly used This disable rendering of certain Material ID (Section)

Public function Virtual

void

 

TickPose

(
    float DeltaTime,
    bool bNeedsValidRootMotion
)

Tick Pose, this function ticks and do whatever it needs to do in this frame, should be called before RefreshBoneTransforms

Public function

void

 

TransformFromBoneSpace

(
    FName BoneName,
    FVector InPosition,
    FRotator InRotation,
    FVector & OutPosition,
    FRotator & OutRotation
)

Transform a location/rotation in bone relative space to world space.

Public function

void

 

TransformToBoneSpace

(
    FName BoneName,
    FVector InPosition,
    FRotator InRotation,
    FVector & OutPosition,
    FRotator & OutRotation
)

Transform a location/rotation from world space to bone relative space.

Public function Virtual

void

 

UnHideBone

(
    int32 BoneIndex
)

Unhides the specified bone.

Public function

void

 

UnHideBoneByName

(
    FName BoneName
)

UnHide the specified bone with name.

Public function Virtual

bool

 

UpdateLODStatus()

Update the PredictedLODLevel and MaxDistanceFactor in the component from its MeshObject.

Public function

void

 

UpdateMasterBoneMap()

Update MasterBoneMap for MasterPoseComponent and this component

Public function

void

 

UpdateMorphMaterialUsageOnProxy()

Checks/updates material usage on proxy based on current morph target usage

Public function

void

 

UpdateRecomputeTangent

(
    int32 MaterialIndex,
    int32 LodIndex,
    bool bRecomputeTangentValue
)

Update Recalculate Normal flag in matching section

Public function Virtual

void

 

UpdateSlaveComponent()

Update Slave Component. This gets called when MasterPoseComponent!=NULL

Overridden from UMeshComponent

Name Description

Public function Virtual

int32

 

GetMaterialIndex

(
    FName MaterialSlotName
)

Public function Virtual

TArray < FNam ...

 

GetMaterialSlotNames()

Public function Virtual

bool

 

GetMaterialStreamingData

(
    int32 MaterialIndex,
    FPrimitiveMaterialInfo & MaterialDa...
)

Get the material info for texture stremaing. Return whether the data is valid or not.

Public function Virtual

bool

 

IsMaterialSlotNameValid

(
    FName MaterialSlotName
)

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc ...

 

CreateSceneProxy()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Public function Virtual

UMaterialInt ...

 

GetMaterial

(
    int32 ElementIndex
)

Returns the material used by the element at the specified index

Public function Virtual

int32

 

GetNumMaterials()

This has to be skeletalmesh material. You can't have more than what SkeletalMesh materials have

Public function Virtual

void

 

GetStreamingTextureInfo

Enumerates the streaming textures used by the primitive.

Public function Virtual

void

 

GetUsedMaterials

(
    TArray < UMaterialInterface * > ...,
    bool bGetDebugMaterials
)

Retrieves the materials used in this component

Overridden from USceneComponent

Name Description

Public function Virtual

FBoxSphereBo ...

 

CalcBounds

(
    const FTransform & LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Public function Virtual

bool

 

DoesSocketExist

(
    FName InSocketName
)

Return true if socket with the given name exists

Public function Virtual

FTransform

 

GetSocketTransform

(
    FName InSocketName,
    ERelativeTransformSpace TransformSp...
)

Get world-space socket transform.

Public function Virtual

bool

 

HasAnySockets()

Returns true if this component has any sockets

Public function Virtual

void

 

QuerySupportedSockets

Get a list of sockets this component contains

Public function Virtual

void

 

UpdateOverlaps

(
    TArray < FOverlapInfo > const* ...,
    bool bDoNotifies,
    const TArray < FOverlapInfo >* ...
)

Queries world and updates overlap tracking state for this component.

Overridden from UActorComponent

Name Description

Protected function Virtual

UObject cons...

 

AdditionalStatObject()

Give a readable name for this component, including asset name if applicable

Protected function Virtual

void

 

CreateRenderState_Concurrent()

End USceneComponentInterface.

Protected function Virtual

void

 

DestroyRenderState_Concurrent()

Used to shut down any rendering thread structure for this component

Protected function Virtual

void

 

OnRegister()

WITH_EDITOR.

Protected function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Protected function Virtual

bool

 

RequiresGameThreadEndOfFrameRecreate()

Return true if this component requires end of frame recreates to happen from the game thread.

Protected function Virtual

void

 

SendRenderDynamicData_Concurrent()

Called to send dynamic data for this component to the rendering thread

Protected function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction * T...
)

Function called every frame on this ActorComponent.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

bool

 

CanEditChange

(
    const UProperty * InProperty
)

Called by the editor to query whether a property of this object is allowed to be modified.

Public function Virtual

FString

 

GetDetailedInfoInternal()

========================================== UObject interface.

Public function Virtual

void

 

GetResourceSizeEx

(
    FResourceSizeEx & CumulativeResourc...
)

Get the size of the object/resource for display to artists/LDs in the Editor.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject interface Override to have counting working better

See Also

References

Module

Engine

Header

Runtime/Engine/Classes/Components/SkinnedMeshComponent.h