File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,12 @@ public override void OnInspectorGUI() {
159
159
exportSettings . launchAfterInstallation
160
160
) ;
161
161
162
+ exportSettings . launchAfterInstallation = EditorGUILayout . Toggle (
163
+ new GUIContent ( "Export in Binary:" ,
164
+ "If false, will export files in ASCII format." ) ,
165
+ exportSettings . ExportInBinary
166
+ ) ;
167
+
162
168
GUILayout . FlexibleSpace ( ) ;
163
169
GUILayout . EndScrollView ( ) ;
164
170
GUILayout . EndVertical ( ) ;
@@ -246,6 +252,7 @@ public static string kDefaultAdskRoot {
246
252
public bool mayaCompatibleNames ;
247
253
public bool centerObjects ;
248
254
public bool launchAfterInstallation ;
255
+ public bool ExportInBinary ;
249
256
250
257
public int selectedDCCApp = 0 ;
251
258
@@ -274,6 +281,7 @@ protected override void LoadDefaults()
274
281
mayaCompatibleNames = true ;
275
282
centerObjects = true ;
276
283
launchAfterInstallation = true ;
284
+ ExportInBinary = true ;
277
285
convertToModelSavePath = kDefaultSavePath ;
278
286
dccOptionPaths = null ;
279
287
dccOptionNames = null ;
Original file line number Diff line number Diff line change @@ -981,7 +981,15 @@ public int ExportAll (IEnumerable<UnityEngine.Object> unityExportSet)
981
981
982
982
// Initialize the exporter.
983
983
// fileFormat must be binary if we are embedding textures
984
- int fileFormat = fbxManager . GetIOPluginRegistry ( ) . FindWriterIDByDescription ( "FBX ascii (*.fbx)" ) ;
984
+ int fileFormat ;
985
+ if ( EditorTools . ExportSettings . instance . ExportInBinary )
986
+ {
987
+ fileFormat = - 1 ;
988
+ }
989
+ else
990
+ {
991
+ fileFormat = fbxManager . GetIOPluginRegistry ( ) . FindWriterIDByDescription ( "FBX ascii (*.fbx)" ) ;
992
+ }
985
993
986
994
status = fbxExporter . Initialize ( m_tempFilePath , fileFormat , fbxManager . GetIOSettings ( ) ) ;
987
995
// Check that initialization of the fbxExporter was successful
You can’t perform that action at this time.
0 commit comments