Sequencer.IgnoreDependenciesWhenNotThreading
Sequencer.IgnoreDependenciesWhenNotThreading
#Overview
name: Sequencer.IgnoreDependenciesWhenNotThreading
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
(Default: true) Whether to ignore task dependencies when there is no threading.
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Sequencer.IgnoreDependenciesWhenNotThreading is to control whether task dependencies are ignored when there is no threading in the Unreal Engine’s Sequencer system.
This setting variable is primarily used in the MovieScene module, which is a core part of Unreal Engine’s cinematics and animation sequencing system. Based on the callsites, it’s specifically utilized in the entity system of MovieScene, which likely handles the organization and execution of various tasks within a sequence.
The value of this variable is set through a console variable (cvar) system, as evidenced by the FAutoConsoleVariableRef. It’s initialized with a default value of true, meaning by default, task dependencies are ignored when not threading.
The associated variable GIgnoreDependenciesWhenNotThreading interacts directly with Sequencer.IgnoreDependenciesWhenNotThreading. They share the same value, with GIgnoreDependenciesWhenNotThreading being the actual boolean variable used in the code logic.
Developers must be aware that this variable significantly affects the behavior of task dependencies in non-threaded scenarios. When set to true, it causes several functions to early-return, potentially skipping important dependency management steps.
Best practices when using this variable include:
- Carefully consider the implications of ignoring dependencies, even in non-threaded scenarios.
- Test thoroughly with both true and false settings to ensure correct behavior in all cases.
- Be aware that changing this setting could impact performance and correctness of sequencer operations.
Regarding GIgnoreDependenciesWhenNotThreading: This is the actual boolean variable used in the code logic. It’s used in several functions within the FSystemSubsequentTasks class to determine whether to proceed with dependency-related operations when not threading. When true and not threading, these functions will early-return, effectively ignoring the dependency management that would otherwise occur. This variable provides a way to optimize performance in non-threaded scenarios by skipping potentially unnecessary dependency checks, but it should be used cautiously as it could lead to unexpected behavior if dependencies are actually needed even in non-threaded cases.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/EntitySystem/MovieSceneSystemTaskDependencies.cpp:16
Scope (from outer to inner):
file
namespace UE
namespace MovieScene
Source code excerpt:
bool GIgnoreDependenciesWhenNotThreading = true;
FAutoConsoleVariableRef CVarIgnoreDependenciesWhenNotThreading(
TEXT("Sequencer.IgnoreDependenciesWhenNotThreading"),
GIgnoreDependenciesWhenNotThreading,
TEXT("(Default: true) Whether to ignore task dependencies when there is no threading.")
);
void FSystemTaskPrerequisites::FilterByComponent(FGraphEventArray& OutArray, std::initializer_list<FComponentTypeID> ComponentTypes) const
#Associated Variable and Callsites
This variable is associated with another variable named GIgnoreDependenciesWhenNotThreading
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/EntitySystem/MovieSceneSystemTaskDependencies.cpp:14
Scope (from outer to inner):
file
namespace UE
namespace MovieScene
Source code excerpt:
bool GIgnoreDependenciesWhenNotThreading = true;
FAutoConsoleVariableRef CVarIgnoreDependenciesWhenNotThreading(
TEXT("Sequencer.IgnoreDependenciesWhenNotThreading"),
GIgnoreDependenciesWhenNotThreading,
TEXT("(Default: true) Whether to ignore task dependencies when there is no threading.")
);
void FSystemTaskPrerequisites::FilterByComponent(FGraphEventArray& OutArray, std::initializer_list<FComponentTypeID> ComponentTypes) const
{
#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/EntitySystem/MovieSceneSystemTaskDependencies.cpp:54
Scope (from outer to inner):
file
namespace UE
namespace MovieScene
function void FSystemSubsequentTasks::ResetNode
Source code excerpt:
void FSystemSubsequentTasks::ResetNode(uint16 InNodeID)
{
if (ThreadingModel == EEntityThreadingModel::NoThreading && GIgnoreDependenciesWhenNotThreading)
{
return;
}
Subsequents = Graph->Nodes.Array[InNodeID].SubsequentTasks;
#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/EntitySystem/MovieSceneSystemTaskDependencies.cpp:71
Scope (from outer to inner):
file
namespace UE
namespace MovieScene
function void FSystemSubsequentTasks::AddRootTask
Source code excerpt:
void FSystemSubsequentTasks::AddRootTask(FGraphEventRef RootTask)
{
if (ThreadingModel == EEntityThreadingModel::NoThreading && GIgnoreDependenciesWhenNotThreading)
{
return;
}
SCOPE_CYCLE_COUNTER(MovieSceneEval_SystemDependencyCost)
if (RootTask)
#Loc: <Workspace>/Engine/Source/Runtime/MovieScene/Private/EntitySystem/MovieSceneSystemTaskDependencies.cpp:92
Scope (from outer to inner):
file
namespace UE
namespace MovieScene
function void FSystemSubsequentTasks::AddComponentTask
Source code excerpt:
void FSystemSubsequentTasks::AddComponentTask(UE::MovieScene::FComponentTypeID ComponentType, FGraphEventRef ComponentTask)
{
if (ThreadingModel == EEntityThreadingModel::NoThreading && GIgnoreDependenciesWhenNotThreading)
{
return;
}
SCOPE_CYCLE_COUNTER(MovieSceneEval_SystemDependencyCost)