bASCII
bASCII
#Overview
name: bASCII
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bASCII is to control whether FBX files are exported in ASCII format instead of binary format when using Unreal Engine’s FBX export functionality.
This setting variable is primarily used in the Unreal Engine’s FBX export system, which is part of the editor’s asset export capabilities. It is utilized by the MovieSceneTools module and the UnrealEd module, specifically in the FBX export process.
The value of this variable is set in multiple places:
- In the UFbxExportOption class constructor, it’s initially set to false.
- It can be configured through the UMovieSceneUserExportFBXControlRigSettings class, which likely allows users to set this option in the editor UI.
- It’s also accessible through the UFbxExportOption class, which suggests it can be programmatically set before initiating an FBX export.
This variable interacts with other FBX export settings, such as FbxExportCompatibility and bForceFrontXAxis, which collectively determine how the FBX file is exported.
Developers must be aware that:
- Using ASCII format results in larger file sizes but human-readable content.
- Binary format is the default and produces smaller files, but they’re not human-readable.
- This setting affects all FBX exports when set, including those from the Control Rig system.
Best practices when using this variable include:
- Use ASCII format (set bASCII to true) when debugging or when you need to manually inspect the exported FBX files.
- Keep it set to false (binary format) for production use to minimize file sizes.
- Ensure consistency in this setting across your project to maintain predictable export behavior.
- Consider the target application’s compatibility when choosing between ASCII and binary formats.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:70, section: [/Script/UnrealEd.FbxExportOption]
- INI Section:
/Script/UnrealEd.FbxExportOption
- Raw value:
false
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/MovieSceneTools/Private/MovieSceneToolHelpers.cpp:2472
Scope (from outer to inner):
file
function bool MovieSceneToolHelpers::ExportFBXFromControlRigChannels
Source code excerpt:
UFbxExportOption* ExportOptions = Exporter->GetExportOptions();
ExportOptions->FbxExportCompatibility = ExportFBXControlRigSettings->FbxExportCompatibility;
ExportOptions->bASCII = ExportFBXControlRigSettings->bASCII;
ExportOptions->bForceFrontXAxis = ExportFBXControlRigSettings->bForceFrontXAxis;
ExportOptions->bExportLocalTime = ExportFBXControlRigSettings->bExportLocalTime;
Exporter->CreateDocument();
Exporter->SetTransformBaking(true);
Exporter->SetKeepHierarchy(true);
#Loc: <Workspace>/Engine/Source/Editor/MovieSceneTools/Public/MovieSceneToolsUserSettings.h:286
Scope (from outer to inner):
file
class class UMovieSceneUserExportFBXControlRigSettings : public UObject
Source code excerpt:
/** If enabled, save as ascii instead of binary */
UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, config, Category = Exporter)
uint32 bASCII : 1;
/** Whether to force the front axis to be align with X instead of -Y. */
UPROPERTY(EditAnywhere, config, Category = Exporter, meta = (ToolTip = "Convert the scene from FBX coordinate system to UE coordinate system with front X axis instead of -Y"))
bool bForceFrontXAxis = false;
/** Whether or not import onto selected controls or all controls*/
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Exporters/FbxExportOption.h:47
Scope (from outer to inner):
file
class class UFbxExportOption : public UObject
Source code excerpt:
/** If enabled, save as ascii instead of binary */
UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, config, Category = Exporter)
uint32 bASCII : 1;
/** If enabled, export with X axis as the front axis instead of default -Y */
UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, config, Category = Exporter)
uint32 bForceFrontXAxis : 1;
/** If enabled, export vertex color */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxExportOption.cpp:19
Scope (from outer to inner):
file
function UFbxExportOption::UFbxExportOption
Source code excerpt:
{
FbxExportCompatibility = EFbxExportCompatibility::FBX_2013;
bASCII = false;
bForceFrontXAxis = false;
LevelOfDetail = true;
Collision = true;
bExportSourceMesh = false;
bExportMorphTargets = true;
VertexColor = true;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxMainExport.cpp:301
Scope (from outer to inner):
file
namespace UnFbx
function void FFbxExporter::WriteToFile
Source code excerpt:
int32 FileFormat = -1;
bool bEmbedMedia = false;
bool bASCII = GetExportOptions()->bASCII;
// Create an exporter.
FbxExporter* Exporter = FbxExporter::Create(SdkManager, "");
// set file format
// Write in fall back format if pEmbedMedia is true
if (bASCII)
{
FileFormat = SdkManager->GetIOPluginRegistry()->FindWriterIDByDescription("FBX ascii (*.fbx)");
}
else
{
FileFormat = SdkManager->GetIOPluginRegistry()->GetNativeWriterFormat();
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxMainExport.cpp:328
Scope (from outer to inner):
file
namespace UnFbx
function void FFbxExporter::WriteToFile
Source code excerpt:
IOS_REF.SetBoolProp(EXP_FBX_ANIMATION, true);
IOS_REF.SetBoolProp(EXP_FBX_GLOBAL_SETTINGS, true);
IOS_REF.SetBoolProp(EXP_ASCIIFBX, bASCII);
//Get the compatibility from the editor settings
const char* CompatibilitySetting = FBX_2013_00_COMPATIBLE;
const EFbxExportCompatibility FbxExportCompatibility = GetExportOptions()->FbxExportCompatibility;
switch (FbxExportCompatibility)
{