Sequencer.StartTransformOffsetInBoneSpace
Sequencer.StartTransformOffsetInBoneSpace
#Overview
name: Sequencer.StartTransformOffsetInBoneSpace
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
When true we offset the start offsets for skeletal animation matching in bone space, if false we do it in root space, by default true
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Sequencer.StartTransformOffsetInBoneSpace is to control how start offsets for skeletal animation matching are applied in Unreal Engine’s Sequencer system. Specifically, it determines whether these offsets are applied in bone space or root space.
This setting variable is primarily used in the MovieSceneTracks module, which is part of Unreal Engine’s Sequencer system. It’s particularly relevant to the skeletal animation functionality within Sequencer.
The value of this variable is set using a console variable (CVar) named CVarStartTransformOffsetInBoneSpace. It’s defined as a TAutoConsoleVariable with a default value of true.
The associated variable CVarStartTransformOffsetInBoneSpace directly interacts with this setting. They share the same value and purpose.
Developers must be aware that:
- This setting affects the behavior of skeletal animation matching in Sequencer.
- When true (default), offsets are applied in bone space; when false, they’re applied in root space.
- Changing this value can impact the visual results of skeletal animations in Sequencer.
Best practices when using this variable include:
- Understanding the difference between bone space and root space transformations in the context of skeletal animations.
- Testing animations with both true and false settings to ensure desired results across different scenarios.
- Documenting any project-specific preferences or requirements regarding this setting.
Regarding the associated variable CVarStartTransformOffsetInBoneSpace:
- It’s the actual console variable that controls the Sequencer.StartTransformOffsetInBoneSpace setting.
- It’s defined as a boolean TAutoConsoleVariable, allowing runtime modification.
- It’s used in the GetRootMotionTransform function of the UMovieSceneSkeletalAnimationSection class to determine the transformation behavior.
- Developers can access its value using the GetValueOnGameThread() method, which retrieves the current setting at runtime.
When working with this variable, developers should consider the performance implications of frequently querying its value and potentially cache the result if used in performance-critical sections of code.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneTracks/Private/Sections/MovieSceneSkeletalAnimationSection.cpp:21
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "MovieSceneSkeletalAnimationSection"
TAutoConsoleVariable<bool> CVarStartTransformOffsetInBoneSpace(TEXT("Sequencer.StartTransformOffsetInBoneSpace"), true,
TEXT("When true we offset the start offsets for skeletal animation matching in bone space, if false we do it in root space, by default true"));
namespace
{
FName DefaultSlotName( "DefaultSlot" );
#Associated Variable and Callsites
This variable is associated with another variable named CVarStartTransformOffsetInBoneSpace
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneTracks/Private/Sections/MovieSceneSkeletalAnimationSection.cpp:21
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "MovieSceneSkeletalAnimationSection"
TAutoConsoleVariable<bool> CVarStartTransformOffsetInBoneSpace(TEXT("Sequencer.StartTransformOffsetInBoneSpace"), true,
TEXT("When true we offset the start offsets for skeletal animation matching in bone space, if false we do it in root space, by default true"));
namespace
{
FName DefaultSlotName( "DefaultSlot" );
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneTracks/Private/Sections/MovieSceneSkeletalAnimationSection.cpp:700
Scope (from outer to inner):
file
function bool UMovieSceneSkeletalAnimationSection::GetRootMotionTransform
Source code excerpt:
if (!InOutParams.bOutIsAdditive)
{
const bool bStartTransformOffsetInBoneSpace = CVarStartTransformOffsetInBoneSpace.GetValueOnGameThread();
if (bStartTransformOffsetInBoneSpace)
{
FTransform StartMatchedInRoot = StartBoneTransform * MatchedTransform;
FTransform LocalToRoot = (InOutParams.OutPoseTransform * StartBoneTransform.Inverse());
FTransform OffsetInLocalSpace = LocalToRoot * OffsetTransform;
InOutParams.OutTransform = OffsetInLocalSpace * StartMatchedInRoot;