@@ -85,17 +85,6 @@ public override void OnInspectorGUI() {
85
85
}
86
86
}
87
87
}
88
- GUILayout . EndHorizontal ( ) ;
89
- GUILayout . BeginHorizontal ( ) ;
90
-
91
- GUILayout . Label ( new GUIContent (
92
- "Turntable Scene:" ,
93
- "Scene to use for reviewing models. If none, a scene will be created on review." ) ) ;
94
-
95
- exportSettings . turntableScene = EditorGUILayout . ObjectField (
96
- exportSettings . turntableScene , typeof ( SceneAsset ) , false
97
- ) ;
98
-
99
88
GUILayout . EndHorizontal ( ) ;
100
89
101
90
EditorGUILayout . Space ( ) ;
@@ -130,6 +119,13 @@ public override void OnInspectorGUI() {
130
119
131
120
// check that the path is valid and references the maya executable
132
121
if ( ! string . IsNullOrEmpty ( dccPath ) ) {
122
+ var md = Directory . GetParent ( dccPath ) ;
123
+ if ( md . Parent . Name . ToLower ( ) . StartsWith ( "mayalt" ) ) {
124
+ Debug . LogError ( string . Format ( "Unity Integration does not support Maya LT: \" {0}\" " , md . FullName ) ) ;
125
+ exportSettings . selectedDCCApp = oldValue ;
126
+ return ;
127
+ }
128
+
133
129
ExportSettings . DCCType foundDCC = ExportSettings . DCCType . Maya ;
134
130
var foundDCCPath = TryFindDCC ( dccPath , ext , ExportSettings . DCCType . Maya ) ;
135
131
if ( foundDCCPath == null && Application . platform == RuntimePlatform . WindowsEditor ) {
@@ -138,6 +134,8 @@ public override void OnInspectorGUI() {
138
134
} else {
139
135
foundDCCPath = TryFindDCC ( dccPath , ext , ExportSettings . DCCType . Max ) ;
140
136
foundDCC = ExportSettings . DCCType . Max ;
137
+ }
138
+
141
139
}
142
140
}
143
141
if ( foundDCCPath == null ) {
@@ -224,15 +222,18 @@ public class ExportSettings : ScriptableSingleton<ExportSettings>
224
222
/// The path where all the different versions of Maya are installed
225
223
/// by default. Depends on the platform.
226
224
/// </summary>
227
- public const string kDefaultAdskRoot =
228
- #if UNITY_EDITOR_OSX
229
- "/Applications/Autodesk"
230
- #elif UNITY_EDITOR_LINUX
231
- "/usr/autodesk"
232
- #else // WINDOWS
233
- "C:/Program Files/Autodesk"
234
- #endif
235
- ;
225
+ public static string kDefaultAdskRoot {
226
+ get {
227
+ switch ( Application . platform ) {
228
+ case RuntimePlatform . WindowsEditor :
229
+ return "C:/Program Files/Autodesk" ;
230
+ case RuntimePlatform . OSXEditor :
231
+ return "/Applications/Autodesk" ;
232
+ default :
233
+ throw new NotImplementedException ( ) ;
234
+ }
235
+ }
236
+ }
236
237
237
238
// Note: default values are set in LoadDefaults().
238
239
public bool mayaCompatibleNames ;
@@ -247,9 +248,6 @@ public class ExportSettings : ScriptableSingleton<ExportSettings>
247
248
248
249
public int selectedDCCApp = 0 ;
249
250
250
- [ SerializeField ]
251
- public UnityEngine . Object turntableScene ;
252
-
253
251
/// <summary>
254
252
/// The path where Convert To Model will save the new fbx and prefab.
255
253
///
@@ -276,7 +274,6 @@ protected override void LoadDefaults()
276
274
centerObjects = true ;
277
275
keepOriginalAfterConvert = false ;
278
276
convertToModelSavePath = kDefaultSavePath ;
279
- turntableScene = null ;
280
277
dccOptionPaths = null ;
281
278
dccOptionNames = null ;
282
279
}
@@ -371,23 +368,24 @@ private static void FindDCCInstalls() {
371
368
/// <param name="location">Location of Maya install.</param>
372
369
private static string GetMayaExePath ( string location )
373
370
{
374
- #if UNITY_EDITOR_OSX
375
- // MAYA_LOCATION on mac is set by Autodesk to be the
376
- // Contents directory. But let's make it easier on people
377
- // and allow just having it be the app bundle or a
378
- // directory that holds the app bundle.
379
- if ( location . EndsWith ( ".app/Contents" ) ) {
380
- return location + "/MacOS/Maya" ;
381
- } else if ( location . EndsWith ( ".app" ) ) {
382
- return location + "/Contents/MacOS/Maya" ;
383
- } else {
384
- return location + "/Maya.app/Contents/MacOS/Maya" ;
371
+ switch ( Application . platform ) {
372
+ case RuntimePlatform . WindowsEditor :
373
+ return location + "/bin/maya.exe" ;
374
+ case RuntimePlatform . OSXEditor :
375
+ // MAYA_LOCATION on mac is set by Autodesk to be the
376
+ // Contents directory. But let's make it easier on people
377
+ // and allow just having it be the app bundle or a
378
+ // directory that holds the app bundle.
379
+ if ( location . EndsWith ( ".app/Contents" ) ) {
380
+ return location + "/MacOS/Maya" ;
381
+ } else if ( location . EndsWith ( ".app" ) ) {
382
+ return location + "/Contents/MacOS/Maya" ;
383
+ } else {
384
+ return location + "/Maya.app/Contents/MacOS/Maya" ;
385
+ }
386
+ default :
387
+ throw new NotImplementedException ( ) ;
385
388
}
386
- #elif UNITY_EDITOR_LINUX
387
- return location + "/bin/maya" ;
388
- #else // WINDOWS
389
- return location + "/bin/maya.exe" ;
390
- #endif
391
389
}
392
390
393
391
public static GUIContent [ ] GetDCCOptions ( ) {
@@ -515,20 +513,6 @@ public static string GetSelectedDCCPath()
515
513
return instance . dccOptionPaths [ instance . selectedDCCApp ] ;
516
514
}
517
515
518
- public static string GetTurnTableSceneName ( ) {
519
- if ( instance . turntableScene ) {
520
- return instance . turntableScene . name ;
521
- }
522
- return null ;
523
- }
524
-
525
- public static string GetTurnTableScenePath ( ) {
526
- if ( instance . turntableScene ) {
527
- return AssetDatabase . GetAssetPath ( instance . turntableScene ) ;
528
- }
529
- return null ;
530
- }
531
-
532
516
/// <summary>
533
517
/// The path where Convert To Model will save the new fbx and prefab.
534
518
/// This is relative to the Application.dataPath ; it uses '/' as the
0 commit comments