Skip to content

Commit e66128c

Browse files
authored
Merge pull request #412 from Unity-Technologies/UNI-48338-standardized-fbxexporter-namespace
Uni 48338 standardized FbxExporter namespace
2 parents 839e5fe + e299db2 commit e66128c

40 files changed

+5171
-5205
lines changed

Assets/com.unity.formats.fbx.tests/ConvertToModelTest.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
using UnityEngine;
2-
using UnityEditor;
3-
using UnityEngine.TestTools;
42
using NUnit.Framework;
53
using System.Collections.Generic;
64
using System.IO;
7-
using FbxExporters.Editor;
5+
using UnityEngine.Formats.Fbx.Exporter;
86

9-
namespace FbxExporters.UnitTests
7+
namespace UnityEditor.Formats.Fbx.Exporter.UnitTests
108
{
119
public class ConvertToModelTest : ExporterTestBase
1210
{

Assets/com.unity.formats.fbx.tests/CustomExtensionsTest.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33
//#define DEBUG_UNITTEST
44

55
using UnityEngine;
6-
using UnityEditor;
76
using NUnit.Framework;
8-
using System.Collections.Generic;
9-
using System.Collections;
10-
using FbxExporters.CustomExtensions;
7+
using UnityEditor.Formats.Fbx.Exporter.CustomExtensions;
118
using UnityEngine.Formats.FbxSdk;
129

13-
namespace FbxExporters.UnitTests
10+
namespace UnityEditor.Formats.Fbx.Exporter.UnitTests
1411
{
1512
public class CustomExtensionsTest : ExporterTestBase
1613
{

Assets/com.unity.formats.fbx.tests/DefaultSelectionTest.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
using UnityEngine;
2-
using UnityEditor;
3-
using UnityEngine.TestTools;
42
using NUnit.Framework;
5-
using System.IO;
63
using System.Collections.Generic;
74
using UnityEngine.Formats.FbxSdk;
8-
using FbxExporters.EditorTools;
95

10-
namespace FbxExporters.UnitTests
6+
namespace UnityEditor.Formats.Fbx.Exporter.UnitTests
117
{
128
/// <summary>
139
/// Tests the default selection export behavior.

Assets/com.unity.formats.fbx.tests/ExportPerformanceTest.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
using UnityEngine;
2-
using UnityEditor;
3-
using UnityEngine.TestTools;
42
using NUnit.Framework;
5-
using System.Collections;
63
using System.Diagnostics;
74

8-
namespace FbxExporters.UnitTests
5+
namespace UnityEditor.Formats.Fbx.Exporter.UnitTests
96
{
107
public class ExportPerformanceTest : ExporterTestBase
118
{
@@ -69,7 +66,7 @@ public void TestPerformance ()
6966

7067
m_stopwatch.Reset ();
7168
m_stopwatch.Start ();
72-
var fbxFileName = FbxExporters.Editor.ModelExporter.ExportObjects (filename, new Object[]{m_toExport}) as string;
69+
var fbxFileName = ModelExporter.ExportObjects (filename, new Object[]{m_toExport}) as string;
7370
m_stopwatch.Stop ();
7471

7572
UnityEngine.Debug.unityLogger.logEnabled = true;

Assets/com.unity.formats.fbx.tests/ExportTimelineClipTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
using UnityEngine;
22
using NUnit.Framework;
3-
using FbxExporters.Editor;
43
using UnityEngine.Timeline;
54
using UnityEngine.Playables;
65
using UnityEditor.SceneManagement;
76
using System.Collections.Generic;
87

9-
namespace FbxExporters.UnitTests
8+
namespace UnityEditor.Formats.Fbx.Exporter.UnitTests
109
{
1110
public class ExportTimelineClipTest : ExporterTestBase
1211
{

Assets/com.unity.formats.fbx.tests/ExporterTestBase.cs

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
using UnityEngine;
2-
using UnityEditor;
3-
using UnityEngine.TestTools;
42
using NUnit.Framework;
53
using System.IO;
6-
using UnityEngine.Formats.FbxSdk;
74

8-
namespace FbxExporters.UnitTests
5+
namespace UnityEditor.Formats.Fbx.Exporter.UnitTests
96
{
107
public abstract class ExporterTestBase
118
{
@@ -212,14 +209,14 @@ public virtual void Term ()
212209
EditorApplication.update += DeleteOnNextUpdate;
213210

214211
// Put back the initial setting for the auto-updater toggle
215-
FbxExporters.EditorTools.ExportSettings.instance.autoUpdaterEnabled = isAutoUpdaterOn;
212+
ExportSettings.instance.autoUpdaterEnabled = isAutoUpdaterOn;
216213
}
217214

218215
[SetUp]
219216
public virtual void Init()
220217
{
221-
isAutoUpdaterOn = FbxExporters.EditorTools.ExportSettings.instance.autoUpdaterEnabled;
222-
FbxExporters.EditorTools.ExportSettings.instance.autoUpdaterEnabled = true;
218+
isAutoUpdaterOn = ExportSettings.instance.autoUpdaterEnabled;
219+
ExportSettings.instance.autoUpdaterEnabled = true;
223220
}
224221

225222

@@ -228,27 +225,27 @@ public virtual void Init()
228225
/// </summary>
229226
/// <returns>Root of Model Prefab.</returns>
230227
/// <param name="selected">Objects to export.</param>
231-
protected virtual GameObject ExportSelection(Object selected, EditorTools.IExportOptions exportOptions = null)
228+
protected virtual GameObject ExportSelection(Object selected, IExportOptions exportOptions = null)
232229
{
233230
// export selected to a file, then return the root
234231
var filename = GetRandomFileNamePath();
235232
return ExportSelection (filename, selected, exportOptions);
236233
}
237234

238-
protected virtual GameObject ExportSelection(Object[] selected, EditorTools.IExportOptions exportOptions = null){
235+
protected virtual GameObject ExportSelection(Object[] selected, IExportOptions exportOptions = null){
239236
var filename = GetRandomFileNamePath();
240237
return ExportSelection (filename, selected, exportOptions);
241238
}
242239

243-
protected virtual GameObject ExportSelection(string filename, Object selected, EditorTools.IExportOptions exportOptions = null)
240+
protected virtual GameObject ExportSelection(string filename, Object selected, IExportOptions exportOptions = null)
244241
{
245242
// export selected to a file, then return the root
246243
return ExportSelection (filename, new Object[]{selected}, exportOptions);
247244
}
248245

249-
protected virtual GameObject ExportSelection(string filename, Object[] selected, EditorTools.IExportOptions exportOptions = null){
246+
protected virtual GameObject ExportSelection(string filename, Object[] selected, IExportOptions exportOptions = null){
250247
Debug.unityLogger.logEnabled = false;
251-
var fbxFileName = FbxExporters.Editor.ModelExporter.ExportObjects (filename, selected, exportOptions) as string;
248+
var fbxFileName = ModelExporter.ExportObjects (filename, selected, exportOptions) as string;
252249
Debug.unityLogger.logEnabled = true;
253250

254251
Assert.IsNotNull (fbxFileName);
@@ -276,15 +273,15 @@ protected virtual GameObject ExportSelection(string filename, Object[] selected,
276273
/// <param name="animOnly">If set to <c>true</c> export animation only.</param>
277274
protected GameObject ExportToFbx (
278275
GameObject hierarchy, bool animOnly = false,
279-
EditorTools.ExportSettings.LODExportType lodExportType = EditorTools.ExportSettings.LODExportType.All
276+
ExportSettings.LODExportType lodExportType = ExportSettings.LODExportType.All
280277
){
281278
string filename = GetRandomFbxFilePath ();
282-
var exportOptions = new EditorTools.ExportModelSettingsSerialize ();
279+
var exportOptions = new ExportModelSettingsSerialize ();
283280
exportOptions.SetLODExportType(lodExportType);
284281
if (animOnly) {
285-
exportOptions.SetModelAnimIncludeOption(FbxExporters.EditorTools.ExportSettings.Include.Anim);
282+
exportOptions.SetModelAnimIncludeOption(ExportSettings.Include.Anim);
286283
}
287-
var exportedFilePath = FbxExporters.Editor.ModelExporter.ExportObject (
284+
var exportedFilePath = ModelExporter.ExportObject (
288285
filename, hierarchy, exportOptions
289286
);
290287
Assert.That (exportedFilePath, Is.EqualTo (filename));

Assets/com.unity.formats.fbx.tests/FbxAnimationTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
//#define DEBUG_UNITTEST
44

55
using UnityEngine;
6-
using UnityEditor;
76
using NUnit.Framework;
87
using System.Collections;
98
using System.Collections.Generic;
10-
using FbxExporters.Editor;
119
using System.Linq;
1210

13-
namespace FbxExporters.UnitTests
11+
namespace UnityEditor.Formats.Fbx.Exporter.UnitTests
1412
{
1513
using CustomExtensions;
1614

Assets/com.unity.formats.fbx.tests/FbxCameraTests.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33
//#define DEBUG_UNITTEST
44

55
using UnityEngine;
6-
using UnityEditor;
76
using NUnit.Framework;
8-
using System.Collections.Generic;
9-
using System.Collections;
10-
using FbxExporters.CustomExtensions;
7+
using UnityEditor.Formats.Fbx.Exporter.CustomExtensions;
118

12-
namespace FbxExporters.UnitTests
9+
namespace UnityEditor.Formats.Fbx.Exporter.UnitTests
1310
{
1411
public class FbxCameraTest : ExporterTestBase
1512
{
@@ -58,7 +55,7 @@ public void GameCameraTest()
5855

5956
// Convert it to FBX. The asset file will be deleted automatically
6057
// on termination.
61-
var fbxAsset = FbxExporters.Editor.ModelExporter.ExportObject(
58+
var fbxAsset = ModelExporter.ExportObject(
6259
filename, original);
6360

6461
// refresh the assetdata base so that we can query for the model
@@ -96,7 +93,7 @@ public void PhysicalCameraTest()
9693

9794
// Convert it to FBX. The asset file will be deleted automatically
9895
// on termination.
99-
var fbxAsset = FbxExporters.Editor.ModelExporter.ExportObject(
96+
var fbxAsset = ModelExporter.ExportObject(
10097
filename, original);
10198

10299
var source = AssetDatabase.LoadMainAssetAtPath(fbxAsset) as GameObject;

Assets/com.unity.formats.fbx.tests/FbxConstraintTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Collections.Generic;
66
using UnityEngine.Animations;
77

8-
namespace FbxExporters.UnitTests
8+
namespace UnityEditor.Formats.Fbx.Exporter.UnitTests
99
{
1010
public class ConstraintAnimationTestDataClass
1111
{

Assets/com.unity.formats.fbx.tests/FbxExportSettingsTest.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
using UnityEngine;
2-
using UnityEditor;
32
using System.IO;
43
using System.Collections.Generic;
5-
using FbxExporters.EditorTools;
4+
using UnityEditor.Formats.Fbx.Exporter;
65
using NUnit.Framework;
76

8-
namespace FbxExporters.UnitTests
7+
namespace UnityEditor.Formats.Fbx.Exporter.UnitTests
98
{
109
public class FbxExportSettingsTest : ExporterTestBase
1110
{

0 commit comments

Comments
 (0)