Sequencer.DuplicateLinkedAnimSequence

Sequencer.DuplicateLinkedAnimSequence

#Overview

name: Sequencer.DuplicateLinkedAnimSequence

This variable is created as a Console Variable (cvar).

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:

  1. This variable affects the duplication behavior of level sequences with linked animation sequences.
  2. When set to true, duplicating a level sequence will also duplicate and link any associated animation sequences.
  3. When set to false (default), the original links to animation sequences are preserved without duplication.

Best practices when using this variable include:

  1. Consider the implications of duplicating linked animation sequences, such as increased memory usage and potential for unintended modifications.
  2. Use this setting judiciously, enabling it only when you specifically need to create separate copies of linked animation sequences.
  3. Be aware of this setting when troubleshooting unexpected behavior in duplicated level sequences.

Regarding the associated variable CVarDuplicateLinkedAnimSequence:

#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())
						{