Skip to content

Commit 030f404

Browse files
author
AJubrey
committed
[CHANGED] the toggle for binary export into a radio button configuration
1 parent 5fbbf14 commit 030f404

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ public override void OnInspectorGUI() {
4545
exportSettings.centerObjects
4646
);
4747

48-
exportSettings.ExportInBinary = EditorGUILayout.Toggle(
49-
new GUIContent("Export in Binary:",
50-
"If false, will export files in ASCII format."),
51-
exportSettings.ExportInBinary
52-
);
48+
GUILayout.BeginHorizontal();
49+
GUILayout.Label(new GUIContent("Export Format:", "Export the FBX file in the standard binary format." +
50+
" Select ASCII to export the FBX file in ASCII format."), GUILayout.Width(LabelWidth));
51+
exportSettings.ExportFormatSelection = GUILayout.SelectionGrid(exportSettings.ExportFormatSelection, new string[]{"Binary", "ASCII"}, 1, EditorStyles.radioButton);
52+
GUILayout.EndHorizontal();
5353

5454
GUILayout.BeginHorizontal ();
5555
GUILayout.Label (new GUIContent (
@@ -252,7 +252,7 @@ public static string kDefaultAdskRoot {
252252
public bool mayaCompatibleNames;
253253
public bool centerObjects;
254254
public bool launchAfterInstallation;
255-
public bool ExportInBinary;
255+
public int ExportFormatSelection;
256256

257257
public int selectedDCCApp = 0;
258258

@@ -281,7 +281,7 @@ protected override void LoadDefaults()
281281
mayaCompatibleNames = true;
282282
centerObjects = true;
283283
launchAfterInstallation = true;
284-
ExportInBinary = true;
284+
ExportFormatSelection = 0;
285285
convertToModelSavePath = kDefaultSavePath;
286286
dccOptionPaths = null;
287287
dccOptionNames = null;

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ public int ExportAll (IEnumerable<UnityEngine.Object> unityExportSet)
982982
// Initialize the exporter.
983983
// fileFormat must be binary if we are embedding textures
984984
int fileFormat = -1;
985-
if (!EditorTools.ExportSettings.instance.ExportInBinary)
985+
if (EditorTools.ExportSettings.instance.ExportFormatSelection == 1)
986986
{
987987
fileFormat = fbxManager.GetIOPluginRegistry().FindWriterIDByDescription("FBX ascii (*.fbx)");
988988
}

0 commit comments

Comments
 (0)