Interchange.FeatureFlags.Import.FBX
Interchange.FeatureFlags.Import.FBX
#Overview
name: Interchange.FeatureFlags.Import.FBX
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether FBX support is enabled.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Interchange.FeatureFlags.Import.FBX is to control whether FBX support is enabled in the Unreal Engine’s Interchange system for importing assets.
This setting variable is primarily used by the Interchange system, which is a part of Unreal Engine’s asset import and export framework. It appears to be specifically related to the FBX file format import functionality.
Based on the callsites, this variable is used in the following Unreal Engine subsystems and modules:
- Interchange Runtime Plugin (InterchangeFbxTranslator.cpp)
- Editor Tests Plugin (FbxAutomationTests.cpp)
- Interchange Tests Plugin (InterchangeImportTest.cpp)
- UnrealEd module (FbxFactory.cpp)
The value of this variable is set using an FAutoConsoleVariableRef, which means it can be modified at runtime through the console or configuration files. It’s initially set to false (disabled) in the InterchangeFbxTranslator.cpp file.
This variable interacts with other related variables, such as:
- GInterchangeEnableFBXLevelImport
- Interchange.FeatureFlags.Import.FBX.ToLevel
- Interchange.FeatureFlags.Import.OBJ
Developers should be aware that:
- This variable acts as a feature flag, enabling or disabling FBX import functionality in the Interchange system.
- It affects automated tests related to FBX import.
- It can influence the behavior of the FbxFactory class, potentially changing which file formats are supported for import.
Best practices when using this variable include:
- Ensure it’s properly set before attempting to import FBX files using the Interchange system.
- Be cautious when modifying this variable during runtime, as it may affect ongoing import operations.
- Consider the interaction with other related variables when adjusting FBX import settings.
- Use this variable in conjunction with proper error handling and fallback mechanisms in case FBX support is disabled.
- When writing tests or automation scripts, make sure to handle cases where this feature flag might be enabled or disabled.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Interchange/Runtime/Source/Import/Private/Fbx/InterchangeFbxTranslator.cpp:28
Scope: file
Source code excerpt:
static bool GInterchangeEnableFBXImport = false;
static FAutoConsoleVariableRef CCvarInterchangeEnableFBXImport(
TEXT("Interchange.FeatureFlags.Import.FBX"),
GInterchangeEnableFBXImport,
TEXT("Whether FBX support is enabled."),
ECVF_Default);
static bool GInterchangeEnableFBXLevelImport = false;
static FAutoConsoleVariableRef CCvarInterchangeEnableFBXLevelImport(
#Loc: <Workspace>/Engine/Plugins/Tests/EditorTests/Source/EditorTests/Private/UnrealEd/FbxAutomationTests.cpp:215
Scope (from outer to inner):
file
function BEGIN_FUNCTION_BUILD_OPTIMIZATION bool F
Source code excerpt:
CollectGarbage(GARBAGE_COLLECTION_KEEPFLAGS);
static const auto CVarInterchangeFbx = IConsoleManager::Get().FindConsoleVariable(TEXT("Interchange.FeatureFlags.Import.FBX"));
bool IsInterchangeFbxEnabled = CVarInterchangeFbx->GetBool();
UE::Interchange::FScopedLambda IsInterchangeEnabledGuard([&IsInterchangeFbxEnabled]()
{
CVarInterchangeFbx->Set(IsInterchangeFbxEnabled, ECVF_SetByConsole);
});
//Make sure interchange is disabled for fbx
#Loc: <Workspace>/Engine/Plugins/Tests/InterchangeTests/Source/InterchangeTests/Private/InterchangeImportTest.cpp:66
Scope (from outer to inner):
file
function bool FInterchangeImportTest::RunTest
Source code excerpt:
#endif
static const auto CVarInterchangeFbx = IConsoleManager::Get().FindConsoleVariable(TEXT("Interchange.FeatureFlags.Import.FBX"));
bool IsInterchangeFbxEnabled = CVarInterchangeFbx->GetBool();
UE::Interchange::FScopedLambda IsInterchangeEnabledGuard([&IsInterchangeFbxEnabled]()
{
CVarInterchangeFbx->Set(IsInterchangeFbxEnabled, ECVF_SetByConsole);
});
//Make sure interchange is enabled for fbx
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxFactory.cpp:1195
Scope (from outer to inner):
file
function TArray<FString> UFbxFactory::GetFbxFormats
Source code excerpt:
{
TArray<FString> FormatArray;
const IConsoleVariable* CVarFbx = IConsoleManager::Get().FindConsoleVariable(TEXT("Interchange.FeatureFlags.Import.FBX"));
const IConsoleVariable* CVarFbxLevel = IConsoleManager::Get().FindConsoleVariable(TEXT("Interchange.FeatureFlags.Import.FBX.ToLevel"));
const bool bUseLegacyFbx = (!CVarFbx || !CVarFbx->GetBool()) || (!CVarFbxLevel || !CVarFbxLevel->GetBool());
const IConsoleVariable* CVarObj = IConsoleManager::Get().FindConsoleVariable(TEXT("Interchange.FeatureFlags.Import.OBJ"));
const bool bUseLegacyObj = (!CVarObj || !CVarObj->GetBool());
for (const FString& Format : Factory->Formats)