Sequencer.VolatileSequencesInEditor

Sequencer.VolatileSequencesInEditor

#Overview

name: Sequencer.VolatileSequencesInEditor

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.VolatileSequencesInEditor is to control the volatility treatment of assets in the editor environment within the Unreal Engine’s Sequencer system. This setting is specifically designed for use in the editor and affects how sequence assets are handled in terms of their volatility.

This setting variable is primarily used in the MovieScene module, which is a core part of Unreal Engine’s cinematics and animation sequencing system. It’s specifically referenced in the MovieSceneCompiledVolatilityManager, indicating its role in managing the compilation and volatility of movie scenes.

The value of this variable is set through the Unreal Engine’s console variable system. It’s defined as an FAutoConsoleVariableRef, which means it can be adjusted at runtime through console commands or configuration files.

The associated variable GVolatileSequencesInEditor directly interacts with Sequencer.VolatileSequencesInEditor. They share the same value, with GVolatileSequencesInEditor being the actual integer variable that stores the setting’s value.

Developers must be aware that this variable is only effective in the editor environment (#if WITH_EDITOR). It’s used to determine whether all assets should be treated as volatile in the editor. When enabled (non-zero value), it may impact performance metrics, as it causes additional volatility checks.

Best practices when using this variable include:

  1. Keep it enabled (default value of 1) during development for more accurate representation of asset behavior.
  2. Disable it (set to 0) when trying to measure performance that’s more representative of runtime behavior.
  3. Be cautious when changing this value, as it affects all assets in the editor.

Regarding the associated variable GVolatileSequencesInEditor: Its purpose is to store the actual value of the Sequencer.VolatileSequencesInEditor setting. It’s used internally by the engine to determine whether to apply volatile flags to sequences in the editor.

This variable is used in the GetEditorVolatilityFlags function to determine what flags should be applied to sequences in the editor. When GVolatileSequencesInEditor is non-zero, it returns EMovieSceneSequenceFlags::Volatile, otherwise it returns EMovieSceneSequenceFlags::None.

Developers should be aware that changes to GVolatileSequencesInEditor will directly affect how sequences are treated in the editor, potentially impacting performance and behavior of the Sequencer system.

Best practices for GVolatileSequencesInEditor align with those of Sequencer.VolatileSequencesInEditor, as they are effectively the same setting, just accessed through different means within the engine code.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/Compilation/MovieSceneCompiledVolatilityManager.cpp:14

Scope (from outer to inner):

file
namespace    UE
namespace    MovieScene

Source code excerpt:

int32 GVolatileSequencesInEditor = 1;
FAutoConsoleVariableRef CVarVolatileSequencesInEditor(
	TEXT("Sequencer.VolatileSequencesInEditor"),
	GVolatileSequencesInEditor,
	TEXT("(Default: 1) When non-zero, all assets will be treated as volatile in editor. Can be disabled to bypass volatility checks in-editor for more representative runtime performance metrics.\n"),
	ECVF_Default
);

#endif

#Associated Variable and Callsites

This variable is associated with another variable named GVolatileSequencesInEditor. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/Compilation/MovieSceneCompiledVolatilityManager.cpp:12

Scope (from outer to inner):

file
namespace    UE
namespace    MovieScene

Source code excerpt:

#if WITH_EDITOR

int32 GVolatileSequencesInEditor = 1;
FAutoConsoleVariableRef CVarVolatileSequencesInEditor(
	TEXT("Sequencer.VolatileSequencesInEditor"),
	GVolatileSequencesInEditor,
	TEXT("(Default: 1) When non-zero, all assets will be treated as volatile in editor. Can be disabled to bypass volatility checks in-editor for more representative runtime performance metrics.\n"),
	ECVF_Default
);

#endif

#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/Compilation/MovieSceneCompiledVolatilityManager.cpp:26

Scope (from outer to inner):

file
namespace    UE
namespace    MovieScene
function     EMovieSceneSequenceFlags GetEditorVolatilityFlags

Source code excerpt:

{
#if WITH_EDITOR
	return GVolatileSequencesInEditor ? EMovieSceneSequenceFlags::Volatile : EMovieSceneSequenceFlags::None;
#else
	return EMovieSceneSequenceFlags::None;
#endif
}