UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSkeletalMeshAttributes Class Reference

#include <SkeletalMeshAttributes.h>

+ Inheritance diagram for FSkeletalMeshAttributes:

Public Member Functions

SKELETALMESHDESCRIPTION_API FSkeletalMeshAttributes (FMeshDescription &InMeshDescription)
 
virtual SKELETALMESHDESCRIPTION_API void Register (bool bKeepExistingAttribute=false) override
 
SKELETALMESHDESCRIPTION_API bool RegisterImportPointIndexAttribute ()
 
SKELETALMESHDESCRIPTION_API void UnregisterImportPointIndexAttribute ()
 
SKELETALMESHDESCRIPTION_API bool RegisterSkinWeightAttribute (const FName InProfileName)
 
SKELETALMESHDESCRIPTION_API bool UnregisterSkinWeightAttribute (const FName InProfileName)
 
SKELETALMESHDESCRIPTION_API FSkinWeightsVertexAttributesRef GetVertexSkinWeights (const FName InProfileName=NAME_None)
 Returns the skin weight profile given by its name. NAME_None corresponds to the default profile.
 
SKELETALMESHDESCRIPTION_API FSkinWeightsVertexAttributesRef GetVertexSkinWeightsFromAttributeName (const FName InAttributeName=NAME_None)
 
SKELETALMESHDESCRIPTION_API bool RegisterMorphTargetAttribute (const FName InMorphTargetName, const bool bIncludeNormals)
 
SKELETALMESHDESCRIPTION_API bool UnregisterMorphTargetAttribute (const FName InMorphTargetName)
 
SKELETALMESHDESCRIPTION_API TVertexAttributesRef< FVector3fGetVertexMorphPositionDelta (const FName InMorphTargetName)
 
SKELETALMESHDESCRIPTION_API TVertexInstanceAttributesRef< FVector3fGetVertexInstanceMorphNormalDelta (const FName InMorphTargetName)
 
SKELETALMESHDESCRIPTION_API void RegisterColorAttribute ()
 
SKELETALMESHDESCRIPTION_API FBoneArrayBones ()
 
SKELETALMESHDESCRIPTION_API TAttributesSet< FBoneID > & BoneAttributes ()
 
SKELETALMESHDESCRIPTION_API void ReserveNewBones (const int InNumBones)
 
SKELETALMESHDESCRIPTION_API FBoneID CreateBone ()
 
SKELETALMESHDESCRIPTION_API void CreateBone (const FBoneID BoneID)
 
SKELETALMESHDESCRIPTION_API void DeleteBone (const FBoneID BoneID)
 
SKELETALMESHDESCRIPTION_API FBoneNameAttributesRef GetBoneNames ()
 
SKELETALMESHDESCRIPTION_API FBoneParentIndexAttributesRef GetBoneParentIndices ()
 
SKELETALMESHDESCRIPTION_API FBonePoseAttributesRef GetBonePoses ()
 
SKELETALMESHDESCRIPTION_API FBoneColorAttributesRef GetBoneColors ()
 
SKELETALMESHDESCRIPTION_API void RegisterSourceGeometryPartsAttributes ()
 
SKELETALMESHDESCRIPTION_API FSourceGeometryPartArraySourceGeometryParts ()
 
SKELETALMESHDESCRIPTION_API TAttributesSet< FSourceGeometryPartID > & SourceGeometryPartAttributes ()
 
SKELETALMESHDESCRIPTION_API FSourceGeometryPartID CreateSourceGeometryPart ()
 
SKELETALMESHDESCRIPTION_API void DeleteSourceGeometryPart (FSourceGeometryPartID InSourceGeometryPartID)
 
SKELETALMESHDESCRIPTION_API FSourceGeometryPartNameRef GetSourceGeometryPartNames ()
 
SKELETALMESHDESCRIPTION_API FSourceGeometryPartVertexOffsetAndCountRef GetSourceGeometryPartVertexOffsetAndCounts ()
 
- Public Member Functions inherited from FStaticMeshAttributes
 FStaticMeshAttributes (FMeshDescription &InMeshDescription)
 
STATICMESHDESCRIPTION_API void RegisterTriangleNormalAndTangentAttributes ()
 
STATICMESHDESCRIPTION_API void RegisterPolygonObjectNameAttribute ()
 
TVertexInstanceAttributesRef< FVector2fGetVertexInstanceUVs ()
 
TVertexInstanceAttributesConstRef< FVector2fGetVertexInstanceUVs () const
 
TVertexInstanceAttributesRef< FVector3fGetVertexInstanceNormals ()
 
TVertexInstanceAttributesConstRef< FVector3fGetVertexInstanceNormals () const
 
TVertexInstanceAttributesRef< FVector3fGetVertexInstanceTangents ()
 
TVertexInstanceAttributesConstRef< FVector3fGetVertexInstanceTangents () const
 
TVertexInstanceAttributesRef< floatGetVertexInstanceBinormalSigns ()
 
TVertexInstanceAttributesConstRef< floatGetVertexInstanceBinormalSigns () const
 
TVertexInstanceAttributesRef< FVector4fGetVertexInstanceColors ()
 
TVertexInstanceAttributesConstRef< FVector4fGetVertexInstanceColors () const
 
TEdgeAttributesRef< boolGetEdgeHardnesses ()
 
TEdgeAttributesConstRef< boolGetEdgeHardnesses () const
 
TTriangleAttributesRef< FVector3fGetTriangleNormals ()
 
TTriangleAttributesConstRef< FVector3fGetTriangleNormals () const
 
TTriangleAttributesRef< FVector3fGetTriangleTangents ()
 
TTriangleAttributesConstRef< FVector3fGetTriangleTangents () const
 
TTriangleAttributesRef< FVector3fGetTriangleBinormals ()
 
TTriangleAttributesConstRef< FVector3fGetTriangleBinormals () const
 
TPolygonAttributesRef< FNameGetPolygonObjectNames ()
 
TPolygonAttributesConstRef< FNameGetPolygonObjectNames () const
 
TPolygonGroupAttributesRef< FNameGetPolygonGroupMaterialSlotNames ()
 
TPolygonGroupAttributesConstRef< FNameGetPolygonGroupMaterialSlotNames () const
 
- Public Member Functions inherited from FMeshAttributes
 FMeshAttributes (FMeshDescription &InMeshDescription)
 
virtual ~FMeshAttributes ()=default
 
TVertexAttributesRef< FVector3fGetVertexPositions ()
 
TVertexAttributesConstRef< FVector3fGetVertexPositions () const
 
TVertexInstanceAttributesRef< FVertexIDGetVertexInstanceVertexIndices ()
 
TVertexInstanceAttributesConstRef< FVertexIDGetVertexInstanceVertexIndices () const
 
TEdgeAttributesRef< TArrayView< FVertexID > > GetEdgeVertexIndices ()
 
TEdgeAttributesConstRef< TArrayView< FVertexID > > GetEdgeVertexIndices () const
 
TTriangleAttributesRef< TArrayView< FVertexInstanceID > > GetTriangleVertexInstanceIndices ()
 
TTriangleAttributesConstRef< TArrayView< FVertexInstanceID > > GetTriangleVertexInstanceIndices () const
 
TTriangleAttributesRef< TArrayView< FEdgeID > > GetTriangleEdgeIndices ()
 
TTriangleAttributesConstRef< TArrayView< FEdgeID > > GetTriangleEdgeIndices () const
 
TTriangleAttributesRef< TArrayView< FVertexID > > GetTriangleVertexIndices ()
 
TTriangleAttributesConstRef< TArrayView< FVertexID > > GetTriangleVertexIndices () const
 
TTriangleAttributesRef< TArrayView< FUVID > > GetTriangleUVIndices ()
 
TTriangleAttributesConstRef< TArrayView< FUVID > > GetTriangleUVIndices () const
 
TUVAttributesRef< FVector2fGetUVCoordinates (int32 UVChannel)
 
TUVAttributesConstRef< FVector2fGetUVCoordinates (int32 UVChannel) const
 
TTriangleAttributesRef< FPolygonGroupIDGetTrianglePolygonGroupIndices ()
 
TTriangleAttributesConstRef< FPolygonGroupIDGetTrianglePolygonGroupIndices () const
 
TPolygonAttributesRef< FPolygonGroupIDGetPolygonPolygonGroupIndices ()
 
TPolygonAttributesConstRef< FPolygonGroupIDGetPolygonPolygonGroupIndices () const
 
- Public Member Functions inherited from FSkeletalMeshAttributesShared
SKELETALMESHDESCRIPTION_API FSkeletalMeshAttributesShared (const FMeshDescription &InMeshDescription)
 
SKELETALMESHDESCRIPTION_API TArray< FNameGetSkinWeightProfileNames (const bool bInUserDefinedOnly=false) const
 
SKELETALMESHDESCRIPTION_API FSkinWeightsVertexAttributesConstRef GetVertexSkinWeights (const FName InProfileName=NAME_None) const
 
SKELETALMESHDESCRIPTION_API FSkinWeightsVertexAttributesConstRef GetVertexSkinWeightsFromAttributeName (const FName InAttributeName=NAME_None) const
 
SKELETALMESHDESCRIPTION_API TArray< FNameGetMorphTargetNames () const
 Returns the list of all registered morph targets on this mesh.
 
SKELETALMESHDESCRIPTION_API TVertexAttributesConstRef< FVector3fGetVertexMorphPositionDelta (const FName InMorphTargetName) const
 
SKELETALMESHDESCRIPTION_API TVertexInstanceAttributesConstRef< FVector3fGetVertexInstanceMorphNormalDelta (const FName InMorphTargetName) const
 
SKELETALMESHDESCRIPTION_API bool HasMorphTargetPositionsAttribute (const FName InMorphTargetName) const
 
SKELETALMESHDESCRIPTION_API bool HasMorphTargetNormalsAttribute (const FName InMorphTargetName) const
 
SKELETALMESHDESCRIPTION_API bool HasBoneColorAttribute () const
 
SKELETALMESHDESCRIPTION_API bool HasBoneNameAttribute () const
 
SKELETALMESHDESCRIPTION_API bool HasBonePoseAttribute () const
 
SKELETALMESHDESCRIPTION_API bool HasBoneParentIndexAttribute () const
 
SKELETALMESHDESCRIPTION_API const FBoneArrayBones () const
 
SKELETALMESHDESCRIPTION_API const TAttributesSet< FBoneID > & BoneAttributes () const
 
bool HasBones () const
 
SKELETALMESHDESCRIPTION_API int32 GetNumBones () const
 
SKELETALMESHDESCRIPTION_API bool IsBoneValid (const FBoneID BoneID) const
 
SKELETALMESHDESCRIPTION_API FBoneNameAttributesConstRef GetBoneNames () const
 
SKELETALMESHDESCRIPTION_API FBoneParentIndexAttributesConstRef GetBoneParentIndices () const
 
SKELETALMESHDESCRIPTION_API FBonePoseAttributesConstRef GetBonePoses () const
 
SKELETALMESHDESCRIPTION_API FBoneColorAttributesConstRef GetBoneColors () const
 
bool HasSourceGeometryParts () const
 
SKELETALMESHDESCRIPTION_API const FSourceGeometryPartArraySourceGeometryParts () const
 
SKELETALMESHDESCRIPTION_API const TAttributesSet< FSourceGeometryPartID > & SourceGeometryPartAttributes () const
 
SKELETALMESHDESCRIPTION_API int32 GetNumSourceGeometryParts () const
 
SKELETALMESHDESCRIPTION_API bool IsSourceGeometryPartValid (const FSourceGeometryPartID InSourceGeometryPartID) const
 
SKELETALMESHDESCRIPTION_API FSourceGeometryPartNameConstRef GetSourceGeometryPartNames () const
 
SKELETALMESHDESCRIPTION_API FSourceGeometryPartVertexOffsetAndCountConstRef GetSourceGeometryPartVertexOffsetAndCounts () const
 

Static Public Member Functions

static bool IsReservedAttributeName (const FName InAttributeName)
 
- Static Public Member Functions inherited from FStaticMeshAttributes
static bool IsReservedAttributeName (const FName InAttributeName)
 
- Static Public Member Functions inherited from FMeshAttributes
static bool IsReservedAttributeName (const FName InAttributeName)
 
- Static Public Member Functions inherited from FSkeletalMeshAttributesShared
static SKELETALMESHDESCRIPTION_API bool IsValidSkinWeightProfileName (const FName InProfileName)
 
static SKELETALMESHDESCRIPTION_API bool IsSkinWeightAttribute (const FName InAttributeName)
 Helper function that indicates whether an attribute name represents a skin weight attribute.
 
static SKELETALMESHDESCRIPTION_API FName GetProfileNameFromAttribute (const FName InAttributeName)
 
static SKELETALMESHDESCRIPTION_API bool IsMorphTargetAttribute (const FName InAttributeName)
 Returns true if the given attribute name refers to a morph target attribute.
 
static SKELETALMESHDESCRIPTION_API FName GetMorphTargetNameFromAttribute (const FName InAttributeName)
 Returns the name of a morph target given the attribute name. If the given attribute name is invalid, NAME_None is returned.
 

Additional Inherited Members

- Public Types inherited from FSkeletalMeshAttributesShared
using FBoneArray = TMeshElementContainer< FBoneID >
 
using FBoneNameAttributesRef = TMeshAttributesRef< FBoneID, FName >
 
using FBoneNameAttributesConstRef = TMeshAttributesConstRef< FBoneID, FName >
 
using FBoneParentIndexAttributesRef = TMeshAttributesRef< FBoneID, int32 >
 
using FBoneParentIndexAttributesConstRef = TMeshAttributesConstRef< FBoneID, int32 >
 
using FBonePoseAttributesRef = TMeshAttributesRef< FBoneID, FTransform >
 
using FBonePoseAttributesConstRef = TMeshAttributesConstRef< FBoneID, FTransform >
 
using FBoneColorAttributesRef = TMeshAttributesRef< FBoneID, FVector4f >
 
using FBoneColorAttributesConstRef = TMeshAttributesConstRef< FBoneID, FVector4f >
 
using FSourceGeometryPartArray = TMeshElementContainer< FSourceGeometryPartID >
 
using FSourceGeometryPartNameRef = TMeshAttributesRef< FSourceGeometryPartID, FName >
 
using FSourceGeometryPartNameConstRef = TMeshAttributesConstRef< FSourceGeometryPartID, FName >
 
using FSourceGeometryPartVertexOffsetAndCountRef = TMeshAttributesRef< FSourceGeometryPartID, TArrayView< int32 > >
 
using FSourceGeometryPartVertexOffsetAndCountConstRef = TMeshAttributesConstRef< FSourceGeometryPartID, TArrayView< int32 > >
 
- Static Public Attributes inherited from FSkeletalMeshAttributesShared
static SKELETALMESHDESCRIPTION_API FName BonesElementName
 
static SKELETALMESHDESCRIPTION_API FName SourceGeometryPartElementName
 
static SKELETALMESHDESCRIPTION_API FName DefaultSkinWeightProfileName
 
- Static Protected Member Functions inherited from FSkeletalMeshAttributesShared
static SKELETALMESHDESCRIPTION_API FName CreateSkinWeightAttributeName (const FName InProfileName)
 
static SKELETALMESHDESCRIPTION_API FName CreateMorphTargetAttributeName (const FName InMorphTargetName)
 Construct a name for a morph target attribute with the given a user-visible morph target name.
 
- Protected Attributes inherited from FMeshAttributes
FMeshDescriptionMeshDescription
 
- Protected Attributes inherited from FSkeletalMeshAttributesShared
const FMeshElementChannelsBoneElementsShared = nullptr
 
const FMeshElementChannelsSourceGeometryPartElementsShared = nullptr
 

Constructor & Destructor Documentation

◆ FSkeletalMeshAttributes()

FSkeletalMeshAttributes::FSkeletalMeshAttributes ( FMeshDescription InMeshDescription)
explicit

Member Function Documentation

◆ BoneAttributes()

TAttributesSet< FBoneID > & FSkeletalMeshAttributes::BoneAttributes ( )

◆ Bones()

FSkeletalMeshAttributes::FBoneArray & FSkeletalMeshAttributes::Bones ( )

◆ CreateBone() [1/2]

FBoneID FSkeletalMeshAttributes::CreateBone ( )

Adds a new bone and returns its ID

◆ CreateBone() [2/2]

void FSkeletalMeshAttributes::CreateBone ( const FBoneID  BoneID)

Adds a new bone with the given ID

◆ CreateSourceGeometryPart()

FSourceGeometryPartID FSkeletalMeshAttributes::CreateSourceGeometryPart ( )

◆ DeleteBone()

void FSkeletalMeshAttributes::DeleteBone ( const FBoneID  BoneID)

Deletes a bone with the given ID

◆ DeleteSourceGeometryPart()

void FSkeletalMeshAttributes::DeleteSourceGeometryPart ( FSourceGeometryPartID  InSourceGeometryPartID)

◆ GetBoneColors()

FSkeletalMeshAttributes::FBoneColorAttributesRef FSkeletalMeshAttributes::GetBoneColors ( )

◆ GetBoneNames()

FSkeletalMeshAttributes::FBoneNameAttributesRef FSkeletalMeshAttributes::GetBoneNames ( )

◆ GetBoneParentIndices()

FSkeletalMeshAttributes::FBoneParentIndexAttributesRef FSkeletalMeshAttributes::GetBoneParentIndices ( )

◆ GetBonePoses()

FSkeletalMeshAttributes::FBonePoseAttributesRef FSkeletalMeshAttributes::GetBonePoses ( )

◆ GetSourceGeometryPartNames()

FSkeletalMeshAttributesShared::FSourceGeometryPartNameRef FSkeletalMeshAttributes::GetSourceGeometryPartNames ( )

◆ GetSourceGeometryPartVertexOffsetAndCounts()

FSkeletalMeshAttributesShared::FSourceGeometryPartVertexOffsetAndCountRef FSkeletalMeshAttributes::GetSourceGeometryPartVertexOffsetAndCounts ( )

◆ GetVertexInstanceMorphNormalDelta()

TVertexInstanceAttributesRef< FVector3f > FSkeletalMeshAttributes::GetVertexInstanceMorphNormalDelta ( const FName  InMorphTargetName)

Returns a writable vertex instance normal delta attribute for the given morph target. The delta is the difference between the normal vector of the mesh and the normal vector of the desired morphed mesh. Adding this value to the normal vector of the mesh will return the morph's normal vector for this vertex instance. If the morph was not registered to include normals, this will return an invalid attribute.

◆ GetVertexMorphPositionDelta()

TVertexAttributesRef< FVector3f > FSkeletalMeshAttributes::GetVertexMorphPositionDelta ( const FName  InMorphTargetName)

Returns a writable vertex position delta attribute for the given morph target. The delta is the difference between the point position of the mesh and the point position of the morphed mesh. Adding this value to the point position of the mesh will return the morph point position.

◆ GetVertexSkinWeights()

FSkinWeightsVertexAttributesRef FSkeletalMeshAttributes::GetVertexSkinWeights ( const FName  InProfileName = NAME_None)

Returns the skin weight profile given by its name. NAME_None corresponds to the default profile.

◆ GetVertexSkinWeightsFromAttributeName()

FSkinWeightsVertexAttributesRef FSkeletalMeshAttributes::GetVertexSkinWeightsFromAttributeName ( const FName  InAttributeName = NAME_None)

◆ IsReservedAttributeName()

static bool FSkeletalMeshAttributes::IsReservedAttributeName ( const FName  InAttributeName)
inlinestatic

Returns true if a given attribute name is a name for a reserved attribute or not. If not a reserved attribute, it's one that has been user-defined and is not required by any system.

◆ Register()

void FSkeletalMeshAttributes::Register ( bool  bKeepExistingAttribute = false)
overridevirtual

Reimplemented from FStaticMeshAttributes.

◆ RegisterColorAttribute()

void FSkeletalMeshAttributes::RegisterColorAttribute ( )

Register an optional color attribute for bones

◆ RegisterImportPointIndexAttribute()

bool FSkeletalMeshAttributes::RegisterImportPointIndexAttribute ( )

Register an attribute that can be used to maintain a relationship between a given vertex and the point it originated from on the original imported mesh. This can be useful when trying to match the stored mesh to the import mesh as stored in the import file (e.g. FBX, Alembic, glTF, etc).

◆ RegisterMorphTargetAttribute()

bool FSkeletalMeshAttributes::RegisterMorphTargetAttribute ( const FName  InMorphTargetName,
const bool  bIncludeNormals 
)

Register a new morph target with the given name. The attribute name will encode the user-defined morph target name and it will be listed in GetMorphTargetNames(). Returns true if the morph target was successfully registered. Returns false if the attribute was already registered or if InMorphTargetName is empty. The position delta is stored as a vertex attributes, and the optional normal is stored as a vertex instance attribute to allow for hard edges on morph targets.

Parameters
InMorphTargetNameThe name of the morph target to add. Cannot be empty.
bIncludeNormalsSet to true if per-vertex instance normals (Z-tangent) should be included. Otherwise the normals will be automatically computed and only the position delta vertex attribute registered.

◆ RegisterSkinWeightAttribute()

bool FSkeletalMeshAttributes::RegisterSkinWeightAttribute ( const FName  InProfileName)

Register a new skin weight profile with the given name. The attribute name will encode the profile name and it will be listed in GetSkinWeightProfileNames(). Returns true if the profile was successfully registered. Returns false if the attribute was already registered or if IsValidSkinWeightProfileName() returned false.

◆ RegisterSourceGeometryPartsAttributes()

void FSkeletalMeshAttributes::RegisterSourceGeometryPartsAttributes ( )

This will register the source geometry attributes and their element container on the mesh description so that source geometry part information can be stored.

◆ ReserveNewBones()

void FSkeletalMeshAttributes::ReserveNewBones ( const int  InNumBones)

Reserves space for this number of new bones

◆ SourceGeometryPartAttributes()

TAttributesSet< FSourceGeometryPartID > & FSkeletalMeshAttributes::SourceGeometryPartAttributes ( )

◆ SourceGeometryParts()

FSkeletalMeshAttributesShared::FSourceGeometryPartArray & FSkeletalMeshAttributes::SourceGeometryParts ( )

◆ UnregisterImportPointIndexAttribute()

void FSkeletalMeshAttributes::UnregisterImportPointIndexAttribute ( )

Convenience function to unregister the attribute that maintains the relationship between a given vertex and the originating point on the import mesh. Use if updating the mesh description but no longer maintaining this relationship (e.g. the topology changed and so this map cannot possibly be accurate).

◆ UnregisterMorphTargetAttribute()

bool FSkeletalMeshAttributes::UnregisterMorphTargetAttribute ( const FName  InMorphTargetName)

Unregister an existing morph target with the given name (as returned by GetMorphTargetNames()). Returns true if the morph target was successfully unregistered. Returns false if the attribute wasn't registered or if InMorphTargetName is empty.

◆ UnregisterSkinWeightAttribute()

bool FSkeletalMeshAttributes::UnregisterSkinWeightAttribute ( const FName  InProfileName)

Unregister an existing skin weight profile with the given name Returns true if theprofile was successfully unregistered. Returns false if the attribute wasn't registered or if InProfileName is empty.


The documentation for this class was generated from the following files: