Skip to content

Commit c6417ea

Browse files
author
AJubrey
committed
[CHANGED] we now accept the MAYA_LOCATION environment variable again
[FIXED] an issue where manually selecting a dcc from a location would cause an error if the location had an odd name
1 parent c90a6d9 commit c6417ea

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ private static string DefaultIntegrationSavePath {
264264
public static string[] DCCVendorLocations {
265265
get{
266266
var environmentVariable = Environment.GetEnvironmentVariable("UNITY_FBX_3DAPP_VENDOR_LOCATIONS");
267-
var mayaLocation = System.Environment.GetEnvironmentVariable("MAYA_LOCATION");
268267
List<string> locationsList = new List<string>();
269268

270269
if (environmentVariable != null)
@@ -281,7 +280,7 @@ public static string[] DCCVendorLocations {
281280
{
282281
return locationsList.ToArray();
283282
}
284-
}
283+
}
285284

286285
switch (Application.platform)
287286
{
@@ -714,7 +713,14 @@ static string AskMayaVersion(string exePath) {
714713
// We want the stuff after 'Maya ' and before the comma.
715714
// (Uni-31601) less brittle! Consider also the mel command "about -version".
716715
var commaIndex = resultString.IndexOf(',');
717-
return resultString.Substring(0, commaIndex).Substring("Maya ".Length);
716+
if (!string.IsNullOrEmpty(resultString.Trim()))
717+
{
718+
return resultString.Substring(0, commaIndex).Substring("Maya ".Length);
719+
}
720+
else
721+
{
722+
return "unknown";
723+
}
718724
}
719725

720726
/// <summary>

0 commit comments

Comments
 (0)