Skip to content

Commit 3b169e5

Browse files
authored
UT-3305 Bug in exporting outside Assets folder. (#540)
1 parent 7445187 commit 3b169e5

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

com.unity.formats.fbx/Editor/ExportModelEditorWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ protected void OnGUI ()
376376
ExportSettings.instance.SelectedFbxPath = EditorGUILayout.Popup (ExportSettings.instance.SelectedFbxPath, pathLabels, GUILayout.MinWidth(SelectableLabelMinWidth));
377377

378378
// Set export setting for exporting outside the project on choosing a path
379-
if (string.IsNullOrEmpty(ExportSettings.ConvertToAssetRelativePath(ExportSettings.FbxAbsoluteSavePath)))
379+
if (string.IsNullOrEmpty(ExportSettings.ConvertToAssetRelativePath(pathLabels[ExportSettings.instance.SelectedFbxPath])))
380380
{
381381
ExportSettings.instance.ExportOutsideProject = true;
382382
}

com.unity.formats.fbx/Editor/FbxExportSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public enum ObjectPosition { LocalCentered = 0, WorldAbsolute = 1, Reset = 2 /*
285285

286286
public enum LODExportType { All = 0, Highest = 1, Lowest = 2 }
287287

288-
public bool ExportOutsideProject;
288+
public bool ExportOutsideProject = false;
289289

290290
internal const string kDefaultSavePath = ".";
291291
private static List<string> s_PreferenceList = new List<string>() {kMayaOptionName, kMayaLtOptionName, kMaxOptionName};

com.unity.formats.fbx/Tests/FbxTests/ModelExporterTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,7 @@ public void TestPreserveImportSettings()
10591059

10601060
// re-export with preserve import settings true and verify settings are the same
10611061
var exportOptions = new ExportModelSettingsSerialize();
1062+
ExportSettings.instance.ExportOutsideProject = false;
10621063
exportOptions.SetPreserveImportSettings(true);
10631064

10641065
ModelExporter.ExportObjects(filename, new Object[] { cube }, exportOptions);

0 commit comments

Comments
 (0)