RigVM.UObjectSupport

RigVM.UObjectSupport

#Overview

name: RigVM.UObjectSupport

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 RigVM.UObjectSupport is to control whether the RigVM Compiler allows UObjects. This setting variable is part of the RigVM system, which is a runtime virtual machine for executing rigging and animation logic in Unreal Engine.

The RigVM module, which is a plugin in the Unreal Engine, relies on this setting variable. It’s specifically used in the RigVM Compiler, which is responsible for compiling rigging and animation logic into a format that can be executed by the RigVM.

The value of this variable is set as a console variable (CVar) with a default value of true. It’s defined using the TAutoConsoleVariable template, which allows it to be changed at runtime through console commands or configuration files.

This variable interacts closely with the associated variable CVarRigVMEnableUObjects. They share the same value and purpose.

Developers must be aware that this variable is only effective when the UE_RIGVM_UOBJECT_PROPERTIES_ENABLED macro is defined. If this macro is not defined, UObject support will be disabled regardless of this variable’s value.

Best practices when using this variable include:

  1. Only disable it if you’re certain you don’t need UObject support in your RigVM operations.
  2. Be aware that changing this setting at runtime may have implications for already compiled RigVM code.
  3. Use the SupportsUObjects() function to check if UObject support is enabled, rather than accessing the CVar directly.

Regarding the associated variable CVarRigVMEnableUObjects:

The purpose of CVarRigVMEnableUObjects is identical to RigVM.UObjectSupport. It’s the actual C++ variable that controls whether UObjects are allowed in the RigVM Compiler.

This variable is used in the SupportsUObjects() function of the RigVMCore namespace. This function is likely used throughout the RigVM system to determine whether UObject-related functionality should be enabled.

The value of this variable is set when it’s declared, but as a console variable, it can be changed at runtime.

Developers should be aware that this variable is enclosed in an #if UE_RIGVM_UOBJECT_PROPERTIES_ENABLED preprocessor directive, meaning it will only be compiled if that macro is defined.

Best practices for using CVarRigVMEnableUObjects include:

  1. Use the SupportsUObjects() function instead of accessing this variable directly in most cases.
  2. Be cautious when changing this value at runtime, as it may affect ongoing RigVM operations.
  3. Ensure that any code relying on UObject support in RigVM is also properly guarded with the UE_RIGVM_UOBJECT_PROPERTIES_ENABLED macro.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMModule.cpp:25

Scope: file

Source code excerpt:


#if UE_RIGVM_UOBJECT_PROPERTIES_ENABLED
TAutoConsoleVariable<bool> CVarRigVMEnableUObjects(TEXT("RigVM.UObjectSupport"), true, TEXT("When true the RigVMCompiler will allow UObjects."));
#endif

#if UE_RIGVM_UINTERFACE_PROPERTIES_ENABLED
TAutoConsoleVariable<bool> CVarRigVMEnableUInterfaces(TEXT("RigVM.UInterfaceSupport"), true, TEXT("When true the RigVMCompiler will allow UInterfaces."));
#endif

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMModule.cpp:25

Scope: file

Source code excerpt:


#if UE_RIGVM_UOBJECT_PROPERTIES_ENABLED
TAutoConsoleVariable<bool> CVarRigVMEnableUObjects(TEXT("RigVM.UObjectSupport"), true, TEXT("When true the RigVMCompiler will allow UObjects."));
#endif

#if UE_RIGVM_UINTERFACE_PROPERTIES_ENABLED
TAutoConsoleVariable<bool> CVarRigVMEnableUInterfaces(TEXT("RigVM.UInterfaceSupport"), true, TEXT("When true the RigVMCompiler will allow UInterfaces."));
#endif

#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMModule.cpp:57

Scope (from outer to inner):

file
function     bool RigVMCore::SupportsUObjects

Source code excerpt:

{
#if UE_RIGVM_UOBJECT_PROPERTIES_ENABLED
	return CVarRigVMEnableUObjects.GetValueOnAnyThread();
#else
	return false;
#endif
}

bool RigVMCore::SupportsUInterfaces()