Skip to content

Commit 3f256c0

Browse files
author
AJubrey
committed
[CHANGED] made radio buttons horizontal instead of vertical
[ADDED] enum for export format in the fbxexporter class
1 parent 030f404 commit 3f256c0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public override void OnInspectorGUI() {
4848
GUILayout.BeginHorizontal();
4949
GUILayout.Label(new GUIContent("Export Format:", "Export the FBX file in the standard binary format." +
5050
" 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);
51+
exportSettings.ExportFormatSelection = GUILayout.SelectionGrid(exportSettings.ExportFormatSelection, new string[]{"Binary", "ASCII"}, 2, EditorStyles.radioButton);
5252
GUILayout.EndHorizontal();
5353

5454
GUILayout.BeginHorizontal ();

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ public class ModelExporter : System.IDisposable
5454

5555
public const string PACKAGE_UI_NAME = "FBX Exporter";
5656

57+
public enum ExportFormat
58+
{
59+
Binary = 0,
60+
ASCII = 1
61+
}
62+
5763
/// <summary>
5864
/// Create instance of exporter.
5965
/// </summary>
@@ -982,7 +988,7 @@ public int ExportAll (IEnumerable<UnityEngine.Object> unityExportSet)
982988
// Initialize the exporter.
983989
// fileFormat must be binary if we are embedding textures
984990
int fileFormat = -1;
985-
if (EditorTools.ExportSettings.instance.ExportFormatSelection == 1)
991+
if (EditorTools.ExportSettings.instance.ExportFormatSelection == (int)ExportFormat.ASCII)
986992
{
987993
fileFormat = fbxManager.GetIOPluginRegistry().FindWriterIDByDescription("FBX ascii (*.fbx)");
988994
}

0 commit comments

Comments
 (0)