Sequencer.MaterialParameterBlending

Sequencer.MaterialParameterBlending

#Overview

name: Sequencer.MaterialParameterBlending

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.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:

  1. Keeping it enabled (true) for most use cases to ensure smooth animations.
  2. Only disabling it if there’s a specific need for non-blended material parameter changes.
  3. Being aware that changing this value at runtime may affect ongoing animations in the Sequencer.

Regarding the associated variable GMaterialParameterBlending:

#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);
		};