Navigation
API > API/Plugins > API/Plugins/UAFAnimGraph
Trait Template A trait template represents a specific trait within a FNodeTemplate.
| Name | FTraitTemplate |
| Type | struct |
| Header File | /Engine/Plugins/Experimental/UAF/UAFAnimGraph/Source/UAFAnimGraph/Public/TraitCore/TraitTemplate.h |
| Include Path | #include "TraitCore/TraitTemplate.h" |
Syntax
struct FTraitTemplate
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTraitTemplate
(
FTraitUID InUID, |
TraitCore/TraitTemplate.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Mode | uint8 | Trait mode (we only need 1 bit, we could store other flags here) | TraitCore/TraitTemplate.h | |
| NodeInstanceOffset | uint16 | TraitCore/TraitTemplate.h | ||
| NodeSharedLatentPropertyHandlesOffset | uint16 | TraitCore/TraitTemplate.h | ||
| NodeSharedOffset | uint16 | Offsets into the shared read-only and instance data portions of a node These are not serialized, | TraitCore/TraitTemplate.h | |
| NumLatentProperties | uint16 | For each latent property defined on a trait, we store a handle in the per node shared data These handles specify various metadata of the latent property: RigVM memory handle index, whether the property can freeze, instance data offset The handles of each trait that lives on a sub-stack (base + additives) are stored contiguously The base trait has the root handle offset and the total number as well as its local number of latent properties Each additive trait has a handle offset that points into that contiguous list and its local number of latent properties How many latent properties are defined on this trait (cached value of FTrait::GetNumLatentPropreties to avoid repeated lookups) Not serialized, | TraitCore/TraitTemplate.h | |
| NumSubStackLatentProperties | uint16 | How many latent properties are defined on this trait sub-stack (stored on base trait only) Not serialized, | TraitCore/TraitTemplate.h | |
| Padding0 | uint16 | TraitCore/TraitTemplate.h | ||
| RegistryHandle | FTraitRegistryHandle | Cached trait registry handle (16 bits) | TraitCore/TraitTemplate.h | |
| TraitIndexOrNumTraits | uint8 | For base traits, this contains the number of traits on our sub-stack For additive traits, this contains the trait index relative to the base trait The first additive trait has index 1, there is no index 0 (we re-purpose the value for the base trait) | TraitCore/TraitTemplate.h | |
| UID | FTraitUIDRaw | Trait globally unique identifier (32 bits) | TraitCore/TraitTemplate.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ETraitMode GetMode() |
Returns the trait mode. | TraitCore/TraitTemplate.h | |
uint32 GetNodeInstanceOffset() |
Returns the offset into the instance data where the descriptor begins, relative to the root of the node's instance data. | TraitCore/TraitTemplate.h | |
uint32 GetNodeSharedLatentPropertyHandlesOffset() |
Returns the offset into the shared data where the latent property handles begin, relative to the root of the node's shared data The base trait has an instance of FLatentPropertiesHeader preceding its latent handles of type FLatentPropertyHandle Additive traits just have a list of FLatentPropertyHandle Note that the offset might not be zero even if no latent properties live on this trait | TraitCore/TraitTemplate.h | |
uint32 GetNodeSharedOffset() |
Returns the offset into the shared data where the descriptor begins, relative to the root of the node's shared data. | TraitCore/TraitTemplate.h | |
uint32 GetNumLatentPropreties() |
Returns the number of latent properties on this trait. | TraitCore/TraitTemplate.h | |
uint32 GetNumStackTraits() |
For base traits only, returns the number of traits on the sub-stack. | TraitCore/TraitTemplate.h | |
uint32 GetNumSubStackLatentPropreties() |
Returns the number of latent properties on the trait sub-stack Only available on the base trait of the sub-stack | TraitCore/TraitTemplate.h | |
FTraitRegistryHandle GetRegistryHandle() |
Returns the trait registry handle. | TraitCore/TraitTemplate.h | |
FAnimNextTraitSharedData * GetTraitDescription
(
FNodeDescription& NodeDescription |
Returns a pointer to the specified trait description on the current node. | TraitCore/TraitTemplate.h | |
const FAnimNextTraitSharedData * GetTraitDescription
(
const FNodeDescription& NodeDescription |
Returns a pointer to the specified trait description on the current node. | TraitCore/TraitTemplate.h | |
uint32 GetTraitIndex() |
Returns the trait index relative to the base trait on the sub-stack. | TraitCore/TraitTemplate.h | |
const FTraitInstanceData * GetTraitInstance
(
const FNodeInstance& NodeInstance |
Returns a pointer to the specified trait instance on the current node. | TraitCore/TraitTemplate.h | |
FTraitInstanceData * GetTraitInstance
(
FNodeInstance& NodeInstance |
Returns a pointer to the specified trait instance on the current node. | TraitCore/TraitTemplate.h | |
const FLatentPropertiesHeader & GetTraitLatentPropertiesHeader
(
const FNodeDescription& NodeDescription |
Returns a reference to the specified trait latent properties header on the current node. | TraitCore/TraitTemplate.h | |
FLatentPropertiesHeader & GetTraitLatentPropertiesHeader
(
FNodeDescription& NodeDescription |
Returns a reference to the specified trait latent properties header on the current node. | TraitCore/TraitTemplate.h | |
const FLatentPropertyHandle * GetTraitLatentPropertyHandles
(
const FNodeDescription& NodeDescription |
Returns a pointer to the specified trait latent property handles on the current node WARNING: Latent property handles are in the order defined by the enumerator macro within the shared data, | TraitCore/TraitTemplate.h | |
FLatentPropertyHandle * GetTraitLatentPropertyHandles
(
FNodeDescription& NodeDescription |
Returns a pointer to the specified trait latent property handles on the current node WARNING: Latent property handles are in the order defined by the enumerator macro within the shared data, | TraitCore/TraitTemplate.h | |
FTraitUID GetUID() |
Returns the globally unique identifier for the trait. | TraitCore/TraitTemplate.h | |
bool HasLatentProperties() |
Returns whether or not we have latent properties on this trait. | TraitCore/TraitTemplate.h | |
bool IsValid() |
Returns whether or not this trait template is valid A trait template is invalid if the trait implementation hasn't been registered | TraitCore/TraitTemplate.h | |
void Serialize
(
FArchive& Ar |
Serializes this trait template instance. | TraitCore/TraitTemplate.h |