UAnimInstance::AddCurveValue
#include "Animation/AnimInstance.h"
Access: public
Description
Adds a float curve value for this frame, keyed by name, optionally flagging it to also drive a morph target and/or material parameter.
Caveats & Gotchas
- • There are two older overloads keyed by SmartName::UID_Type or FSmartNameMapping that are deprecated since 5.3 and now no-ops (empty bodies) — always use this FName-based overload.
- • If a curve with the same name was already added this frame, the values combine (the internal curve buffer adds rather than overwrites), so calling this twice for the same curve name in one frame does not simply replace the value.
Signature
void AddCurveValue(const FName& CurveName, float Value, bool bMorphtarget = false, bool bMaterial = false) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| CurveName | const FName& | Name of the curve to add or update. | — |
| Value | float | The value to add for this curve on the current frame. | — |
| bMorphtarget | bool | Whether this curve should also drive a morph target of the same name. | false |
| bMaterial | bool | Whether this curve should also drive a material parameter of the same name. | false |
Return Type
void Example
Drive a morph target curve from code C++
AnimInstance->AddCurveValue(TEXT("Blink_L"), 1.0f, /*bMorphtarget=*/true); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?