a.KeepNotifyAndCurvesOnAnimationRecord
a.KeepNotifyAndCurvesOnAnimationRecord
#Overview
name: a.KeepNotifyAndCurvesOnAnimationRecord
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
If nonzero we keep anim notifies, curves and sync markers when animation recording, if 0 we discard them before recording.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of a.KeepNotifyAndCurvesOnAnimationRecord is to control whether animation notifies, curves, and sync markers are retained or discarded during animation recording in Unreal Engine 5.
This setting variable is primarily used by the animation system, specifically in the Sequence Recorder module of the Unreal Engine editor.
The value of this variable is set as a console variable using the TAutoConsoleVariable template. It is initialized with a default value of 1, meaning that by default, notifies, curves, and sync markers are kept during animation recording.
The associated variable CVarKeepNotifyAndCurvesOnAnimationRecord directly interacts with a.KeepNotifyAndCurvesOnAnimationRecord. They share the same value and purpose.
Developers must be aware that:
- This variable affects the behavior of animation recording.
- A value of 0 will cause notifies, curves, and sync markers to be discarded before recording.
- Any non-zero value will keep these elements during recording.
Best practices when using this variable include:
- Consider the implications of keeping or discarding notifies, curves, and sync markers on your animation workflow.
- Use it consistently across your project to maintain predictable animation recording behavior.
- Document any custom settings for this variable in your project guidelines to ensure all team members are aware of its state.
Regarding the associated variable CVarKeepNotifyAndCurvesOnAnimationRecord:
The purpose of CVarKeepNotifyAndCurvesOnAnimationRecord is identical to a.KeepNotifyAndCurvesOnAnimationRecord. It is the C++ representation of the console variable.
This variable is used in the AnimationRecorder module of the Unreal Engine editor. Specifically, it’s used in the FAnimationRecorder::StartRecord function to determine whether to keep or remove bone tracks during animation recording.
The value of this variable is set through the console variable system and can be accessed using the GetInt() method.
CVarKeepNotifyAndCurvesOnAnimationRecord directly interacts with a.KeepNotifyAndCurvesOnAnimationRecord, as they represent the same console variable.
Developers should be aware that:
- This variable is used to make decisions in the animation recording process.
- Its value determines whether bone tracks are removed before recording.
Best practices for using this variable include:
- Use the GetInt() method to retrieve its value in C++ code.
- Consider the performance implications of keeping or removing bone tracks in your specific use case.
- Ensure that the usage of this variable aligns with your project’s animation recording requirements.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/SequenceRecorder/Private/AnimationRecorder.cpp:29
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarKeepNotifyAndCurvesOnAnimationRecord(
TEXT("a.KeepNotifyAndCurvesOnAnimationRecord"),
1,
TEXT("If nonzero we keep anim notifies, curves and sync markers when animation recording, if 0 we discard them before recording."),
ECVF_Default);
/////////////////////////////////////////////////////
#Associated Variable and Callsites
This variable is associated with another variable named CVarKeepNotifyAndCurvesOnAnimationRecord
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Editor/SequenceRecorder/Private/AnimationRecorder.cpp:28
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarKeepNotifyAndCurvesOnAnimationRecord(
TEXT("a.KeepNotifyAndCurvesOnAnimationRecord"),
1,
TEXT("If nonzero we keep anim notifies, curves and sync markers when animation recording, if 0 we discard them before recording."),
ECVF_Default);
/////////////////////////////////////////////////////
#Loc: <Workspace>/Engine/Source/Editor/SequenceRecorder/Private/AnimationRecorder.cpp:259
Scope (from outer to inner):
file
function void FAnimationRecorder::StartRecord
Source code excerpt:
Controller.InitializeModel();
const bool bKeepNotifiesAndCurves = CVarKeepNotifyAndCurvesOnAnimationRecord->GetInt() == 0 ? false : true;
if (bKeepNotifiesAndCurves)
{
Controller.RemoveAllBoneTracks(bTransactRecording);
}
else
{