Skip to content

Commit 2da6eb0

Browse files
committed
code review fixes
-show popup if trying to install to 3dsmax 2016 or earlier -remove log when trying to find 3dsmax in default location -reword logging of exit code -change warning to error in max plugin
1 parent 0795da4 commit 2da6eb0

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,12 @@ public override void OnInspectorGUI() {
135135
ExportSettings.DCCType foundDCC = ExportSettings.DCCType.Maya;
136136
var foundDCCPath = TryFindDCC (dccPath, ext, ExportSettings.DCCType.Maya);
137137
if (foundDCCPath == null && Application.platform == RuntimePlatform.WindowsEditor) {
138-
if (!ExportSettings.IsEarlierThanMax2017 (dccPath)) {
139-
Debug.LogWarning ("Earlier than 3ds Max 2017 is not supported");
138+
if (ExportSettings.IsEarlierThanMax2017 (dccPath)) {
139+
Debug.LogError ("Earlier than 3ds Max 2017 is not supported");
140+
UnityEditor.EditorUtility.DisplayDialog (
141+
"Error adding 3D Application",
142+
"Unity Integration only supports 3ds Max 2017 or later",
143+
"Ok");
140144
} else {
141145
foundDCCPath = TryFindDCC (dccPath, ext, ExportSettings.DCCType.Max);
142146
foundDCC = ExportSettings.DCCType.Max;
@@ -348,8 +352,7 @@ private static void FindDCCInstalls() {
348352

349353
if (product.StartsWith ("3ds max", StringComparison.InvariantCultureIgnoreCase)) {
350354
var exePath = string.Format ("{0}/{1}", productDir.FullName.Replace ("\\", "/"), "3dsmax.exe");
351-
if (!IsEarlierThanMax2017 (exePath)) {
352-
Debug.LogWarning ("Earlier than 3ds Max 2017 is not supported");
355+
if (IsEarlierThanMax2017 (exePath)) {
353356
continue;
354357
}
355358
string version = product.Substring ("3ds max ".Length);

Assets/FbxExporters/Editor/InstallIntegration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ public static int InstallMaxPlugin(string maxExe){
534534

535535
// TODO (UNI-29910): figure out what exactly causes this exit code + how to resolve
536536
if(ExitCode == -1073740791){
537-
Debug.LogWarning(string.Format("3ds Max exited with code: {0}, ignoring as this does not affect plugin installation", ExitCode));
537+
Debug.Log(string.Format("Detected 3ds max exitcode {0} -- safe to ignore", ExitCode));
538538
ExitCode = 0;
539539
}
540540

Assets/Integrations/Autodesk/max/scripts/UnityFbxForMaxPlugin.ms

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,5 +213,5 @@ else if (maxVersion())[1] == 19000 then (
213213
)
214214
)
215215
else(
216-
print "Warning: Unity Integration not supported for 3ds Max versions earlier than 3ds Max 2017"
216+
print "Error: Unity Integration only supports 3ds Max 2017 or later"
217217
)

0 commit comments

Comments
 (0)