Skip to content

Commit 2b44006

Browse files
authored
Merge pull request #184 from Unity-Technologies/UNI-28917-fix-select-mayalt-mac
Uni 28917 fix so can't select mayalt on mac
2 parents 6409c2d + 55b5400 commit 2b44006

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,14 @@ public override void OnInspectorGUI() {
118118

119119
// check that the path is valid and references the maya executable
120120
if (!string.IsNullOrEmpty (mayaPath)) {
121+
// get the directory of the executable
121122
var md = Directory.GetParent (mayaPath);
122-
if (md.Parent.Name.ToLower ().StartsWith ("mayalt")) {
123+
// UNI-29074 TODO: add Maya LT support
124+
// Check that the executable is not in a MayaLT directory (thus being MayaLT instead of Maya executable).
125+
// On Mac path resembles: /Applications/Autodesk/mayaLT2018/Maya.app
126+
// On Windows path resembles: C:\Program Files\Autodesk\MayaLT2018\bin\maya.exe
127+
// Therefore check both executable folder (for Mac) and its parent (for Windows)
128+
if (md.Name.ToLower().StartsWith("mayalt") || md.Parent.Name.ToLower ().StartsWith ("mayalt")) {
123129
Debug.LogError (string.Format("Unity Integration does not support Maya LT: \"{0}\"", md.FullName));
124130
exportSettings.selectedMayaApp = oldValue;
125131
return;
@@ -303,6 +309,7 @@ private static void FindMayaInstalls() {
303309
if (!product.StartsWith("maya", StringComparison.InvariantCultureIgnoreCase)) {
304310
continue;
305311
}
312+
// UNI-29074 TODO: add Maya LT support
306313
// Reject MayaLT -- it doesn't have plugins.
307314
if (product.StartsWith("mayalt", StringComparison.InvariantCultureIgnoreCase)) {
308315
continue;
@@ -388,6 +395,13 @@ public static void AddMayaOption(string newOption){
388395
}
389396
// get the version
390397
var version = AskMayaVersion(newOption);
398+
399+
// UNI-29074 TODO: add Maya LT support
400+
// make sure this is not Maya LT
401+
if (version.ToLower ().StartsWith ("lt")) {
402+
Debug.LogError (string.Format("Unity Integration does not support Maya LT: \"{0}\"", newOption));
403+
return;
404+
}
391405
instance.mayaOptionNames.Add (GetUniqueName("Maya "+version));
392406
mayaOptionPaths.Add (newOption);
393407
instance.selectedMayaApp = mayaOptionPaths.Count - 1;

0 commit comments

Comments
 (0)