Sequencer.AutoScrubSpeed

Sequencer.AutoScrubSpeed

#Overview

name: Sequencer.AutoScrubSpeed

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.AutoScrubSpeed is to control the speed of auto-scrubbing in the Unreal Engine Sequencer, which is a part of the cinematics and animation system.

This setting variable is primarily used in the Sequencer module of Unreal Engine, specifically within the Editor subsystem. It directly affects the behavior of the auto-scrubbing feature in the Sequencer tool.

The value of this variable is set as a console variable (CVar) with a default value of 6.0f. It can be modified at runtime through the console or through configuration files.

The Sequencer.AutoScrubSpeed variable interacts closely with another variable called CVarAutoScrubSpeed. They share the same value and are essentially two ways of accessing the same setting. Additionally, it’s used in conjunction with CVarAutoScrubCurveExponent to calculate the auto-scrubbing behavior.

Developers should be aware that this variable directly impacts the user experience when using the auto-scrub feature in the Sequencer. A higher value will result in faster scrubbing, while a lower value will make the scrubbing slower.

Best practices when using this variable include:

  1. Adjusting it based on the specific needs of your project and the length of your sequences.
  2. Considering the relationship between this variable and CVarAutoScrubCurveExponent for smooth scrubbing experiences.
  3. Allowing users (such as animators or cinematics artists) to adjust this value to their preference, possibly through a user-friendly interface.

Regarding the associated variable CVarAutoScrubSpeed:

The purpose of CVarAutoScrubSpeed is identical to Sequencer.AutoScrubSpeed - it controls the speed of auto-scrubbing in the Unreal Engine Sequencer.

This variable is used in the same Sequencer module and affects the same auto-scrubbing feature.

The value of CVarAutoScrubSpeed is set in the same way as Sequencer.AutoScrubSpeed, with a default value of 6.0f.

CVarAutoScrubSpeed interacts directly with Sequencer.AutoScrubSpeed, as they represent the same setting. It’s also used in calculations alongside CVarAutoScrubCurveExponent.

Developers should be aware that modifying CVarAutoScrubSpeed will have the same effect as modifying Sequencer.AutoScrubSpeed. They should choose one consistent way of referencing this setting in their code to avoid confusion.

Best practices for CVarAutoScrubSpeed are the same as for Sequencer.AutoScrubSpeed, as they are essentially the same variable.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Sequencer.cpp:175

Scope: file

Source code excerpt:


static TAutoConsoleVariable<float> CVarAutoScrubSpeed(
	TEXT("Sequencer.AutoScrubSpeed"),
	6.0f,
	TEXT("How fast to scrub forward/backward when auto-scrubbing"));

static TAutoConsoleVariable<float> CVarAutoScrubCurveExponent(
	TEXT("Sequencer.AutoScrubCurveExponent"),
	2.0f,

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Sequencer.cpp:174

Scope: file

Source code excerpt:

	TEXT("Enable/disable auto-scrubbing"));

static TAutoConsoleVariable<float> CVarAutoScrubSpeed(
	TEXT("Sequencer.AutoScrubSpeed"),
	6.0f,
	TEXT("How fast to scrub forward/backward when auto-scrubbing"));

static TAutoConsoleVariable<float> CVarAutoScrubCurveExponent(
	TEXT("Sequencer.AutoScrubCurveExponent"),

#Loc: <Workspace>/Engine/Source/Editor/Sequencer/Private/Sequencer.cpp:976

Scope (from outer to inner):

file
function     void FSequencer::Tick

Source code excerpt:

	if (AutoScrubTarget.IsSet())
	{
		const double ScrubSpeed = CVarAutoScrubSpeed->GetFloat();		// How fast to scrub at peak curve speed
		const double AutoScrubExp = CVarAutoScrubCurveExponent->GetFloat();	// How long to ease in and out.  Bigger numbers allow for longer easing.

		const double SecondsPerFrame = GetFocusedTickResolution().AsInterval() / ScrubSpeed;
		const int32 TotalFrames = FMath::Abs(AutoScrubTarget.GetValue().DestinationTime.GetFrame().Value - AutoScrubTarget.GetValue().SourceTime.GetFrame().Value);
		const double TargetSeconds = (double)TotalFrames * SecondsPerFrame;