Sequencer.MaterialParameterBlending
Sequencer.MaterialParameterBlending
#Overview
name: Sequencer.MaterialParameterBlending
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
(Default: true) Defines whether material parameter blending should be enabled or not.\n
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Sequencer.MaterialParameterBlending is to control whether material parameter blending should be enabled or not in the Unreal Engine 5 Sequencer system. This setting is primarily used in the material parameter animation system within the Sequencer.
This setting variable is relied upon by the MovieSceneTracks module, specifically within the MovieSceneMaterialParameterSystem. It’s part of the UE::MovieScene namespace, indicating its close integration with the Sequencer functionality.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of true and can be changed at runtime through the console or configuration files.
The associated variable GMaterialParameterBlending directly interacts with Sequencer.MaterialParameterBlending. They share the same value, with GMaterialParameterBlending being the actual boolean variable used in the code logic.
Developers must be aware that this variable affects the behavior of material parameter animations in Sequencer. When enabled (true), it allows for smooth blending between different material parameter values during animation. When disabled (false), it may result in more abrupt changes in material parameters.
Best practices when using this variable include:
- Keeping it enabled (true) for most use cases to ensure smooth animations.
- Only disabling it if there’s a specific need for non-blended material parameter changes.
- Being aware that changing this value at runtime may affect ongoing animations in the Sequencer.
Regarding the associated variable GMaterialParameterBlending:
- Its purpose is to serve as the actual boolean flag used in the code to determine if material parameter blending should occur.
- It’s used directly in the UMovieSceneMaterialParameterInstantiatorSystem::OnRun function to conditionally execute blending logic.
- The value is set through the console variable system and is shared with Sequencer.MaterialParameterBlending.
- Developers should treat GMaterialParameterBlending as the internal representation of the Sequencer.MaterialParameterBlending setting.
- When debugging or profiling material parameter animations, checking the state of GMaterialParameterBlending can provide insight into whether blending is currently enabled or disabled.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneTracks/Private/Systems/MovieSceneMaterialParameterSystem.cpp:23
Scope (from outer to inner):
file
namespace UE::MovieScene
Source code excerpt:
bool GMaterialParameterBlending = true;
FAutoConsoleVariableRef CVarMaterialParameterBlending(
TEXT("Sequencer.MaterialParameterBlending"),
GMaterialParameterBlending,
TEXT("(Default: true) Defines whether material parameter blending should be enabled or not.\n"),
ECVF_Default
);
bool GMaterialParameterEntityLifetimeTracking = false;
#Associated Variable and Callsites
This variable is associated with another variable named GMaterialParameterBlending
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneTracks/Private/Systems/MovieSceneMaterialParameterSystem.cpp:21
Scope (from outer to inner):
file
namespace UE::MovieScene
Source code excerpt:
{
bool GMaterialParameterBlending = true;
FAutoConsoleVariableRef CVarMaterialParameterBlending(
TEXT("Sequencer.MaterialParameterBlending"),
GMaterialParameterBlending,
TEXT("(Default: true) Defines whether material parameter blending should be enabled or not.\n"),
ECVF_Default
);
bool GMaterialParameterEntityLifetimeTracking = false;
FAutoConsoleVariableRef CVarMaterialParameterEntityLifetimeTracking(
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneTracks/Private/Systems/MovieSceneMaterialParameterSystem.cpp:547
Scope (from outer to inner):
file
function void UMovieSceneMaterialParameterInstantiatorSystem::OnRun
Source code excerpt:
FMovieSceneTracksComponentTypes* TracksComponents = FMovieSceneTracksComponentTypes::Get();
if (GMaterialParameterBlending)
{
auto HandleUnlinkedAllocation = [this](const FEntityAllocation* Allocation)
{
this->ScalarParameterTracker.VisitUnlinkedAllocation(Allocation);
this->VectorParameterTracker.VisitUnlinkedAllocation(Allocation);
};