Navigation
API > API/Runtime > API/Runtime/Engine
USkeleton : that links between mesh and animation
- Bone hierarchy for animations
- Bone/track linkup between mesh and animation
- Retargetting related
| Name | USkeleton |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Animation/Skeleton.h |
| Include Path | #include "Animation/Skeleton.h" |
Syntax
UCLASS (HideCategories=Object, MinimalAPI, BlueprintType)
class USkeleton :
public UObject ,
public IInterface_AssetUserData ,
public IInterface_PreviewMeshProvider
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USkeleton
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USkeleton
(
const FObjectInitializer& ObjectInitializer |
Animation/Skeleton.h |
Classes
| Name | Remarks |
|---|---|
| FSmartNamesChangedEvent |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AnimCurveUID | SmartName::UID_Type | Animation/Skeleton.h | |
| FBoneTreeType | TArray< FBoneNode > | Animation/Skeleton.h | |
| FOnRetargetSourceChanged | FOnRetargetSourceChangedMulticaster::FDelegate | Animation/Skeleton.h | |
| FOnRetargetSourceChangedMulticaster | TMulticastDelegate_NoParams< void > | Animation/Skeleton.h | |
| FOnSkeletonHierarchyChanged | FOnSkeletonHierarchyChangedMulticaster::FDelegate | Animation/Skeleton.h | |
| FOnSkeletonHierarchyChangedMulticaster | TMulticastDelegate_NoParams< void > | Animation/Skeleton.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AnimNotifyTag | const FName | Asset registry information for animation notifies. | Animation/Skeleton.h |
| AnimNotifyTagDelimiter | const FString | Animation/Skeleton.h | |
| AnimSyncMarkerTag | const FName | Asset registry information for animation sync markers. | Animation/Skeleton.h |
| AnimSyncMarkerTagDelimiter | const FString | Animation/Skeleton.h | |
| AreAllSkeletonsCompatibleDelegate | FAreAllSkeletonsCompatible | Global compatibility delegate, used to override skeleton compatibility. | Animation/Skeleton.h |
| AttributeTag | const FName | Asset registry information for animation attributes. | Animation/Skeleton.h |
| CompatibleSkeletonsNameTag | const FName | Asset registry information for compatible skeletons. | Animation/Skeleton.h |
| CompatibleSkeletonsTagDelimiter | const FString | Animation/Skeleton.h | |
| CurveNameTag | const FName | Asset registry information for animation curves. | Animation/Skeleton.h |
| CurveTagDelimiter | const FString | Animation/Skeleton.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AnimationNotifies | TArray< FName > | AnimNotifiers that has been created. | Animation/Skeleton.h | |
| AnimRetargetSources | TMap< FName, FReferencePose > | Serializable retarget sources for this skeleton | Animation/Skeleton.h | |
| BlendProfiles | TArray< TObjectPtr< UBlendProfile > > | List of blend profiles available in this skeleton | Animation/Skeleton.h |
|
| CachedSoftObjectPtr | TSoftObjectPtr< USkeleton > | A cached soft object pointer of this skeleton. | Animation/Skeleton.h | |
| PreviewAttachedAssetContainer | FPreviewAssetAttachContainer | Attached assets component for this skeleton | Animation/Skeleton.h | |
| Sockets | TArray< TObjectPtr< class USkeletalMeshSocket > > | Array of named socket locations, set up in editor and used as a shortcut instead of specifying everything explicitly to AttachComponent in the SkeletalMeshComponent. | Animation/Skeleton.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AdditionalPreviewSkeletalMeshes | TSoftObjectPtr< class UDataAsset > | The additional skeletal meshes to use when previewing this skeleton | Animation/Skeleton.h |
|
| OnRetargetSourceChanged | FOnRetargetSourceChangedMulticaster | Animation/Skeleton.h | ||
| PreviewSkeletalMesh | TSoftObjectPtr< class USkeletalMesh > | The default skeletal mesh to use when previewing this skeleton | Animation/Skeleton.h |
|
| SkinnedAssetLinkupCache | TMap< TObjectKey< USkinnedAsset >, TUniquePtr< FSkeletonToMeshLinkup > > | Runtime built mapping table between SkinnedAssets and Mesh Linkup Data | Animation/Skeleton.h | |
| SkinnedAssetLinkupCacheLock | FTransactionallySafeRWLock | Use this Lock everytime you change or access SkinnedAssetLinkupCache member. | Animation/Skeleton.h | |
| SlotGroups | TArray< FAnimSlotGroup > | Serialized slot groups and slot names. | Animation/Skeleton.h | |
| SlotToGroupNameMap | TMap< FName, FName > | SlotName to GroupName TMap, only at runtime, not serialized. | Animation/Skeleton.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AccumulateCurveMetaData
(
FName CurveName, |
This is called when you know both flags - called by post serialize and import | Animation/Skeleton.h | |
void AddCompatibleSkeleton
(
const USkeleton* SourceSkeleton |
Animation/Skeleton.h |
|
|
void AddCompatibleSkeletonSoft
(
const TSoftObjectPtr< USkeleton >& SourceSkeleton |
Animation/Skeleton.h |
|
|
bool AddCurveMetaData
(
FName CurveName, |
Adds a curve metadata entry with the specified name | Animation/Skeleton.h | |
const FSkeletonToMeshLinkup & AddMeshLinkupData
(
const USkinnedAsset* InSkinnedAsset |
Adds a new Mesh Linkup Table to the map for a particular SkinnedAsset | Animation/Skeleton.h | |
void AddNewAnimationNotify
(
FName NewAnimNotifyName |
Adds a new anim notify to the cached AnimationNotifies array. | Animation/Skeleton.h | |
| Animation/Skeleton.h | |||
bool AddNewVirtualBone
(
const FName SourceBoneName, |
Animation/Skeleton.h | ||
bool AddNewVirtualBone
(
const FName SourceBoneName, |
Animation/Skeleton.h | ||
bool AddSlotGroupName
(
const FName& InNewGroupName |
Returns true if Group is added, false if it already exists | Animation/Skeleton.h | |
void CallbackRetargetSourceChanged() |
Animation/Skeleton.h | ||
void ClearCacheData() |
Clears all cache data | Animation/Skeleton.h | |
void CollectAnimationNotifies () |
Animation/Skeleton.h | ||
void CollectAnimationNotifies
(
TArray< FName >& OutNotifies |
Collect animation notifies that are referenced in all animations that use this skeleton (uses the asset registry). | Animation/Skeleton.h | |
bool ContainsSlotName
(
const FName& InSlotName |
Animation/Skeleton.h | ||
UBlendProfile * CreateNewBlendProfile
(
const FName& InProfileName |
Create a new blend profile with the specified name | Animation/Skeleton.h | |
FAnimSlotGroup * FindAnimSlotGroup
(
const FName& InGroupName |
Animation/Skeleton.h | ||
const FAnimSlotGroup * FindAnimSlotGroup
(
const FName& InGroupName |
Animation/Skeleton.h | ||
USkeletalMesh * FindCompatibleMesh() |
Find the first compatible mesh for this skeleton | Animation/Skeleton.h | |
const FSkeletonToMeshLinkup & FindOrAddMeshLinkupData
(
const USkinnedAsset* InSkinnedAsset |
Find a mesh linkup table (mapping of skeleton bone tree indices to refpose indices) for a particular SkinnedAsset If one does not already exist, create it now. | Animation/Skeleton.h | |
USkeletalMeshSocket * FindSocket
(
FName InSocketName |
Animation/Skeleton.h | ||
USkeletalMeshSocket * FindSocketAndIndex
(
FName InSocketName, |
Animation/Skeleton.h | ||
void ForEachCurveMetaData
(
TFunctionRef< void(FName, const FCurveMetaData&)> InFunction |
Iterate over all curve metadata entries, calling InFunction on each | Animation/Skeleton.h | |
UDataAsset * GetAdditionalPreviewSkeletalMeshes() |
Get the additional skeletal meshes we use when previewing this skeleton | Animation/Skeleton.h | |
uint16 GetAnimCurveUidVersion() |
Return version of AnimCurveUidVersion | Animation/Skeleton.h | |
USkeletalMesh * GetAssetPreviewMesh
(
UObject* InAsset |
Animation/Skeleton.h | ||
UBlendProfile * GetBlendProfile
(
const FName& InProfileName |
Get the specified blend profile by name | Animation/Skeleton.h |
|
EBoneTranslationRetargetingMode::Type GetBoneTranslationRetargetingMode
(
const int32 BoneTreeIdx, |
Animation/Skeleton.h | ||
int32 GetChildBones
(
int32 ParentBoneIndex, |
Get List of Child Bones of the ParentBoneIndex | Animation/Skeleton.h | |
void GetCompatibleAssets
(
UClass* AssetClass, |
Get compatible assets given the asset's class and skeleton tag. | Animation/Skeleton.h | |
void GetCompatibleSkeletonAssets
(
TArray< FAssetData >& OutAssets |
Get all skeleton assets that are compatible with this skeleton (not just the internal list, but also reciprocally and implicitly compatible skeletons) | Animation/Skeleton.h | |
const TArray< TSoftObjectPtr< USkeleton > > & GetCompatibleSkeletons() |
Animation/Skeleton.h | ||
FCurveMetaData * GetCurveMetaData
(
FName CurveName |
Animation/Skeleton.h | ||
const FCurveMetaData * GetCurveMetaData
(
FName CurveName |
Animation/Skeleton.h | ||
bool GetCurveMetaDataMaterial
(
FName CurveName |
Gets the material flag for a curve's metadata | Animation/Skeleton.h | |
bool GetCurveMetaDataMorphTarget
(
FName CurveName |
Gets the morph target flag for a curve's metadata | Animation/Skeleton.h | |
| Get an array of all curve metadata names | Animation/Skeleton.h | ||
| Get existing (seen) sync marker names for this Skeleton. | Animation/Skeleton.h | ||
const FGuid GetGuid() |
Animation/Skeleton.h | ||
int32 GetMeshBoneIndexFromSkeletonBoneIndex
(
const USkinnedAsset* InSkinnedAsset, |
Get Reference Bone Index from Bone Tree Index | Animation/Skeleton.h | |
int32 GetNumCurveMetaData() |
Animation/Skeleton.h | ||
EAxis::Type GetPreviewForwardAxis() |
Animation/Skeleton.h | ||
int32 GetRawAnimationTrackIndex
(
const int32 InSkeletonBoneIndex, |
Get Track index of InAnimSeq for the BoneTreeIndex of BoneTree this is slow, and it's not supposed to be used heavily | Animation/Skeleton.h | |
const FReferenceSkeleton & GetReferenceSkeleton() |
Accessor to Reference Skeleton to make data read only | Animation/Skeleton.h | |
| Get the local-space ref pose for the specified retarget source. | Animation/Skeleton.h | ||
FName GetRetargetSourceForMesh
(
USkinnedAsset* InSkinnedAsset |
Find a retarget source for a particular mesh. | Animation/Skeleton.h | |
| Get all the retarget source names for this skeleton. | Animation/Skeleton.h | ||
int32 GetSkeletonBoneIndexFromMeshBoneIndex
(
const USkinnedAsset* InSkinnedAsset, |
Get Bone Tree Index from Reference Bone Index | Animation/Skeleton.h | |
const FSkeletonRemapping * GetSkeletonRemapping
(
const USkeleton* SourceSkeleton |
Animation/Skeleton.h | ||
| Animation/Skeleton.h | |||
const TArray< FAnimSlotGroup > & GetSlotGroups() |
Animation/Skeleton.h | ||
bool GetUseRetargetModesFromCompatibleSkeleton() |
Animation/Skeleton.h | ||
FGuid GetVirtualBoneGuid() |
Animation/Skeleton.h | ||
const TArray< FVirtualBone > & GetVirtualBones() |
Accessor for the array of virtual bones on this skeleton | Animation/Skeleton.h | |
void HandleVirtualBoneChanges() |
Animation/Skeleton.h | ||
bool IsCompatibleForEditor
(
const FString& SkeletonAssetString |
Check if this skeleton is compatible with another skeleton asset that is identified by the string returned by AssetData(SkeletonPtr).GetExportTextName(). | Animation/Skeleton.h | |
bool IsCompatibleForEditor
(
const USkeleton* InSkeleton |
Check if animation content authored on the supplied skeleton may be played on this skeleton. | Animation/Skeleton.h | |
bool IsCompatibleForEditor
(
const FAssetData& AssetData, |
Check if this skeleton is compatible with a given other asset, if that is a skeleton. | Animation/Skeleton.h | |
bool IsCompatibleMesh
(
const USkinnedAsset* InSkinnedAsset, |
Indexing naming convention | Animation/Skeleton.h | |
void LoadAdditionalPreviewSkeletalMeshes() |
Load any additional meshes we may have | Animation/Skeleton.h | |
bool MergeAllBonesToBoneTree
(
const USkinnedAsset* InSkinnedAsset, |
Merge all Bones to BoneTrees if not exists | Animation/Skeleton.h | |
bool MergeBonesToBoneTree
(
const USkinnedAsset* InSkinnedAsset, |
Merge Bones (RequiredBones from InSkinnedAsset) to BoneTrees if not exists | Animation/Skeleton.h | |
void RebuildLinkup
(
const USkinnedAsset* InSkinnedAsset |
Rebuild Look up between SkelMesh to BoneTree - this should only get called when SkelMesh is re-imported or so, where the mapping may be no longer valid | Animation/Skeleton.h | |
bool RecreateBoneTree
(
USkinnedAsset* InSkinnedAsset |
Merge has failed, then Recreate BoneTree | Animation/Skeleton.h | |
void RegisterMarkerName
(
FName MarkerName |
Register a new sync marker name. | Animation/Skeleton.h | |
FDelegateHandle RegisterOnRetargetSourceChanged
(
const FOnRetargetSourceChanged& Delegate |
Registers a delegate to be called after the preview animation has been changed | Animation/Skeleton.h | |
void RegisterOnSkeletonHierarchyChanged
(
const FOnSkeletonHierarchyChanged& Delegate |
Registers a delegate to be called after notification has changed | Animation/Skeleton.h | |
bool RegisterSlotNode
(
const FName& InSlotName |
Register a slot name. Return true if a slot was registered, false if it was already registered. | Animation/Skeleton.h | |
void RemoveAnimationNotify
(
FName AnimNotifyName |
Removes an anim notify from the cached AnimationNotifies array. | Animation/Skeleton.h | |
| Removes the supplied bones from the skeleton | Animation/Skeleton.h | ||
void RemoveCompatibleSkeleton
(
const USkeleton* SourceSkeleton |
Animation/Skeleton.h | ||
void RemoveCompatibleSkeleton
(
const TSoftObjectPtr< USkeleton >& SourceSkeleton |
Animation/Skeleton.h | ||
bool RemoveCurveMetaData
(
FName CurveName |
Removes a curve metadata entry for the specified name. | Animation/Skeleton.h | |
bool RemoveCurveMetaData
(
TArrayView< FName > CurveNames |
Removes a group of curve metadata entries for the specified names. | Animation/Skeleton.h | |
void RemoveLinkup
(
const USkinnedAsset* InSkinnedAsset |
Remove Link up cache for the SkelMesh | Animation/Skeleton.h | |
bool RemoveMarkerName
(
FName MarkerName |
Remove a sync marker name. | Animation/Skeleton.h | |
void RemoveSlotGroup
(
const FName& InSlotName |
Animation/Skeleton.h | ||
void RemoveSlotName
(
const FName& InSlotName |
Edits/removes slot group data WARNING: Does not verify that the names aren't used anywhere - if it isn't checked by the caller the names will be recreated when referencing assets load again. | Animation/Skeleton.h | |
| Animation/Skeleton.h | |||
| Renames an anim notify. | Animation/Skeleton.h | ||
UBlendProfile * RenameBlendProfile
(
const FName& InProfileName, |
Rename an existing blend profile with the specified name. | Animation/Skeleton.h | |
| Renames a curve metadata entry. Metadata is preserved, but assigned to a different curve name. | Animation/Skeleton.h | ||
| Rename a sync marker name. | Animation/Skeleton.h | ||
| Animation/Skeleton.h | |||
| Animation/Skeleton.h | |||
void SetAdditionalPreviewSkeletalMeshes
(
UDataAsset* InPreviewCollectionAsset |
Set the additional skeletal meshes we use when previewing this skeleton | Animation/Skeleton.h | |
void SetBoneTranslationRetargetingMode
(
const int32 BoneIndex, |
Animation/Skeleton.h | ||
void SetCurveMetaDataMaterial
(
FName CurveName, |
Set the material flag for a curve's metadata | Animation/Skeleton.h | |
void SetCurveMetaDataMorphTarget
(
FName CurveName, |
Set the morph target flag for a curve's metadata | Animation/Skeleton.h | |
| Animation/Skeleton.h | |||
void SetUseRetargetModesFromCompatibleSkeleton
(
bool bUse |
Animation/Skeleton.h | ||
bool ShouldFilterAsset
(
const FAssetData& InAssetData, |
Wrapper for !IsCompatibleForEditor, used as a convenience function for binding to FOnShouldFilterAsset in asset pickers. | Animation/Skeleton.h | |
void UnregisterOnRetargetSourceChanged
(
FDelegateHandle Handle |
Unregisters a delegate to be called after the preview animation has been changed | Animation/Skeleton.h | |
void UnregisterOnSkeletonHierarchyChanged
(
FDelegateUserObject Unregister |
Animation/Skeleton.h | ||
void UpdateReferencePoseFromMesh
(
const USkinnedAsset* InSkinnedAsset |
Create RefLocalPoses from InSkinnedAsset. | Animation/Skeleton.h | |
void UpdateRetargetSource
(
const FName InName |
Update Retarget Source with given name | Animation/Skeleton.h | |
int32 ValidatePreviewAttachedObjects() |
Makes sure all attached objects are valid and removes any that aren't. | Animation/Skeleton.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
Animation/Skeleton.h | ||
virtual bool IsPostLoadThreadSafe() |
Animation/Skeleton.h | ||
virtual void PostDuplicate
(
bool bDuplicateForPIE |
Animation/Skeleton.h | ||
virtual void PostEditUndo() |
Animation/Skeleton.h | ||
virtual void PostInitProperties() |
Animation/Skeleton.h | ||
virtual void PostLoad() |
Animation/Skeleton.h | ||
virtual void PreEditUndo() |
Animation/Skeleton.h | ||
virtual void Serialize
(
FArchive& Ar |
Animation/Skeleton.h |
Overridden from IInterface_AssetUserData
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddAssetUserData
(
UAssetUserData* InUserData |
Animation/Skeleton.h | ||
virtual const TArray< UAssetUserData * > * GetAssetUserDataArray() |
Animation/Skeleton.h | ||
virtual UAssetUserData * GetAssetUserDataOfClass
(
TSubclassOf< UAssetUserData > InUserDataClass |
Returns an instance of the provided AssetUserData class if it's contained in the target asset. | Animation/Skeleton.h | |
virtual void RemoveUserDataOfClass
(
TSubclassOf< UAssetUserData > InUserDataClass |
Animation/Skeleton.h |
Overridden from IInterface_PreviewMeshProvider
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual USkeletalMesh * GetPreviewMesh () |
Get the preview mesh for this asset | Animation/Skeleton.h | |
virtual USkeletalMesh * GetPreviewMesh
(
bool bFindIfNotSet |
IInterface_PreviewMeshProvider interface | Animation/Skeleton.h | |
virtual void SetPreviewMesh
(
USkeletalMesh* PreviewMesh, |
Set the preview mesh for this asset | Animation/Skeleton.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BuildLinkupData
(
const USkinnedAsset* InSkinnedAsset, |
Build Look up between SkinnedAsset to BoneTree | Animation/Skeleton.h | |
void ConvertToFReferenceSkeleton () |
Conversion function. | Animation/Skeleton.h | |
bool CreateReferenceSkeletonFromMesh
(
const USkinnedAsset* InSkinnedAsset, |
Create Reference Skeleton From the given Mesh | Animation/Skeleton.h | |
bool DoesParentChainMatch
(
int32 StartBoneTreeIndex, |
Check if Parent Chain Matches between BoneTree, and SkinnedAsset Meaning if BoneTree has A->B->C (top to bottom) and if SkinnedAsset has A->C It will fail since it's missing B We ensure this chain matches to play animation properly | Animation/Skeleton.h | |
void HandleSkeletonHierarchyChange
(
bool bShowProgress |
Call this when the skeleton has changed to fix dependent assets | Animation/Skeleton.h | |
void RefreshAllRetargetSources() |
Refresh All Retarget Sources | Animation/Skeleton.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void HandlePackageReloaded
(
const EPackageReloadPhase InPackageReloadPhase, |
Handle skeletons being reloaded via the content browser. | Animation/Skeleton.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| RefLocalPoses_DEPRECATED | TArray< FTransform > | Reference skeleton poses in local space | Animation/Skeleton.h | |
| SmartNames_DEPRECATED | FSmartNameContainer | Animation/Skeleton.h |