|
| 1 | +// *********************************************************************** |
| 2 | +// Copyright (c) 2017 Unity Technologies. All rights reserved. |
| 3 | +// |
| 4 | +// Licensed under the ##LICENSENAME##. |
| 5 | +// See LICENSE.md file in the project root for full license information. |
| 6 | +// *********************************************************************** |
| 7 | + |
1 | 8 | using System;
|
2 | 9 | using System.IO;
|
3 | 10 | using UnityEditorInternal;
|
@@ -125,25 +132,11 @@ public override void OnInspectorGUI() {
|
125 | 132 |
|
126 | 133 | // check that the path is valid and references the maya executable
|
127 | 134 | if (!string.IsNullOrEmpty (dccPath)) {
|
128 |
| - // get the directory of the executable |
129 |
| - var md = Directory.GetParent (dccPath); |
130 |
| - // UNI-29074 TODO: add Maya LT support |
131 |
| - // Check that the executable is not in a MayaLT directory (thus being MayaLT instead of Maya executable). |
132 |
| - // On Mac path resembles: /Applications/Autodesk/mayaLT2018/Maya.app |
133 |
| - // On Windows path resembles: C:\Program Files\Autodesk\MayaLT2018\bin\maya.exe |
134 |
| - // Therefore check both executable folder (for Mac) and its parent (for Windows) |
135 |
| - if (md.Name.ToLower().StartsWith("mayalt") || md.Parent.Name.ToLower ().StartsWith ("mayalt")) { |
136 |
| - Debug.LogError (string.Format("Unity Integration does not support Maya LT: \"{0}\"", md.FullName)); |
137 |
| - return; |
138 |
| - } |
139 |
| - |
140 | 135 | ExportSettings.DCCType foundDCC = ExportSettings.DCCType.Maya;
|
141 | 136 | var foundDCCPath = TryFindDCC (dccPath, ext, ExportSettings.DCCType.Maya);
|
142 | 137 | if (foundDCCPath == null && Application.platform == RuntimePlatform.WindowsEditor) {
|
143 |
| - |
144 | 138 | foundDCCPath = TryFindDCC (dccPath, ext, ExportSettings.DCCType.Max);
|
145 | 139 | foundDCC = ExportSettings.DCCType.Max;
|
146 |
| - |
147 | 140 | }
|
148 | 141 | if (foundDCCPath == null) {
|
149 | 142 | Debug.LogError (string.Format ("Could not find supported 3D application at: \"{0}\"", Path.GetDirectoryName (dccPath)));
|
@@ -492,17 +485,11 @@ private static void FindDCCInstalls() {
|
492 | 485 | var product = productDir.Name;
|
493 | 486 |
|
494 | 487 | // Only accept those that start with 'maya' in either case.
|
495 |
| - if (product.StartsWith("maya", StringComparison.InvariantCultureIgnoreCase)) |
496 |
| - { |
497 |
| - // UNI-29074 TODO: add Maya LT support |
498 |
| - // Reject MayaLT -- it doesn't have plugins. |
499 |
| - if (product.StartsWith("mayalt", StringComparison.InvariantCultureIgnoreCase)) |
500 |
| - { |
501 |
| - continue; |
502 |
| - } |
503 |
| - string version = product.Substring("maya".Length); |
504 |
| - dccOptionPath.Add(GetMayaExePath(productDir.FullName.Replace("\\", "/"))); |
505 |
| - dccOptionName.Add(GetUniqueDCCOptionName(kMayaOptionName + version)); |
| 488 | + if (product.StartsWith ("maya", StringComparison.InvariantCultureIgnoreCase)) { |
| 489 | + string version = product.Substring ("maya".Length); |
| 490 | + dccOptionPath.Add (GetMayaExePath (productDir.FullName.Replace ("\\", "/"))); |
| 491 | + dccOptionName.Add (GetUniqueDCCOptionName(kMayaOptionName + version)); |
| 492 | + continue; |
506 | 493 | }
|
507 | 494 |
|
508 | 495 | if (product.StartsWith("3ds max", StringComparison.InvariantCultureIgnoreCase))
|
@@ -637,13 +624,6 @@ public static void AddDCCOption(string newOption, DCCType dcc){
|
637 | 624 | switch (dcc) {
|
638 | 625 | case DCCType.Maya:
|
639 | 626 | var version = AskMayaVersion(newOption);
|
640 |
| - |
641 |
| - // UNI-29074 TODO: add Maya LT support |
642 |
| - // make sure this is not Maya LT |
643 |
| - if (version.ToLower ().StartsWith ("lt")) { |
644 |
| - Debug.LogError (string.Format("Unity Integration does not support Maya LT: \"{0}\"", newOption)); |
645 |
| - return; |
646 |
| - } |
647 | 627 | optionName = GetUniqueDCCOptionName("Maya " + version);
|
648 | 628 | break;
|
649 | 629 | case DCCType.Max:
|
@@ -709,6 +689,11 @@ public static string GetSelectedDCCPath()
|
709 | 689 | return (instance.dccOptionPaths.Count>0) ? instance.dccOptionPaths [instance.selectedDCCApp] : "";
|
710 | 690 | }
|
711 | 691 |
|
| 692 | + public static string GetSelectedDCCName() |
| 693 | + { |
| 694 | + return (instance.dccOptionPaths.Count>0) ? instance.dccOptionNames [instance.selectedDCCApp] : ""; |
| 695 | + } |
| 696 | + |
712 | 697 | /// <summary>
|
713 | 698 | /// The path where Convert To Model will save the new fbx and prefab.
|
714 | 699 | /// This is relative to the Application.dataPath ; it uses '/' as the
|
|
0 commit comments