RigVM.StackDetailedLabels
RigVM.StackDetailedLabels
#Overview
name: RigVM.StackDetailedLabels
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Set to true to turn on detailed labels for the execution stack widget
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of RigVM.StackDetailedLabels is to control the display of detailed labels in the execution stack widget of the RigVM system. This setting variable is part of the RigVM (Runtime Virtual Machine) module, which is used for runtime animation and rigging operations in Unreal Engine 5.
The RigVM subsystem, specifically the RigVMEditor module, relies on this setting variable. It is used within the SRigVMExecutionStackView widget, which is responsible for displaying the execution stack of the RigVM.
The value of this variable is set through a console variable (CVar) system. It is initialized with a default value of false, meaning detailed labels are turned off by default.
This variable interacts directly with its associated variable CVarRigVMExecutionStackDetailedLabels. They share the same value and purpose.
Developers must be aware that enabling detailed labels (by setting this variable to true) will provide more information in the execution stack widget, but it may also increase the complexity of the display and potentially impact performance if the stack is large.
Best practices when using this variable include:
- Use it primarily for debugging or when detailed information about the execution stack is necessary.
- Be mindful of performance implications when enabling detailed labels, especially in production builds.
- Consider creating a user-friendly toggle in the editor UI to control this setting, allowing easier access for developers and technical artists.
Regarding the associated variable CVarRigVMExecutionStackDetailedLabels:
The purpose of CVarRigVMExecutionStackDetailedLabels is identical to RigVM.StackDetailedLabels. It is the actual console variable implementation that controls the detailed labels feature in the RigVM execution stack view.
This variable is used directly in the SRigVMExecutionStackView::PopulateStackView function to determine whether to use simple or detailed labels when populating the stack view.
The value of this variable is accessed using the GetValueOnAnyThread() method, which suggests it can be safely read from multiple threads.
Developers should be aware that changes to this variable will immediately affect the display of the execution stack view. It’s a runtime toggle that doesn’t require recompilation or engine restart to take effect.
Best practices for using CVarRigVMExecutionStackDetailedLabels include:
- Use it in conjunction with debugging tools when investigating RigVM execution issues.
- Consider exposing it through a development console or cheat manager for easy toggling during gameplay or editor sessions.
- Be cautious about leaving it enabled in shipping builds, as it may have performance implications.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVMEditor/Private/Widgets/SRigVMExecutionStackView.cpp:20
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "SRigVMExecutionStackView"
TAutoConsoleVariable<bool> CVarRigVMExecutionStackDetailedLabels(TEXT("RigVM.StackDetailedLabels"), false, TEXT("Set to true to turn on detailed labels for the execution stack widget"));
//////////////////////////////////////////////////////////////
/// FRigStackEntry
///////////////////////////////////////////////////////////
FRigStackEntry::FRigStackEntry(int32 InEntryIndex, ERigStackEntry::Type InEntryType, int32 InInstructionIndex, ERigVMOpCode InOpCode, const FString& InLabel, const FRigVMASTProxy& InProxy)
: EntryIndex(InEntryIndex)
#Associated Variable and Callsites
This variable is associated with another variable named CVarRigVMExecutionStackDetailedLabels
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVMEditor/Private/Widgets/SRigVMExecutionStackView.cpp:20
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "SRigVMExecutionStackView"
TAutoConsoleVariable<bool> CVarRigVMExecutionStackDetailedLabels(TEXT("RigVM.StackDetailedLabels"), false, TEXT("Set to true to turn on detailed labels for the execution stack widget"));
//////////////////////////////////////////////////////////////
/// FRigStackEntry
///////////////////////////////////////////////////////////
FRigStackEntry::FRigStackEntry(int32 InEntryIndex, ERigStackEntry::Type InEntryType, int32 InInstructionIndex, ERigVMOpCode InOpCode, const FString& InLabel, const FRigVMASTProxy& InProxy)
: EntryIndex(InEntryIndex)
#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVMEditor/Private/Widgets/SRigVMExecutionStackView.cpp:463
Scope (from outer to inner):
file
function void SRigVMExecutionStackView::PopulateStackView
Source code excerpt:
RootGraphs.AddZeroed(Instructions.Num());
const bool bUseSimpleLabels = !CVarRigVMExecutionStackDetailedLabels.GetValueOnAnyThread();
if(bUseSimpleLabels)
{
for (int32 InstructionIndex = 0; InstructionIndex < Instructions.Num(); InstructionIndex++)
{
URigVMNode* Node = Cast<URigVMNode>(ByteCode.GetSubjectForInstruction(InstructionIndex));