au.MetaSound.EnableAllVersionsNodeClassCreation
au.MetaSound.EnableAllVersionsNodeClassCreation
#Overview
name: au.MetaSound.EnableAllVersionsNodeClassCreation
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enable creating nodes for major versions of deprecated MetaSound classes in the Editor.\n0: Disabled (default), !0: Enabled
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of au.MetaSound.EnableAllVersionsNodeClassCreation
is to control the creation of nodes for major versions of deprecated MetaSound classes in the Unreal Engine Editor.
This setting variable is primarily used in the MetaSound plugin, which is part of Unreal Engine’s audio system. Specifically, it’s used in the MetaSound Editor module, which is responsible for the graphical editing of MetaSound assets.
The value of this variable is set through the Unreal Engine console variable system. It’s initialized to 0 (disabled) by default, but can be changed at runtime using console commands or configuration files.
This variable interacts directly with EnableAllVersionsMetaSoundNodeClassCreationCVar
, which is an integer variable that stores the actual value. The console variable au.MetaSound.EnableAllVersionsNodeClassCreation
is linked to this integer variable using FAutoConsoleVariableRef
.
Developers must be aware that enabling this variable (setting it to a non-zero value) will allow the creation of nodes for major versions of deprecated MetaSound classes in the Editor. This could potentially lead to the use of outdated or deprecated functionality, which might not be supported in future versions of the engine.
Best practices when using this variable include:
- Keeping it disabled (0) in production builds to ensure only current, supported node classes are used.
- Only enabling it when specifically working with or migrating older MetaSound assets.
- Being cautious when enabling it, as it may introduce deprecated functionality into new projects.
Regarding the associated variable EnableAllVersionsMetaSoundNodeClassCreationCVar
:
This is an integer variable that directly stores the state of whether all versions of MetaSound node classes should be created. It’s used in the MetaSound Editor module to determine whether to include all versions of classes when searching for and creating nodes.
The variable is used in two main functions:
GetConversionActions
: This function uses the variable to determine whether to include all versions of classes when finding classes for conversion actions.GetFunctionActions
: This function also uses the variable to determine whether to include all versions of classes when finding classes for function actions.
In both cases, the variable is cast to a boolean and passed to the FindAllClasses
function of the MetaSound search engine.
Developers should be aware that changes to this variable will directly affect the behavior of the MetaSound Editor, potentially exposing deprecated functionality. It should be used with caution and typically only modified through the associated console variable for consistency and clarity in the codebase.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorGraphSchema.cpp:52
Scope: file
Source code excerpt:
static int32 EnableAllVersionsMetaSoundNodeClassCreationCVar = 0;
FAutoConsoleVariableRef CVarEnableAllVersionsMetaSoundNodeClassCreation(
TEXT("au.MetaSound.EnableAllVersionsNodeClassCreation"),
EnableAllVersionsMetaSoundNodeClassCreationCVar,
TEXT("Enable creating nodes for major versions of deprecated MetaSound classes in the Editor.\n")
TEXT("0: Disabled (default), !0: Enabled"),
ECVF_Default);
namespace Metasound
#Associated Variable and Callsites
This variable is associated with another variable named EnableAllVersionsMetaSoundNodeClassCreationCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorGraphSchema.cpp:50
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "MetaSoundEditor"
static int32 EnableAllVersionsMetaSoundNodeClassCreationCVar = 0;
FAutoConsoleVariableRef CVarEnableAllVersionsMetaSoundNodeClassCreation(
TEXT("au.MetaSound.EnableAllVersionsNodeClassCreation"),
EnableAllVersionsMetaSoundNodeClassCreationCVar,
TEXT("Enable creating nodes for major versions of deprecated MetaSound classes in the Editor.\n")
TEXT("0: Disabled (default), !0: Enabled"),
ECVF_Default);
namespace Metasound
{
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorGraphSchema.cpp:1855
Scope (from outer to inner):
file
function void UMetasoundEditorGraphSchema::GetConversionActions
Source code excerpt:
using namespace Metasound::Editor;
const bool bIncludeAllVersions = static_cast<bool>(EnableAllVersionsMetaSoundNodeClassCreationCVar);
const TArray<FMetasoundFrontendClass> FrontendClasses = Frontend::ISearchEngine::Get().FindAllClasses(bIncludeAllVersions);
for (const FMetasoundFrontendClass& FrontendClass : FrontendClasses)
{
if (InFilters.InputFilterFunction && !FrontendClass.Interface.Inputs.ContainsByPredicate(InFilters.InputFilterFunction))
{
continue;
#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/MetasoundEditorGraphSchema.cpp:1967
Scope (from outer to inner):
file
function void UMetasoundEditorGraphSchema::GetFunctionActions
Source code excerpt:
}
const bool bIncludeAllVersions = static_cast<bool>(EnableAllVersionsMetaSoundNodeClassCreationCVar);
const TArray<FMetasoundFrontendClass> FrontendClasses = ISearchEngine::Get().FindAllClasses(bIncludeAllVersions);
for (const FMetasoundFrontendClass& FrontendClass : FrontendClasses)
{
if (InFilters.InputFilterFunction && !FrontendClass.Interface.Inputs.ContainsByPredicate(InFilters.InputFilterFunction))
{
continue;