RigVM.EnableDrawInterfaceInShipping
RigVM.EnableDrawInterfaceInShipping
#Overview
name: RigVM.EnableDrawInterfaceInShipping
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Set to 1 to enable control rig draw interface in shipping
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of RigVM.EnableDrawInterfaceInShipping is to enable or disable the control rig draw interface in shipping builds of the game. This setting variable is primarily used for debugging and visualization purposes within the RigVM system, which is part of Unreal Engine’s animation and rigging framework.
This setting variable is utilized by the RigVM module, specifically within the RigVMDrawInterface subsystem. The RigVM plugin, which is responsible for executing control rig operations, relies on this setting to determine whether to enable drawing functionality in shipping builds.
The value of this variable is set through a console variable (CVar) named CVarEnableRigVMDrawInterfaceInShipping. It is initialized with a default value of 0, meaning it’s disabled by default in shipping builds. Developers can change this value at runtime using console commands or through configuration files.
The associated variable CVarEnableRigVMDrawInterfaceInShipping directly interacts with RigVM.EnableDrawInterfaceInShipping. They share the same value and purpose.
Developers must be aware that enabling this feature in shipping builds may have performance implications and could potentially expose debugging information to end-users. It should be used cautiously and only when necessary for troubleshooting issues in release versions of the game.
Best practices when using this variable include:
- Keeping it disabled (set to 0) for final shipping builds to maintain optimal performance.
- Only enabling it temporarily for debugging purposes in shipping builds when absolutely necessary.
- Ensuring that any code relying on this setting is properly optimized or conditionally compiled out in shipping builds to minimize performance impact.
Regarding the associated variable CVarEnableRigVMDrawInterfaceInShipping:
- It is a TAutoConsoleVariable
type, which allows for runtime modification of the setting. - The variable is checked in the IsEnabled() function of the FRigVMDrawInterface class, but only in UE_BUILD_TEST configuration.
- Developers should use this variable when they need to programmatically check or modify the draw interface state, especially in test builds.
When working with both variables, developers should ensure consistency between the console variable and any code that might override or cache its value to prevent unexpected behavior in the drawing system.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMCore/RigVMDrawInterface.cpp:6
Scope: file
Source code excerpt:
#include UE_INLINE_GENERATED_CPP_BY_NAME(RigVMDrawInterface)
TAutoConsoleVariable<int32> CVarEnableRigVMDrawInterfaceInShipping(TEXT("RigVM.EnableDrawInterfaceInShipping"), 0, TEXT("Set to 1 to enable control rig draw interface in shipping"));
void FRigVMDrawInterface::DrawInstruction(const FRigVMDrawInstruction& InInstruction)
{
if (!IsEnabled())
{
return;
#Associated Variable and Callsites
This variable is associated with another variable named CVarEnableRigVMDrawInterfaceInShipping
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMCore/RigVMDrawInterface.cpp:6
Scope: file
Source code excerpt:
#include UE_INLINE_GENERATED_CPP_BY_NAME(RigVMDrawInterface)
TAutoConsoleVariable<int32> CVarEnableRigVMDrawInterfaceInShipping(TEXT("RigVM.EnableDrawInterfaceInShipping"), 0, TEXT("Set to 1 to enable control rig draw interface in shipping"));
void FRigVMDrawInterface::DrawInstruction(const FRigVMDrawInstruction& InInstruction)
{
if (!IsEnabled())
{
return;
#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMCore/RigVMDrawInterface.cpp:382
Scope (from outer to inner):
file
function bool FRigVMDrawInterface::IsEnabled
Source code excerpt:
#if UE_BUILD_TEST
bIsEnabled = CVarEnableRigVMDrawInterfaceInShipping.GetValueOnAnyThread() == 1;
#endif
return bIsEnabled;
}