Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Animation
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UAnimationAsset
- UBlendSpace
- UAimOffsetBlendSpace
- UBlendSpace1D
- UAimOffsetBlendSpace1D
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Animation/BlendSpace.h |
Include | #include "Animation/BlendSpace.h" |
Syntax
class UBlendSpace :
public UAnimationAsset,
public IInterpolationIndexProvider
Remarks
Allows multiple animations to be blended between based on input parameters
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TObjectPtr< UAnalysisProperties >[3] | AnalysisProperties | Analysis properties for each axis. |
![]() |
float | AnimLength | This is the maximum length of any sample in the blendspace. |
![]() |
TEnumAsByte< EBlendSpaceAxis > | AxisToScaleAnimation | If you have input smoothing, this specifies the axis on which to scale the animation playback speed. |
![]() |
bool | bAllowMeshSpaceBlending | If set then blending is performed in mesh space if there are per-bone sample smoothing overrides. |
![]() |
bool | bContainsRotationOffsetMeshSpaceSamples | Indicates whether any samples have the flag to apply rotation offsets in mesh space |
![]() |
bool | bInterpolateUsingGrid | If true then interpolation is done via a grid at runtime. |
![]() |
FBlendParameter[3] | BlendParameters | Blend Parameters for each axis. |
![]() |
FBlendSpaceData | BlendSpaceData | Container for the runtime data, which could be line segments, triangulation or tetrahedrons |
![]() |
bool | bLoop | The default looping behavior of this blend space. Asset players can override this |
![]() |
bool | bTargetWeightInterpolationEaseInOut | If set then this eases in/out the sample weight adjustments, using the speed to determine how much smoothing to apply. |
![]() |
TObjectPtr< UCachedAnalysisProperties >[3] | CachedAnalysisProperties | Cached properties used to initialize properties when newly created. |
![]() |
TArray< int32 > | DimensionIndices | The order in which to use the dimensions in the data - e.g. [1, 2] means a 2D blend using Y and Z |
![]() |
TArray< struct FEditorElement > | GridSamples | Grid samples, indexing scheme imposed by subclass |
![]() |
FInterpolationParameter[3] | InterpolationParam | Input Smoothing parameters for each input axis |
![]() |
TArray< FPerBoneInterpolation > | ManualPerBoneOverrides | Per bone sample smoothing settings, which affect the specified bone and all its descendants in the skeleton. |
![]() |
TEnumAsByte< ENotifyTriggerMode::Type > | NotifyTriggerMode | The current mode used by the BlendSpace to decide which animation notifies to fire. |
![]() |
EBlendSpacePerBoneBlendMode | PerBoneBlendMode | There are two ways to use per pone sample smoothing: Blend profiles and manually maintaining the per bone overrides. |
![]() |
FBlendSpaceBlendProfile | PerBoneBlendProfile | Reference to a blend profile of the corresponding skeleton to be used for per bone smoothing in case the per bone blend mode is set to use a blend profile. |
![]() |
TArray< FPerBoneInterpolation > | PerBoneBlendValues | Stores the actual bone references and their smoothing interpolation speeds used by the blend space. |
![]() |
EPreferredTriangulationDirection | PreferredTriangulationDirection | Preferred edge direction when the triangulation has to make an arbitrary choice |
![]() |
TObjectPtr< UAnimSequence > | PreviewBasePose | Preview Base pose for additive BlendSpace |
![]() |
FVector[3] | PreviousAxisMinMaxValues | |
![]() |
float[3] | PreviousGridSpacings | |
![]() |
TArray< struct FBlendSample > | SampleData | Sample animation data |
![]() |
int32 | SampleIndexWithMarkers | Track index to get marker data from. |
![]() |
float | TargetWeightInterpolationSpeedPerSec | If greater than zero, this is the speed at which the sample weights are allowed to change. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UBlendSpace
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
int32 | AddSample
(
const FVector& SampleValue |
Add samples |
![]() |
int32 | AddSample
(
UAnimSequence* AnimationSequence, |
Add samples |
![]() ![]() |
bool | ContainsMatchingSamples
(
EAdditiveAnimationType AdditiveType |
Returns whether or not all animation set on the blend space samples match the given additive type |
![]() ![]() |
bool | ||
![]() ![]() |
FVector | ConvertBlendInputToGridSpace
(
const FVector& BlendInput |
Translates BlendInput to grid space |
![]() |
bool | DeleteSample
(
const int32 BlendSampleIndex |
Delete samples |
![]() ![]() |
bool | DoesAnimationMatchExistingSamples
(
const UAnimSequence* AnimationSequence |
Check if the blend spaces contains samples whos additive type match that of the animation sequence |
![]() |
bool | EditSampleValue
(
const int32 BlendSampleIndex, |
Edit samples |
![]() |
void | ExpandRangeForSample
(
const FVector& SampleValue |
|
![]() ![]() |
FVector | FilterInput
(
FBlendFilter* Filter, |
Interpolate BlendInput based on Filter data |
![]() ![]() |
void | ForEachImmutableSample
(
const TFunctionRef< void(const FBlendSample&)> Func |
Allows the user to iterate through all the data samples available in the blend space. |
![]() ![]() |
float | GetAnimationLengthFromSampleData
(
const TArray< FBlendSampleData >& SampleDataList |
Utility function to calculate animation length from sample data list |
![]() ![]() |
void | GetAnimationPose
(
TArray< FBlendSampleData >& BlendSampleDataCache, |
|
![]() ![]() |
void | GetAnimationPose
(
TArray< FBlendSampleData >& BlendSampleDataCache, |
|
![]() ![]() ![]() |
EBlendSpaceAxis | Returns the axis which can be used to scale animation speed. | |
![]() ![]() |
const FBlendParameter & | GetBlendParameter
(
const int32 Index |
Accessor for blend parameter |
![]() ![]() |
const FBlendSample & | GetBlendSample
(
const int32 SampleIndex |
Returns the Blend Sample at the given index, will assert on invalid indices |
![]() ![]() |
const TArray< struct FBlendSample > & | Get this blend spaces sample data | |
![]() ![]() |
const FBlendSpaceData & | Returns the runtime triangulation etc data | |
![]() ![]() |
FVector | GetClampedAndWrappedBlendInput
(
const FVector& BlendInput |
Returns the blend input after clamping and/or wrapping |
![]() ![]() |
FVector | GetClampedBlendInput
(
const FVector& BlendInput |
Returns the blend input clamped to the valid range, unless that axis has been set to wrap in which case no clamping is done |
![]() ![]() |
FVector | GetGridPosition
(
int32 GridIndex |
Returns the sample position associated with the elements returned by GetGridSamples |
![]() ![]() |
FVector | GetGridPosition
(
int32 GridX, |
Returns the sample position associated with the coordinates |
![]() ![]() |
const FEditorElement * | GetGridSampleInternal
(
int32 Index |
Returns the grid element at Index or NULL if Index is not valid |
![]() ![]() |
const TArray< FEditorElement > & | Return GridSamples from this BlendSpace | |
![]() ![]() |
FVector | GetNormalizedBlendInput
(
const FVector& BlendInput |
Translates BlendInput to grid space |
![]() ![]() |
int32 | Get the number of sample points for this blend space | |
![]() ![]() |
void | GetRawSamplesFromBlendInput
(
const FVector& BlendInput, |
Get Grid Samples from BlendInput, From Input, it will populate OutGridSamples with the closest grid points. |
![]() ![]() |
bool | GetSamplesFromBlendInput
(
const FVector& BlendInput, |
Get Grid Samples from BlendInput It will return all samples that has weight > KINDA_SMALL_NUMBER |
![]() ![]() |
void | InitializeFilter
(
FBlendFilter* Filter, |
Initialize BlendSpace filtering for runtime. |
![]() |
void | Initialize Per Bone Blend | |
![]() ![]() |
bool | InterpolateWeightOfSampleData
(
float DeltaTime, |
Utility function to interpolate weight of samples from OldSampleDataList to NewSampleDataList and copy back the interpolated result to FinalSampleDataList |
![]() ![]() |
bool | IsAnimationCompatible
(
const UAnimSequence* AnimationSequence |
Check if the animation sequence additive type is compatible with this blend space |
![]() ![]() |
bool | IsAnimationCompatibleWithSkeleton
(
const UAnimSequence* AnimationSequence |
Check if the animation sequence's skeleton is compatible with this blendspace |
![]() ![]() |
bool | IsSameSamplePoint
(
const FVector& SamplePointA, |
Checks if the given samples points overlap |
![]() ![]() |
bool | IsSampleWithinBounds
(
const FVector& SampleValue |
|
![]() ![]() |
bool | IsTooCloseToExistingSamplePoint
(
const FVector& SampleValue, |
Check if given sample value isn't too close to existing sample point |
![]() ![]() ![]() |
bool | IsValidAdditiveType
(
EAdditiveAnimationType AdditiveType |
Returns whether or not the given additive animation type is compatible with the blendspace type |
![]() ![]() |
bool | IsValidBlendSampleIndex
(
const int32 SampleIndex |
Check whether or not the sample index is valid in combination with the stored sample data |
![]() |
bool | ReplaceSampleAnimation
(
const int32 BlendSampleIndex, |
Update animation on grid sample |
![]() |
void | ResampleData () |
Runs triangulation/segmentation to update our grid and BlendSpaceData structures |
![]() ![]() |
void | ResetToRefPose
(
FCompactPose& OutPose |
Reset to reference pose. It does apply different refpose based on additive or not |
![]() |
void | ||
![]() |
void | SetBlendSpaceData
(
const TArray< FBlendSpaceSegment >& Segments |
Sets up BlendSpaceData based on Line elements |
![]() ![]() |
bool | Check if the the blendspace contains additive samples only | |
![]() ![]() |
void | If around border, snap to the border to avoid empty hole of data that is not valid | |
![]() ![]() |
void | TickFollowerSamples
(
TArray< FBlendSampleData >& SampleDataList, |
Ticks the samples in SampleDataList apart from the HighestWeightIndex one. |
![]() ![]() |
bool | UpdateBlendSamples
(
const FVector& InBlendSpacePosition, |
Updates a cached set of blend samples according to internal parameters, blendspace position and a delta time. |
![]() ![]() |
void | UpdateBlendSpacesUsingAnimSequence
(
UAnimSequenceBase* Sequence |
Validates sample data for blendspaces using the given animation sequence |
![]() ![]() |
void | UpdateFilterParams
(
FBlendFilter* Filter |
Update BlendSpace filtering parameters - values that don't require a full initialization |
![]() |
void | ||
![]() ![]() |
bool | ValidateAnimationSequence
(
const UAnimSequence* AnimationSequence |
Validate that the given animation sequence and contained blendspace data |
![]() |
void | Validates the contained data | |
![]() ![]() |
bool | ValidateSampleValue
(
const FVector& SampleValue, |
Validates supplied blend sample against current contents of blendspace |
Overridden from UAnimationAsset
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | GetAllAnimationSequencesReferred
(
TArray< UAnimationAsset* >& AnimationSequences, |
Retrieve all animations that are used by this asset |
![]() ![]() ![]() |
int32 | ||
![]() ![]() ![]() |
float | This is used in editor only when used for transition getter this doesn't mean max time. | |
![]() ![]() |
TArray< FName > * | Return a list of unique marker names for blending compatibility | |
![]() ![]() ![]() |
bool | Return true if this is valid additive animation false otherwise | |
![]() ![]() |
void | ReplaceReferredAnimations
(
const TMap< UAnimationAsset*, UAnimationAsset* >& ReplacementMap |
Replace this assets references to other animations based on ReplacementMap |
![]() ![]() ![]() |
void | TickAssetPlayer
(
FAnimTickRecord& Instance, |
Advances the asset player instance |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). |
![]() ![]() |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |
![]() ![]() |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
![]() ![]() |
void | PreEditChange
(
FProperty* PropertyAboutToChange |
This is called when a property is about to be modified externally |
![]() ![]() |
void | Handles reading, writing, and reference collecting using FArchive. |
Overridden from IInterpolationIndexProvider
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
TSharedPtr< IInterpolationIndexProvider::FPerBoneInterpolationData > | GetPerBoneInterpolationData
(
const USkeleton* Skeleton |
Sorts the PerBoneBlend data into a form that can be repeatedly used in GetPerBoneInterpolationIndex |
![]() ![]() ![]() |
int32 | GetPerBoneInterpolationIndex
(
const FCompactPoseBoneIndex& InCompactPoseBoneIndex, |
Get PerBoneInterpolationIndex for the input BoneIndex If nothing found, return INDEX_NONE |
Deprecated Variables
Type | Name | Description | |
---|---|---|---|
![]() |
bool | bRotationBlendInMeshSpace_DEPRECATED | This property is deprecated. Please use/see bContainsRotationOffsetMeshSpaceSamples instead |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | GetAnimationPose
(
TArray< FBlendSampleData >& BlendSampleDataCache, |
Use GetAnimationPose with extraction context signature |
![]() ![]() |
void | GetAnimationPose
(
TArray< FBlendSampleData >& BlendSampleDataCache, |
Use GetAnimationPose with other signature |
![]() ![]() |
void | GetAnimationPose
(
TArray< FBlendSampleData >& BlendSampleDataCache, |
Use GetAnimationPose with extraction context signature |
![]() |
bool | UpdateSampleAnimation
(
UAnimSequence* AnimationSequence, |
Please use ReplaceSampleAnimation instead |