Skip to content

Commit ba766d3

Browse files
author
AJubrey
committed
[CHANGED] now we stop looking for locations if the vendor location environment variable had any valid locations
[CHANGED] If we find a valid MAYA_LOCATION we will also take default locations now, in addition
1 parent 25d3f41 commit ba766d3

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ public static string[] DCCVendorLocations {
270270
locationsList.Add(locations[i]);
271271
}
272272
}
273+
//If we found anything, just return the list
274+
if (locationsList.Count > 0)
275+
{
276+
return locationsList.ToArray();
277+
}
273278
}
274279

275280
//Check the surrounding area around MAYA_LOCATION for any other Applications we may want.
@@ -289,7 +294,7 @@ public static string[] DCCVendorLocations {
289294

290295
//If we found 'Maya.app' in the location string, we're going to trim it and everything after it out.
291296
//This way our possibleLocation will be more uniform between windows and mac.
292-
297+
293298
//make sure we found "maya.app."
294299
if (appIndex >= 0)
295300
{
@@ -302,7 +307,7 @@ public static string[] DCCVendorLocations {
302307
{
303308
possibleLocation = parentDirectory.ToString();
304309
}
305-
}
310+
}
306311
}
307312

308313
if (!string.IsNullOrEmpty(possibleLocation) && Directory.Exists(possibleLocation))
@@ -311,17 +316,14 @@ public static string[] DCCVendorLocations {
311316
}
312317
}
313318

314-
if (locationsList.Count > 0)
315-
{
316-
return locationsList.ToArray();
317-
}
318-
319319
switch (Application.platform)
320320
{
321321
case RuntimePlatform.WindowsEditor:
322-
return new string[] { "C:/Program Files/Autodesk", "D:/Program Files/Autodesk" };
322+
locationsList.AddRange(new string[] { "C:/Program Files/Autodesk", "D:/Program Files/Autodesk" });
323+
return locationsList.ToArray();
323324
case RuntimePlatform.OSXEditor:
324-
return new string[] { "/Applications/Autodesk" };
325+
locationsList.AddRange(new string[] { "/Applications/Autodesk" });
326+
return locationsList.ToArray();
325327
default:
326328
throw new NotImplementedException();
327329
}

0 commit comments

Comments
 (0)