Sequencer.DrawMeshTrails
Sequencer.DrawMeshTrails
#Overview
name: Sequencer.DrawMeshTrails
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Toggle to show or hide Level Sequence VR Editor trails
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Sequencer.DrawMeshTrails is to control the visibility of Level Sequence VR Editor trails in the Unreal Engine Sequencer. This setting variable is primarily used in the Sequencer module, which is part of the Unreal Engine’s editor functionality.
This setting variable is referenced in the Sequencer Editor Mode (SequencerEdMode.cpp), which suggests that it’s specifically used for editor-time visualization and not for runtime gameplay. The Sequencer subsystem, which is responsible for creating and editing cinematic sequences, relies on this variable to determine whether to display mesh trails or not.
The value of this variable is set as a console variable (CVarDrawMeshTrails) with a default value of true. It can be changed at runtime through the console or programmatically.
There is an associated variable named CVarDrawMeshTrails that directly interacts with Sequencer.DrawMeshTrails. They share the same value and purpose. The CVarDrawMeshTrails is used to initialize a member variable (bDrawMeshTrails) in the FSequencerEdMode class and set up a callback to update this member variable when the console variable changes.
Developers should be aware that:
- This variable affects editor visualization only and doesn’t impact runtime performance or behavior.
- Changing this variable will immediately affect the visibility of mesh trails in the Sequencer.
- The variable is specifically for VR Editor trails, so it may not affect traditional 2D editor views.
Best practices when using this variable include:
- Use it for debugging or fine-tuning the editor experience, especially in VR.
- Be aware of its impact on editor performance, especially with complex sequences or many objects.
- Consider exposing it as a user-configurable option in the Sequencer UI for easier access.
Regarding the associated variable CVarDrawMeshTrails:
This is a TAutoConsoleVariable
Developers should treat CVarDrawMeshTrails as the primary interface for programmatically changing the Sequencer.DrawMeshTrails setting, as it will automatically propagate the changes to the Sequencer editor mode.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/SequencerEdMode.cpp:51
Scope: file
Source code excerpt:
static TAutoConsoleVariable<bool> CVarDrawMeshTrails(
TEXT("Sequencer.DrawMeshTrails"),
true,
TEXT("Toggle to show or hide Level Sequence VR Editor trails"));
//if true still use old motion trails for sequencer objects.
TAutoConsoleVariable<bool> CVarUseOldSequencerMotionTrails(
TEXT("Sequencer.UseOldSequencerTrails"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarDrawMeshTrails
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/SequencerEdMode.cpp:50
Scope: file
Source code excerpt:
const FEditorModeID FSequencerEdMode::EM_SequencerMode(TEXT("EM_SequencerMode"));
static TAutoConsoleVariable<bool> CVarDrawMeshTrails(
TEXT("Sequencer.DrawMeshTrails"),
true,
TEXT("Toggle to show or hide Level Sequence VR Editor trails"));
//if true still use old motion trails for sequencer objects.
TAutoConsoleVariable<bool> CVarUseOldSequencerMotionTrails(
#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/SequencerEdMode.cpp:160
Scope (from outer to inner):
file
function FSequencerEdMode::FSequencerEdMode
Source code excerpt:
SetCurrentTool( SequencerEdModeTool );
bDrawMeshTrails = CVarDrawMeshTrails->GetBool();
CVarDrawMeshTrails.AsVariable()->SetOnChangedCallback(FConsoleVariableDelegate::CreateLambda([this](IConsoleVariable* Var)
{
bDrawMeshTrails = Var->GetBool();
}));
AudioTexture = LoadObject<UTexture2D>(NULL, TEXT("/Engine/EditorResources/AudioIcons/S_AudioComponent.S_AudioComponent"));
check(AudioTexture);
#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/SequencerEdMode.cpp:172
Scope (from outer to inner):
file
function FSequencerEdMode::~FSequencerEdMode
Source code excerpt:
FSequencerEdMode::~FSequencerEdMode()
{
CVarDrawMeshTrails.AsVariable()->SetOnChangedCallback(FConsoleVariableDelegate());
}
void FSequencerEdMode::Enter()
{
bIsTracking = false;;
StartXValue.Reset();