Skip to content

Commit 22c5eeb

Browse files
committed
move install button to FbxExporter menu
1 parent 170d230 commit 22c5eeb

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,6 @@ public override void OnInspectorGUI() {
161161
FbxExporters.Editor.IntegrationsUI.InstallMayaIntegration ();
162162
}
163163

164-
if (GUILayout.Button ("Install Max Integration")) {
165-
FbxExporters.Editor.MaxIntegration.InstallMaxPlugin ();
166-
}
167-
168164
GUILayout.FlexibleSpace ();
169165
GUILayout.EndScrollView ();
170166

Assets/FbxExporters/Editor/InstallIntegration.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,6 @@ public static int InstallMaxPlugin(){
449449
myProcess.StartInfo.Arguments = string.Format("-q -silent -mxs \"{0}\"", installScript);
450450
#endif
451451
myProcess.EnableRaisingEvents = true;
452-
453-
Debug.Log("args: " + myProcess.StartInfo.Arguments);
454-
455452
myProcess.Start();
456453
myProcess.WaitForExit();
457454
ExitCode = myProcess.ExitCode;
@@ -465,5 +462,23 @@ public static int InstallMaxPlugin(){
465462
}
466463
return ExitCode;
467464
}
465+
466+
}
467+
468+
class MaxIntegrationUI{
469+
[MenuItem("FbxExporters/Install Max Integration", false, 0)]
470+
static void OnMenuItem (MenuCommand command)
471+
{
472+
int exitCode = MaxIntegration.InstallMaxPlugin ();
473+
string title, message;
474+
if (exitCode != 0) {
475+
title = "Failed to install 3DsMax Integration.";
476+
message = string.Format("Failed to configure 3DsMax, please check logs (exitcode={0}).", exitCode);
477+
} else {
478+
title = "Completed installation of 3DsMax Integration.";
479+
message = "Enjoy the new \"Unity\" menu in 3DsMax.";
480+
}
481+
UnityEditor.EditorUtility.DisplayDialog (title, message, "Ok");
482+
}
468483
}
469484
}

0 commit comments

Comments
 (0)