![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SkinnedMeshComponent.h>
Inheritance diagram for USkinnedMeshComponent:Classes | |
| struct | FMissingLeaderBoneCacheEntry |
| class | FRenderStateLockScope |
Skinned mesh component that supports bone skinned mesh rendering. This class does not support animation.
| USkinnedMeshComponent::USkinnedMeshComponent | ( | FVTableHelper & | Helper | ) |
|
default |
| void USkinnedMeshComponent::AddExternalMorphSet | ( | int32 | LOD, |
| int32 | ID, | ||
| TSharedPtr< FExternalMorphSet > | MorphSet | ||
| ) |
Register an external set of GPU compressed morph targets. These compressed morph targets are GPU only morph targets that will not appear inside the UI and are owned by external systems. Every set of these morph targets has some unique ID.
| LOD | The LOD index. |
| ID | The unique ID for this set of morph targets. |
| MorphSet | A shared pointer to a morph set, which basically contains a GPU friendly morph buffer. This buffer should be owned by an external system that calls this method. |
|
protectedvirtual |
Add a follower component to the FollowerPoseComponents array
|
overrideprotectedvirtual |
|
inlineprotectedvirtual |
| void USkinnedMeshComponent::AddSocketOverride | ( | FName | SourceSocketName, |
| FName | OverrideSocketName, | ||
| bool | bWarnHasOverrided = true |
||
| ) |
|
protectedvirtual |
Allocate Transform Data array including SpaceBases, BoneVisibilityStates
Toggles whether this skinned mesh component can issue duplicate transform updates
|
overridevirtual |
Reimplemented from UMeshComponent.
|
overrideprotectedvirtual |
Tests if BoneName is child of (or equal to) ParentBoneName.
| BoneName | Name of the bone |
| ParentBone | Name to check |
| void USkinnedMeshComponent::CacheRefToLocalMatrices | ( | TArray< FMatrix44f > & | OutRefToLocal | ) | const |
Caches the RefToLocal matrices.
|
overridevirtual |
|
protected |
Update Mesh Bound information based on input
| RootOffset | : Root Bone offset from mesh location If LeaderPoseComponent exists, it will applied to LeaderPoseComponent's bound |
| UsePhysicsAsset | : Whether or not to use PhysicsAsset for calculating bound of mesh |
| void USkinnedMeshComponent::ClearAllSkinWeightProfiles | ( | ) |
Clear the skin Weight Profile from all layers on this component. If no profiles are set for any layer, then this call does nothing.
Clear all externally registered morph target buffers.
| void USkinnedMeshComponent::ClearMotionVector | ( | ) |
|
virtual |
Clear any applied ref pose override
Clear any applied skin weight override
| void USkinnedMeshComponent::ClearSkinWeightProfile | ( | ESkinWeightProfileLayer | InLayer = ESkinWeightProfileLayer::Primary | ) |
Clear the skin weight profile from the given layer on this component, in case it is set. If no profile is set for the layer, then this call does nothing.
Clear any applied vertex color override
|
overridevirtual |
Precache all PSOs which can be used by the component
|
protected |
Traverse the attachment tree and compute the highest streaming LOD index clamp among components with SyncAttachParentLOD enabled
| int32 USkinnedMeshComponent::ComputeMinLOD | ( | ) | const |
Compute SkeletalMesh MinLOD that will be used by this component
|
static |
CPU evaluation of the positions of all vertices (returned in component space)
| OutPositions | buffer to place positions into |
| CachedRefToLocals | Cached RefToLocal matrices. |
| Model | The Model to use. |
| SkinWeightBuffer | The SkinWeightBuffer to use. |
|
overrideprotectedvirtual |
|
overridevirtual |
|
protectedvirtual |
|
overrideprotectedvirtual |
|
inlineprotectedvirtual |
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.)
| TickFunction | Supplied as non null if we are running in a tick, allows us to create graph tasks for parallelism Parallel Tick Pose In the case where we do not want to refresh bone transforms (and would therefore not normally kick off a parallel eval task) we perform this 'mini tick' that kicks off the task. |
| TickFunction | Allows us to create graph tasks for parallelism |
Manually enable/disable animation evaluation rate limiting
Enable non-URO-based interpolation
Set whether we have our tick rate externally controlled non-URO-based interpolation
Set us to tick this frame for non-URO-based interpolation
|
virtual |
Finalize bone transform of this current tick After this function, any query to bone transform should be latest of the data
| FName USkinnedMeshComponent::FindClosestBone | ( | FVector | TestLocation, |
| FVector * | BoneLocation = nullptr, |
||
| float | IgnoreScale = 0.f, |
||
| bool | bRequirePhysicsAsset = false |
||
| ) | const |
finds the closest bone to the given location
| TestLocation | the location to test against |
| BoneLocation | (optional, out) if specified, set to the world space location of the bone that was found, or (0,0,0) if no bone was found |
| IgnoreScale | (optional) if specified, only bones with scaling larger than the specified factor are considered |
| bRequirePhysicsAsset | (optional) if true, only bones with physics will be considered |
| FName USkinnedMeshComponent::FindClosestBone_K2 | ( | FVector | TestLocation, |
| FVector & | BoneLocation, | ||
| float | IgnoreScale = 0.f, |
||
| bool | bRequirePhysicsAsset = false |
||
| ) | const |
finds the closest bone to the given location
| TestLocation | the location to test against |
| BoneLocation | (optional, out) if specified, set to the world space location of the bone that was found, or (0,0,0) if no bone was found |
| IgnoreScale | (optional) if specified, only bones with scaling larger than the specified factor are considered |
| bRequirePhysicsAsset | (optional) if true, only bones with physics will be considered |
|
virtual |
Find a named MorphTarget from the current SkeletalMesh
| MorphTargetName | Name of MorphTarget to look for. |
|
protected |
Flip the editable space base buffer
| void USkinnedMeshComponent::ForceMotionVector | ( | ) |
|
protected |
Get the currently active MeshDeformer. This may come from the SkeletalMesh default or the Component override.
|
inlinevirtual |
Override this function to add any additional required bones from followers to functions such as USkeletalMeshComponent::ComputeRequiredBones(). The additional bones will need to be passed using the Leader's bone index mapping, sorted in hierarchical order, and merged into the InOutRequiredBones array.
| LODIndex | - the LOD to get the required bones for. |
| InOutRequiredBones | - the array in which to merge the additional required bones. |
| bool USkinnedMeshComponent::GetAlwaysUseMeshDeformer | ( | ) | const |
Returns whether the component is set to always use a mesh deformer if one can be found in the project settings
|
inline |
| FVector USkinnedMeshComponent::GetBoneAxis | ( | FName | BoneName, |
| EAxis::Type | Axis | ||
| ) | const |
finds a vector pointing along the given axis of the given bone
| BoneName | the name of the bone to find |
| Axis | the axis of that bone to return |
Find the index of bone by name. Looks in the current SkeletalMesh being used by this SkeletalMeshComponent.
| BoneName | Name of bone to look up |
| FVector USkinnedMeshComponent::GetBoneLocation | ( | FName | BoneName, |
| EBoneSpaces::Type | Space = EBoneSpaces::WorldSpace |
||
| ) | const |
Get Bone Location
| BoneName | Name of the bone |
| Space | 0 == World, 1 == Local (Component) |
Get Bone Matrix from index
| BoneIndex | Index of the bone |
Get Bone Name from index
| BoneIndex | Index of the bone |
Fills the given array with the names of all the bones in this component's current SkeletalMesh
| (out) | Array to fill the names of the bones |
| FQuat USkinnedMeshComponent::GetBoneQuaternion | ( | FName | BoneName, |
| EBoneSpaces::Type | Space = EBoneSpaces::WorldSpace |
||
| ) | const |
Get Bone Rotation in Quaternion
| BoneName | Name of the bone |
| Space | 0 == World, 1 == Local (Component) |
|
inline |
Get world-space bone transform.
| InBoneName | Name of the the bone to get the transform |
| FTransform USkinnedMeshComponent::GetBoneTransform | ( | int32 | BoneIndex | ) | const |
Get Bone Transform from index
| BoneIndex | Index of the bone |
| FTransform USkinnedMeshComponent::GetBoneTransform | ( | int32 | BoneIndex, |
| const FTransform & | LocalToWorld | ||
| ) | const |
Get world space bone transform from bone index, also specifying the component transform to use
| BoneIndex | Index of the bone |
|
inline |
Access BoneVisibilityStates for reading
|
inline |
|
inline |
|
inline |
Access ComponentSpaceTransforms for reading
| void USkinnedMeshComponent::GetCPUSkinnedCachedFinalVertices | ( | TArray< FFinalSkinVertex > & | OutVertices | ) | const |
| void USkinnedMeshComponent::GetCPUSkinnedVertices | ( | TArray< struct FFinalSkinVertex > & | OutVertices, |
| int32 | InLODIndex | ||
| ) | const |
Get CPU skinned vertices for the specified LOD level. Includes morph targets if they are enabled. Note: This function is very SLOW as it needs to flush the render thread.
| OutVertices | The skinned vertices |
| InLODIndex | The LOD we want to export |
| bool USkinnedMeshComponent::GetCPUSkinningEnabled | ( | ) | const |
Getter for bCPUSkinning member variable May return a different value from ShouldCPUSkin()
|
inline |
| void USkinnedMeshComponent::GetCurrentRefToLocalMatrices | ( | TArray< FMatrix44f > & | OutRefToLocals, |
| int32 | InLodIdx, | ||
| const TArray< FBoneIndexType > * | ExtraRequiredBoneIndices = nullptr |
||
| ) | const |
Return the skinning matrices used for rendering.
Return the names of the skin weight profiles for all the layers
| FName USkinnedMeshComponent::GetCurrentSkinWeightProfileName | ( | ESkinWeightProfileLayer | InLayer = ESkinWeightProfileLayer::Primary | ) | const |
Return the name of the skin weight profile that is currently set on the given layer, otherwise returns 'None'
|
overrideprotectedvirtual |
Get all default material slots overlay materials from the mesh.
Reimplemented from UMeshComponent.
|
overrideprotectedvirtual |
Get the default overlay material used by a mesh
Reimplemented from UMeshComponent.
|
overrideprotectedvirtual |
Get the default overlay material max draw distance
Reimplemented from UMeshComponent.
| FTransform USkinnedMeshComponent::GetDeltaTransformFromRefPose | ( | FName | BoneName, |
| FName | BaseName = NAME_None |
||
| ) | const |
Get delta transform from reference pose based on BaseNode. This uses last frame up-to-date transform, so it will have a frame delay if you use this info in the AnimGraph
| BoneName | Name of the bone |
| BaseName | Name of the base bone - if none, it will use parent as a base |
|
overridevirtual |
Get Access to the current editable bone visibility states
|
inline |
Get Access to the current editable space bases
|
inline |
|
inline |
|
inline |
Get the external morph sets for a given LOD.
|
inline |
Get the array of external morph target sets. It is an array, one entry for each LOD.
| FExternalMorphWeightData & USkinnedMeshComponent::GetExternalMorphWeights | ( | int32 | LOD | ) |
Get the weights for a given external morph target set at a specific LOD.
| const FExternalMorphWeightData & USkinnedMeshComponent::GetExternalMorphWeights | ( | int32 | LOD | ) | const |
Get the weights in read-only mode for a given external morph target set at a specific LOD.
|
inline |
Get the external tick rate
| const TArray< TWeakObjectPtr< USkinnedMeshComponent > > & USkinnedMeshComponent::GetFollowerPoseComponents | ( | ) | const |
Return current active list of follower components
| int32 USkinnedMeshComponent::GetForcedLOD | ( | ) | const |
Get ForcedLodModel of the mesh component. Note that the actual forced LOD level is the return value minus one and zero means no forced LOD
|
inline |
|
overridevirtual |
Reimplemented from UMeshComponent.
|
overridevirtual |
Get the material info for texture streaming. Return whether the data is valid or not.
Reimplemented from UMeshComponent.
| UMeshDeformerInstance * USkinnedMeshComponent::GetMeshDeformerInstance | ( | ) | const |
| UMeshDeformerInstance * USkinnedMeshComponent::GetMeshDeformerInstanceForLOD | ( | int32 | LODIndex | ) | const |
Gets the MeshDeformer for the given LOD.
Returns null if the LOD doesn't use a deformer or if the index is out of range.
This function takes GetMeshDeformerMaxLOD() into account, so there's no need to call both.
|
inline |
|
virtual |
Max LOD at which to update or apply the MeshDeformer.
|
inline |
Retrieve the mesh object currently assigned to this component
|
virtual |
| int32 USkinnedMeshComponent::GetNumBones | ( | ) | const |
Returns the number of bones in the skeleton.
|
inline |
Get current number of component space transorms
| int32 USkinnedMeshComponent::GetNumLODs | ( | ) | const |
Get the number of LODs on this component
|
overridevirtual |
Reimplemented from UMeshComponent.
Get Parent Bone of the input bone
| BoneName | Name of the bone |
| class UPhysicsAsset * USkinnedMeshComponent::GetPhysicsAsset | ( | ) | const |
Return PhysicsAsset for this SkeletalMeshComponent It will return SkeletalMesh's PhysicsAsset unless PhysicsAssetOverride is set for this component
|
static |
Get the bones used by the physics asset (if any), as these have to be updated even if LODed out.
|
inline |
Get predicted LOD level. This value is usually calculated in UpdateLODStatus, but can be modified by skeletal mesh streaming.
| void USkinnedMeshComponent::GetPreSkinnedLocalBounds | ( | FBoxSphereBounds & | OutBounds | ) | const |
Get the pre-skinning local space bounds for this component.
|
inline |
const getters for previous transform idea
|
inline |
|
overridevirtual |
|
inlinevirtual |
Accessor for RefPoseOverride
Gets the local-space position of a bone in the reference pose.
| BoneIndex | Index of the bone |
| FTransform USkinnedMeshComponent::GetRefPoseTransform | ( | int32 | BoneIndex | ) | const |
Gets the local-space transform of a bone in the reference pose.
| BoneIndex | Index of the bone |
|
overridevirtual |
| FSkeletalMeshRenderData * USkinnedMeshComponent::GetSkeletalMeshRenderData | ( | ) | const |
Gets the skeletal mesh resource used for rendering the component.
| USkinnedAsset * USkinnedMeshComponent::GetSkinnedAsset | ( | ) | const |
Get the SkinnedAsset rendered for this mesh.
|
static |
Simple, CPU evaluation of a vertex's skinned position (returned in component space)
| VertexIndex | Vertex Index. If compressed, this will be slow. |
| Model | The Model to use. |
| SkinWeightBuffer | The SkinWeightBuffer to use. |
| CachedRefToLocals | Cached RefToLocal matrices. |
|
static |
Simple, CPU evaluation of a vertex's skinned position (returned in component space)
| VertexIndex | Vertex Index. If compressed, this will be slow. |
| Model | The Model to use. |
| SkinWeightBuffer | The SkinWeightBuffer to use. |
| CachedRefToLocals | Cached RefToLocal matrices. |
| FSkinWeightVertexBuffer * USkinnedMeshComponent::GetSkinWeightBuffer | ( | int32 | LODIndex | ) | const |
Returns skin weight vertex buffer to use for specific LOD (will look at override)
|
inline |
Returns bone name linked to a given named socket on the skeletal mesh component. If you're unsure to deal with sockets or bones names, you can use this function to filter through, and always return the bone name.
| bone | name or socket name |
| class USkeletalMeshSocket const * USkinnedMeshComponent::GetSocketByName | ( | FName | InSocketName | ) | const |
| InSocketName | The name of the socket to find |
| class USkeletalMeshSocket const * USkinnedMeshComponent::GetSocketInfoByName | ( | FName | InSocketName, |
| FTransform & | OutTransform, | ||
| int32 & | OutBoneIndex | ||
| ) | const |
| InSocketName | The name of the socket to find |
| OutBoneIndex | The socket bone index in this skeletal mesh, or INDEX_NONE if the socket is not found or not a bone-relative socket |
| OutTransform | The socket local transform, or identity if the socket is not found. |
|
static |
Get the bones that are used by sockets.
| OutRequiredBones | - the bones used by sockets that are set as always animate |
| NeededBonesForFillComponentSpaceTransforms | - the rest of bones used by sockets (that are not set to always animate) |
|
overridevirtual |
|
overridevirtual |
| bool USkinnedMeshComponent::GetTwistAndSwingAngleOfDeltaRotationFromRefPose | ( | FName | BoneName, |
| float & | OutTwistAngle, | ||
| float & | OutSwingAngle | ||
| ) | const |
Get Twist and Swing Angle in Degree of Delta Rotation from Reference Pose in Local space
First this function gets rotation of current, and rotation of ref pose in local space, and And gets twist/swing angle value from refpose aligned.
| BoneName | Name of the bone |
| OutTwistAngle | TwistAngle in degree |
| OutSwingAngle | SwingAngle in degree |
|
overridevirtual |
Override this function to pass on cloth simulation data (or any deformable using the cloth pipeline) to the skeletal renderer.
Implements IClothSimulationDataProvider.
|
overridevirtual |
Reimplemented from UMeshComponent.
Validate the min LOD value of the mesh component by iterating over render data to make sure we get something usable.
| InMinLOD | The starting LOD index to iterate from to make sure the render data is valid. Range from [0, Max Number of LOD - 1]. |
Returns color of the vertex.
| VertexIndex | Vertex Index. If compressed, this will be slow. |
Returns texture coordinates of the vertex.
| VertexIndex | Vertex Index. If compressed, this will be slow. |
| TexCoordChannel | Texture coordinate channel Index. |
| bool USkinnedMeshComponent::HasAnyAttachedSockets | ( | ) | const |
|
overridevirtual |
Do we have a given set of external morph targets?
| bool USkinnedMeshComponent::HasMeshDeformer | ( | ) | const |
|
virtual |
Returns true if the component has valid Nanite render data.
|
virtual |
Hides the specified bone. You can also set option for physics body.
| BoneIndex | Index of the bone |
| PhysBodyOption | Option for physics bodies that attach to the bones to be hidden |
| void USkinnedMeshComponent::HideBoneByName | ( | FName | BoneName, |
| EPhysBodyOp | PhysBodyOption | ||
| ) |
Hides the specified bone with name. Currently this just enforces a scale of 0 for the hidden bones. Compared to HideBone By Index - This keeps track of list of bones and update when LOD changes
| BoneName | Name of bone to hide |
| PhysBodyOption | Option for physics bodies that attach to the bones to be hidden |
| void USkinnedMeshComponent::InitLODInfos | ( | ) |
Initialize the LOD entries for the component
| void USkinnedMeshComponent::InvalidateCachedBounds | ( | ) |
Invalidate Cached Bounds, when Mesh Component has been updated.
Determines if the specified bone is hidden.
| BoneIndex | Index of the bone |
Determines if the specified bone is hidden.
| BoneName | Name of bone to check |
Returns whether a specific material section is currently hidden on this component (by using ShowMaterialSection)
|
inline |
Check whether a skin weight profile is currently pending load / create
|
inline |
Check whether we should be interpolating due to external settings
|
inline |
Check whether we we have our tick rate externally controlled
| bool USkinnedMeshComponent::IsUsingSkinWeightProfile | ( | ) | const |
Check whether a skin weight profile is currently set on any layer.
Check whether a given LOD index is valid for the external morph sets.
|
static |
Takes sorted array Base and then adds any elements from sorted array Insert which is missing from it, preserving order. This assumes both arrays are sorted and contain unique bone indices.
Takes sorted array Base and then adds any elements from sorted array Insert which is missing from it, preserving order. this assumes both arrays are sorted and contain unique bone indices.
|
overridevirtual |
|
overridevirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Override the Min LOD of the mesh component
| InNewMinLOD | Override new MinLodModel that make sure the LOD does not go below of this value. Range from [0, Max Number of LOD - 1]. This will affect in the next tick update. |
|
inlinevirtual |
Function to operate on mesh object after its created, but before it's attached.
| MeshObject | - Mesh Object owned by this component |
|
overridevirtual |
Tell the streaming system to start streaming in all LODs for the mesh. Note: this function may set bIgnoreStreamingMipBias on this component enable the FastForceResident system.
| Seconds | Number of seconds to force all LODs to be resident |
Reimplemented from UMeshComponent.
|
overridevirtual |
| void USkinnedMeshComponent::RebuildVisibilityArray | ( | ) |
Rebuild BoneVisibilityStates array. Mostly refresh information of bones for BVS_HiddenByParent
Refresh the external morph target weight buffers. This makes sure the amount of morph sets and number of weights are valid.
| void USkinnedMeshComponent::RefreshFollowerComponents | ( | ) |
Refresh Follower Components if exists
This isn't necessary in any other case except in editor where you need to mark them as dirty for rendering
|
inline |
|
protected |
Recreates update rate params and internal tracker data
|
overridevirtual |
Register a one-time callback that will be called when criteria met
| Callback | |
| LODIdx | The LOD index expected. Specify -1 for the MinLOD. |
| TimeoutSecs | Timeout in seconds |
| bOnStreamIn | To get notified when the expected LOD is streamed in or out |
Reimplemented from UMeshComponent.
|
overridevirtual |
Register a one-time callback that will be called when streaming starts or ends.
| CallbackStreamingStart | The callback to notify when streaming new LODs in begins. The callback will not always be called if the asset is not streamable, or the asset or component is unloaded. |
| CallbackStreamingDone | The callback to notify when streaming is done. The callback will not be called if the start timeout expired. |
| TimeoutStartSecs | Timeout for streaming to start, in seconds |
| TimeoutDoneSecs | Timeout for streaming to end, in seconds |
Reimplemented from UMeshComponent.
|
inlinevirtual |
Register an OnBoneTransformsFinalized callback which can be called in FinalizeBoneTransform(). Note the inherited class has to implement the Broadcast call in FinalizeBoneTransform() if it wants to mimic the same behavior as in USkeletalMeshComponent.
| Delegate | - the delegate to be broadcasted in FinalizeBoneTransform by the inherited class. |
| void USkinnedMeshComponent::ReleaseResources | ( | ) |
Release any rendering resources owned by this component
|
protected |
Removes update rate params and internal tracker data
| void USkinnedMeshComponent::RemoveAllSocketOverrides | ( | ) |
Remove a given set of external GPU based morph targets.
|
protectedvirtual |
Remove a follower component from the FollowerPoseComponents array
|
inlineprotectedvirtual |
|
overrideprotectedvirtual |
| void USkinnedMeshComponent::ResizeExternalMorphTargetSets | ( | ) |
Resize the morph target sets array to the number of LODs.
|
overrideprotectedvirtual |
Always use a MeshDeformer as long as one can be found in the project settings
| bShouldAlwaysUseMeshDeformer | Always use mesh deformer for this component |
| void USkinnedMeshComponent::SetComponentSpaceTransformsDoubleBuffering | ( | bool | bInDoubleBufferedComponentSpaceTransforms | ) |
| void USkinnedMeshComponent::SetCPUSkinningEnabled | ( | bool | bEnable, |
| bool | bRecreateRenderStateImmediately = false |
||
| ) |
Set whether this component uses CPU skinning Notes:
Set non-URO-based delta time
Set non-URO-based interpolation alpha
Set the external tick rate
Set ForcedLodModel of the mesh component
| InNewForcedLOD | Set new ForcedLODModel that forces to set the incoming LOD. Range from [1, Max Number of LOD]. This will affect in the next tick update. |
|
inline |
Sets the value of the bForceWireframe flag and reattaches the component as necessary.
| InForceWireframe | New value of bForceWireframe. |
| void USkinnedMeshComponent::SetLeaderPoseComponent | ( | USkinnedMeshComponent * | NewLeaderBoneComponent, |
| bool | bForceUpdate = false, |
||
| bool | bInFollowerShouldTickPose = false |
||
| ) |
Set LeaderPoseComponent for this component
| NewLeaderBoneComponent | New LeaderPoseComponent |
| bForceUpdate | If false, the function will be skipped if NewLeaderBoneComponent is the same as currently setup (default) |
| bInFollowerShouldTickPose | If false, Follower components will not execute TickPose (default) |
|
inline |
|
protected |
Set the MeshDeformer and update the internal MeshDeformerInstance.
| void USkinnedMeshComponent::SetMeshDeformer | ( | UMeshDeformer * | InMeshDeformer | ) |
Change the MeshDeformer that is used for this Component.
| InMeshDeformer | New mesh deformer to set for this component |
|
virtual |
Override the Physics Asset of the mesh. It uses SkeletalMesh.PhysicsAsset, but if you'd like to override use this function
| NewPhysicsAsset | New PhysicsAsset |
| bForceReInit | Force reinitialize |
|
inlineprotectedvirtual |
Set predicted LOD level.
|
virtual |
Apply an override for the current mesh ref pose
Set whether this skinned mesh should be rendered as static mesh in a reference pose
| whether | this skinned mesh should be rendered as static |
| void USkinnedMeshComponent::SetSkeletalMesh_DEPRECATED | ( | USkeletalMesh * | NewMesh | ) |
| void USkinnedMeshComponent::SetSkinnedAsset | ( | class USkinnedAsset * | InSkinnedAsset | ) |
Change the SkinnedAsset that is rendered without reinitializing this Component.
| InSkinnedAsset | New mesh to set for this component |
|
virtual |
Change the SkinnedAsset that is rendered for this Component. Will re-initialize the animation tree etc.
| NewMesh | New mesh to set for this component |
| bReinitPose | Whether we should keep current pose or reinitialize. |
| void USkinnedMeshComponent::SetSkinWeightOverride | ( | int32 | LODIndex, |
| const TArray< FSkelMeshSkinWeightInfo > & | SkinWeights | ||
| ) |
Allow override of skin weights on a per-component basis.
| bool USkinnedMeshComponent::SetSkinWeightProfile | ( | FName | InProfileName, |
| ESkinWeightProfileLayer | InLayer = ESkinWeightProfileLayer::Primary |
||
| ) |
Set up an override skin weight profile for this component on the given layer. The values from the secondary layer (if set to have a profile) are applied first, followed by the values from the primary layer. Since skin weight profiles are stored as sparse data, where only weight values different from the base are kept in storage, it's possible to set up layers such that they don't interfere with one another.
|
protected |
Set the currently active skin weight profile stack to the given stack. If the stack is empty, then the skin weight profile buffer will be set to the base buffer for this mesh.
| void USkinnedMeshComponent::SetVertexColorOverride | ( | int32 | LODIndex, |
| const TArray< FColor > & | VertexColors | ||
| ) |
Allow override of vertex colors on a per-component basis.
| void USkinnedMeshComponent::SetVertexColorOverride_LinearColor | ( | int32 | LODIndex, |
| const TArray< FLinearColor > & | VertexColors | ||
| ) |
Allow override of vertex colors on a per-component basis, taking array of Blueprint-friendly LinearColors.
|
virtual |
Function returns whether or not CPU skinning should be applied Allows the editor to override the skinning state for editor tools
|
virtual |
Function returns whether Nanite should be used to render and skin this mesh.
|
static |
Returns true if skinned meshes are allowed to be rendered as Nanite when enabled on the mesh.
|
virtual |
Should tick pose (by calling TickPose) in Tick
|
protected |
return true if it needs update. Return false if not
Should update transform in Tick
| bLODHasChanged | : Has LOD been changed since last time? |
| bool USkinnedMeshComponent::ShouldUseUpdateRateOptimizations | ( | ) | const |
Clear any material visibility modifications made by ShowMaterialSection
| void USkinnedMeshComponent::ShowMaterialSection | ( | int32 | MaterialID, |
| int32 | SectionIndex, | ||
| bool | bShow, | ||
| int32 | LODIndex | ||
| ) |
Allows hiding of a particular material (by ID) on this instance of a SkeletalMesh.
| MaterialID | - Index of the material show/hide |
| bShow | - True to show the material, false to hide it |
| LODIndex | - Index of the LOD to modify material visibility within |
|
overrideprotectedvirtual |
Tick Pose, this function ticks and do whatever it needs to do in this frame, should be called before RefreshBoneTransforms
| DeltaTime | DeltaTime |
| bNeedsValidRootMotion | - Networked games care more about this, but if false we can do less calculations |
| void USkinnedMeshComponent::TransformFromBoneSpace | ( | FName | BoneName, |
| FVector | InPosition, | ||
| FRotator | InRotation, | ||
| FVector & | OutPosition, | ||
| FRotator & | OutRotation | ||
| ) |
Transform a location/rotation in bone relative space to world space.
| BoneName | Name of bone |
| InPosition | Input position |
| InRotation | Input rotation |
| OutPosition | (out) Transformed position |
| OutRotation | (out) Transformed rotation |
| void USkinnedMeshComponent::TransformToBoneSpace | ( | FName | BoneName, |
| FVector | InPosition, | ||
| FRotator | InRotation, | ||
| FVector & | OutPosition, | ||
| FRotator & | OutRotation | ||
| ) | const |
Transform a location/rotation from world space to bone relative space. This is handy if you know the location in world space for a bone attachment, as AttachComponent takes location/rotation in bone-relative space.
| BoneName | Name of bone |
| InPosition | Input position |
| InRotation | Input rotation |
| OutPosition | (out) Transformed position |
| OutRotation | (out) Transformed rotation |
| USkinnedMeshComponent::UE_DEPRECATED | ( | 5. | 1, |
| "Use USkeletalMeshComponent::GetSkeletalMeshAsset() or GetSkinnedAsset() instead." | |||
| ) |
Get the SkeletalMesh rendered for this mesh. This function is not technically deprecated but shouldn't be used other than for Blueprint backward compatibility purposes. It is used to access the correct SkinnedAsset pointer value through the deprecated SkeletalMesh property in blueprints.
| USkinnedMeshComponent::UE_DEPRECATED | ( | 5. | 1, |
| "Use USkeletalMeshComponent::SetSkeletalMesh() or SetSkinnedAssetAndUpdate() instead." | |||
| ) |
Change the SkeletalMesh that is rendered for this Component. Will re-initialize the animation tree etc.
| NewMesh | New mesh to set for this component |
| bReinitPose | Whether we should keep current pose or reinitialize. |
| USkinnedMeshComponent::UFUNCTION | ( | BlueprintCallable | , |
| Category | = "Components|SkinnedMesh", |
||
| meta | = (DeprecatedFunction, DeprecationMessage="Use USkinnedMeshComponent::OverrideMinLOD() instead.") |
||
| ) |
Set MinLodModel of the mesh component
| InNewMinLOD | Set new MinLodModel that make sure the LOD does not go below of this value. Range from [0, Max Number of LOD - 1]. This will affect in the next tick update. |
Unhides the specified bone.
| BoneIndex | Index of the bone |
UnHide the specified bone with name. Currently this just enforces a scale of 0 for the hidden bones. Compared to HideBone By Index - This keeps track of list of bones and update when LOD changes
| BoneName | Name of bone to unhide |
Unload a Skin Weight Profile's skin weight buffer (if created)
|
inlinevirtual |
Unregister an OnBoneTransformsFinalized callback.
| DelegateHandle | - the handle of the delegate to remove from the list. |
| void USkinnedMeshComponent::UnsetMeshDeformer | ( | ) |
Unset any MeshDeformer applied to this Component.
| InMeshDeformer | New mesh deformer to set for this component |
|
overridevirtual |
|
protected |
|
virtual |
Update Follower Component. This gets called when LeaderPoseComponent!=nullptr
| void USkinnedMeshComponent::UpdateLeaderBoneMap | ( | ) |
Update LeaderBoneMap for LeaderPoseComponent and this component
|
virtual |
Update the PredictedLODLevel and MaxDistanceFactor in the component from its MeshObject.
|
protected |
Helper function for UpdateLODStatus, called with a valid index for InLeaderPoseComponentPredictedLODLevel when updating LOD status for follower components
|
inline |
| void USkinnedMeshComponent::UpdateMorphMaterialUsageOnProxy | ( | ) |
Checks/updates material usage on proxy based on current morph target usage
|
overridevirtual |
| void USkinnedMeshComponent::UpdateSkinWeightOverrideBuffer | ( | ) |
Queues an update of the Skin Weight Buffer used by the current MeshObject
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Access granted to the render state recreator in order to trigger state rebuild
| FMorphTargetWeightMap USkinnedMeshComponent::ActiveMorphTargets |
Array indicating all active morph targets. This map is updated inside RefreshBoneTransforms based on the Anim Blueprint.
| struct FAnimUpdateRateParameters* USkinnedMeshComponent::AnimUpdateRateParams |
Animation Update Rate optimization parameters.
If true, and if no mesh deformer is set from here or the SkeletalMesh, fall back to the default deformer specified in the project settings, unless DefaultMode is set to "Never" in project settings
|
protected |
Whether we have updated bone visibility this tick
|
mutableprotected |
true when CachedLocalBounds is up to date.
|
mutableprotected |
| uint8 USkinnedMeshComponent::bCanHighlightSelectedSections |
Whether or not we can highlight selected sections - this should really only be done in the editor
| uint8 USkinnedMeshComponent::bComponentUseFixedSkelBounds |
When true, skip using the physics asset etc. and always use the fixed bounds defined in the SkeletalMesh.
| uint8 USkinnedMeshComponent::bConsiderAllBodiesForBounds |
If true, when updating bounds from a PhysicsAsset, consider all BodySetups, not just those flagged with bConsiderForBounds.
| UPROPERTY (EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="CastShadow && (FirstPersonPrimitiveType != EFirstPersonPrimitiveType::FirstPerson)", DisplayName = "Capsule Direct Shadow")) uint8 bCastCapsuleDirectShadow UPROPERTY (EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="CastShadow && (FirstPersonPrimitiveType != EFirstPersonPrimitiveType::FirstPerson)", DisplayName = "Capsule Indirect Shadow")) uint8 bCastCapsuleIndirectShadow uint8 USkinnedMeshComponent::bCPUSkinning |
Whether to use the capsule representation (when present) from a skeletal mesh's ShadowPhysicsAsset for direct shadowing from lights. This type of shadowing is approximate but handles extremely wide area shadowing well. The softness of the shadow depends on the light's LightSourceAngle / SourceRadius. This flag will force bCastInsetShadow to be enabled. This flag is only used if CastShadow is true and if FirstPersonPrimitiveType is not set to FirstPerson. Whether to use the capsule representation (when present) from a skeletal mesh's ShadowPhysicsAsset for shadowing indirect lighting (from lightmaps or skylight). This flag is only used if CastShadow is true and if FirstPersonPrimitiveType is not set to FirstPerson. Whether or not to CPU skin this component, requires render data refresh after changing
| uint8 USkinnedMeshComponent::bDisableMorphTarget |
Disable Morphtarget for this component.
| uint8 USkinnedMeshComponent::bDisplayDebugUpdateRateOptimizations |
Enable on screen debugging of update rate optimization. Red = Skipping 0 frames, Green = skipping 1 frame, Blue = skipping 2 frames, black = skipping more than 2 frames.
|
protected |
Are we using double buffered ComponentSpaceTransforms
| uint8 USkinnedMeshComponent::bEnableUpdateRateOptimizations |
if TRUE, Owner will determine how often animation will be updated and evaluated. See AnimUpdateRateTick() This allows to skip frames for performance. (For example based on visibility and size on screen).
|
protected |
External flag indicating that we may not be evaluated every frame
|
protected |
Non URO-based interpolation flag
|
protected |
Whether we are externally controlling tick rate
|
protected |
Non URO-based update flag
|
protected |
If false, Follower components ShouldTickPose function will return false (default)
| uint8 USkinnedMeshComponent::bForceWireframe |
Forces the mesh to draw in wireframe mode.
|
protected |
Whether this component currently has any attachments that are driven by sockets
|
protected |
used to cache previous bone transform or not
| uint8 USkinnedMeshComponent::bHideSkin |
Don't bother rendering the skin.
| uint8 USkinnedMeshComponent::bIgnoreLeaderPoseComponentLOD |
Flag that when set will ensure UpdateLODStatus will not take the LeaderPoseComponent's current LOD in consideration when determining the correct LOD level (this requires LeaderPoseComponent's LOD to always be >= determined LOD otherwise bone transforms could be missing
| uint8 USkinnedMeshComponent::bIncludeComponentLocationIntoBounds |
If true, the Location of this Component will be included into its bounds calculation (this can be useful when using SMU_OnlyTickPoseWhenRendered on a character that moves away from the root and no bones are left near the origin of the component)
|
protected |
Whether mip callbacks have been registered and need to be removed on destroy
|
protected |
Track whether we still need to flip to recently modified buffer
Array of bone visibilities (containing one of the values in EBoneVisibilityStatus for each bone). A bone is only visible if it is exactly 1 (BVS_Visible)
| uint8 USkinnedMeshComponent::bOverrideMinLod |
Whether we should use the min lod specified in MinLodModel for this component instead of the min lod in the mesh
| uint8 USkinnedMeshComponent::bPerBoneMotionBlur |
If true, use per-bone motion blur on this skeletal mesh (requires additional rendering, can be disabled to save performance).
| uint8 USkinnedMeshComponent::bRecentlyRendered |
true if mesh has been recently rendered, false otherwise
| uint8 USkinnedMeshComponent::bRenderStatic |
If true, render as static in reference pose.
If true, MeshDeformer will be used. If false, use the default mesh deformer on the SkeletalMesh.
|
protected |
Whether or not a Skin Weight profile is currently pending load and creation for this component
|
protected |
Whether or not a Skin Weight profile is currently set for this component
| uint8 USkinnedMeshComponent::bSortTriangles |
Enable dynamic sort mesh's triangles to remove ordering issue when rendered with a translucent material
| uint8 USkinnedMeshComponent::bSyncAttachParentLOD |
If true, this component uses its parents LOD when attached if available ForcedLOD can override this change. By default, it will use parent LOD.
| uint8 USkinnedMeshComponent::bUseBoundsFromLeaderPoseComponent |
When true, we will just using the bounds from our LeaderPoseComponent. This is useful for when we have a Mesh Parented to the main SkelMesh (e.g. outline mesh or a full body overdraw effect that is toggled) that is always going to be the same bounds as parent. We want to do no calculations in that case.
| uint8 USkinnedMeshComponent::bUseScreenRenderStateForUpdate |
If set, use the screen render flag instead of the default render flag when processing offscreen-rendering optimizations (such as VisibilityBasedAnimTickOption) that look to reduce animation work when the mesh is not rendered. Using this option can result in meshes that are occlusion culled ceasing to perform animation work. Note that this can however result in shadows not being animated when meshes are not directly visible.
|
protected |
Cache the scene feature level
|
mutableprotected |
Bounds cached, so they're computed just once, either in local or worldspace depending on cvar 'a.CacheLocalSpaceBounds'.
|
mutableprotected |
| float USkinnedMeshComponent::CapsuleIndirectShadowMinVisibility |
Controls how dark the capsule indirect shadow can be.
|
protected |
Stores GFrameCounter when CurrentBoneTransformRevisionNumber was updated, to make sure it's updated once per frame
|
protected |
current bone transform revision number
|
protected |
The index for the ComponentSpaceTransforms buffer we can currently write to
|
protected |
The index for the ComponentSpaceTransforms buffer we can currently read from
Name of currently set up Skin Weight layers, all set to NAME_None for no override
|
protected |
|
protected |
Non-URO-based interpolation alpha
| TArray<FExternalMorphSets> USkinnedMeshComponent::ExternalMorphSets |
External GPU based morph target buffers, for each LOD. This contains an additional set of GPU only morphs that come from external other systems that generate morph targets. These morph targets can only be updated on the GPU, will not be serialized as part of the Skeletal Mesh, and will not show up in the editors morph target list. Every set of external morph targets has some given ID. Each LOD level has a map indexed by LOD number.
| TArray<FExternalMorphWeightData> USkinnedMeshComponent::ExternalMorphWeightData |
The external morph target set weight data, for each LOD. This data is (re)initialized by RefreshExternalMorphTargetWeights().
|
protected |
Record of the tick rate we are using when externally controlled
|
protected |
If set, this component has follower pose components that are associated with this Note this is weak object ptr, so it will go away unless you have other strong reference
| int32 USkinnedMeshComponent::ForcedLodModel |
If 0, auto-select LOD level. if >0, force to (ForcedLodModel-1).
|
protected |
The bounds radius at the point we last notified the streamer of a bounds radius change
Mapping between bone indices in this component and the parent one. Each element is the index of the bone in the LeaderPoseComponent. Size should be the same as USkeletalMesh.RefSkeleton size (ie number of bones in this skeleton).
|
protected |
Incremented every time the leader bone map changes. Used to keep in sync with any duplicate data needed by other threads
| TWeakObjectPtr<USkinnedMeshComponent> USkinnedMeshComponent::LeaderPoseComponent |
If set, this SkeletalMeshComponent will not use its SpaceBase for bone transform, but will use the component space transforms from the LeaderPoseComponent. This is used when constructing a character using multiple skeletal meshes sharing the same skeleton within the same Actor.
| TArray<struct FSkelMeshComponentLODInfo> USkinnedMeshComponent::LODInfo |
LOD array info. Each index will correspond to the LOD index
| float USkinnedMeshComponent::MaxDistanceFactor |
High (best) DistanceFactor that was desired for rendering this USkeletalMesh last frame. Represents how big this mesh was in screen space
|
protected |
The highest streaming LOD index clamp among components with SyncAttachParentLOD enabled in the attachment tree
|
protected |
The mesh deformer to use. Set to None to disable the deformer on the SkeletalMesh. If no deformer is set from here or the SkeletalMesh, we fall back to the fixed function deformation, unless AlwaysUseMeshDeformer is on.
|
protected |
Object containing state for the bound MeshDeformer.
|
protected |
Object containing instance settings for the bound MeshDeformer.
| FSkeletalMeshObject* USkinnedMeshComponent::MeshObject |
Object responsible for sending bone transforms, morph target state etc. to render thread.
| FSkeletalMeshObject *(* USkinnedMeshComponent::MeshObjectFactory) (void *UserData, USkinnedMeshComponent *InMeshComponent, FSkeletalMeshRenderData *InSkelMeshRenderData, ERHIFeatureLevel::Type InFeatureLevel) |
Supports user-defined FSkeletalMeshObjects
| void* USkinnedMeshComponent::MeshObjectFactoryUserData |
Passed into MeshObjectFactory
| int32 USkinnedMeshComponent::MinLodModel |
This is the min LOD that this component will use. (e.g. if set to 2 then only 2+ LOD Models will be used.) This is useful to set on meshes which are known to be a certain distance away and still want to have better LODs when zoomed in on them.
|
protected |
Map of missing bone indices->transforms so that calls to GetBoneTransform() succeed when bones are not present in a leader mesh when using leader-pose. Index key is the bone index of this mesh.
Array of weights for all morph targets. This array is updated inside RefreshBoneTransforms based on the Anim Blueprint.
| float USkinnedMeshComponent::NanitePixelProgrammableDistance |
Used to forcefully disable pixel programmable rasterization of Nanite when the mesh is further than a given distance from the camera.
| FOnAnimUpdateRateParamsCreated USkinnedMeshComponent::OnAnimUpdateRateParamsCreated |
Delegate when AnimUpdateRateParams is created, to override its default settings.
| FOnTickPose USkinnedMeshComponent::OnTickPose |
Invoked at the beginning of TickPose before doing the bulk of the tick work
| TObjectPtr<class UPhysicsAsset> USkinnedMeshComponent::PhysicsAssetOverride |
PhysicsAsset is set in SkeletalMesh by default, but you can override with this value
| int32 USkinnedMeshComponent::PredictedLODLevel |
Best LOD that was 'predicted' by UpdateSkelPose. This is what bones were updated based on, so we do not allow rendering at a better LOD than this.
|
protected |
Cache previous bone transform revision number to help compute CurrentBoneTransformRevisionNumber
Array of bone visibilities (containing one of the values in EBoneVisibilityStatus for each bone). A bone is only visible if it is exactly 1 (BVS_Visible) Note these are only used if we are NOT double-buffering bone transforms
|
protected |
Array of previous bone transforms Note these are only used if we are NOT double-buffering bone transforms
| FSkeletalMeshObject* USkinnedMeshComponent::PreviousMeshObject |
Previous copy of MeshObject set during recreate of the render state
|
protected |
Information for current ref pose override, if present
|
protected |
| TArray<ESkinCacheUsage> USkinnedMeshComponent::SkinCacheUsage |
How this Component's LOD uses the skin cache feature. Auto will defer to the asset's (SkeletalMesh) option. If Ray Tracing is enabled, will imply Enabled
|
protected |
Mapping for socket overrides, key is the Source socket name and the value is the override socket name
| float USkinnedMeshComponent::StreamingDistanceMultiplier |
Allows adjusting the desired streaming distance of streaming textures that uses UV 0. 1.0 is the default, whereas a higher value makes the textures stream in sooner from far away. A lower value (0.0-1.0) makes the textures stream in later (you have to be closer). Value can be < 0 (from legcay content, or code changes)
| EVisibilityBasedAnimTickOption USkinnedMeshComponent::VisibilityBasedAnimTickOption |