Sequencer.DuplicateLinkedAnimSequence
Sequencer.DuplicateLinkedAnimSequence
#Overview
name: Sequencer.DuplicateLinkedAnimSequence
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
When true when we duplicate a level sequence that has a linked anim sequence it will duplicate and link the anim sequencel, if false we leave any link alone.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Sequencer.DuplicateLinkedAnimSequence is to control the behavior of duplicating linked animation sequences when duplicating a level sequence in Unreal Engine’s Sequencer tool.
This setting variable is primarily used in the MovieSceneTools module, which is part of the Sequencer subsystem in Unreal Engine. The Sequencer is a powerful tool for creating and editing cinematic sequences and gameplay elements.
The value of this variable is set as a console variable using TAutoConsoleVariable. It is initialized with a default value of false, meaning that by default, linked animation sequences are not duplicated when duplicating a level sequence.
The associated variable CVarDuplicateLinkedAnimSequence interacts directly with Sequencer.DuplicateLinkedAnimSequence. They share the same value and purpose.
Developers must be aware that:
- This variable affects the duplication behavior of level sequences with linked animation sequences.
- When set to true, duplicating a level sequence will also duplicate and link any associated animation sequences.
- When set to false (default), the original links to animation sequences are preserved without duplication.
Best practices when using this variable include:
- Consider the implications of duplicating linked animation sequences, such as increased memory usage and potential for unintended modifications.
- Use this setting judiciously, enabling it only when you specifically need to create separate copies of linked animation sequences.
- Be aware of this setting when troubleshooting unexpected behavior in duplicated level sequences.
Regarding the associated variable CVarDuplicateLinkedAnimSequence:
- It is the actual console variable that stores and provides access to the Sequencer.DuplicateLinkedAnimSequence setting.
- It is used in the PostDuplicateEvent function of the FMovieSceneToolsModule to determine whether to duplicate linked animation sequences.
- Developers can access its value using CVarDuplicateLinkedAnimSequence.GetValueOnGameThread() when needed in code.
- The same considerations and best practices apply to this variable as to Sequencer.DuplicateLinkedAnimSequence.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/MovieSceneTools/Private/MovieSceneToolsModule.cpp:120
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "FMovieSceneToolsModule"
TAutoConsoleVariable<bool> CVarDuplicateLinkedAnimSequence(TEXT("Sequencer.DuplicateLinkedAnimSequence"), false, TEXT("When true when we duplicate a level sequence that has a linked anim sequence it will duplicate and link the anim sequencel, if false we leave any link alone."));
#if !IS_MONOLITHIC
UE::MovieScene::FEntityManager*& GEntityManagerForDebugging = UE::MovieScene::GEntityManagerForDebuggingVisualizers;
#endif
void FMovieSceneToolsModule::StartupModule()
#Associated Variable and Callsites
This variable is associated with another variable named CVarDuplicateLinkedAnimSequence
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Editor/MovieSceneTools/Private/MovieSceneToolsModule.cpp:120
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "FMovieSceneToolsModule"
TAutoConsoleVariable<bool> CVarDuplicateLinkedAnimSequence(TEXT("Sequencer.DuplicateLinkedAnimSequence"), false, TEXT("When true when we duplicate a level sequence that has a linked anim sequence it will duplicate and link the anim sequencel, if false we leave any link alone."));
#if !IS_MONOLITHIC
UE::MovieScene::FEntityManager*& GEntityManagerForDebugging = UE::MovieScene::GEntityManagerForDebuggingVisualizers;
#endif
void FMovieSceneToolsModule::StartupModule()
#Loc: <Workspace>/Engine/Source/Editor/MovieSceneTools/Private/MovieSceneToolsModule.cpp:404
Scope (from outer to inner):
file
function void FMovieSceneToolsModule::PostDuplicateEvent
Source code excerpt:
if (LevelAnimLink)
{
const bool bDuplicateAnimSequence = CVarDuplicateLinkedAnimSequence.GetValueOnGameThread();
if (bDuplicateAnimSequence)
{
for (FLevelSequenceAnimSequenceLinkItem& Item : LevelAnimLink->AnimSequenceLinks)
{
if (UAnimSequence* AnimSequence = Item.ResolveAnimSequence())
{