Skip to content

Commit c12b716

Browse files
committed
UNI-42756 code review fixes
- rename UnityHelpers to UnityGUI - update Import/Export menu names
1 parent 70c1380 commit c12b716

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ struct UnityExportHelpers (
316316
)
317317
)
318318

319-
struct UnityHelpers (
319+
struct UnityGUI (
320320
fn createUnityActionItem macroName category title parentMenu = (
321321
local unityAction = menuMan.createActionItem macroName category; --create an ActionItem from the MacroScript
322322
unityAction.setTitle title;
@@ -326,15 +326,15 @@ struct UnityHelpers (
326326
),
327327

328328
fn createUnityImportAction title parentMenu = (
329-
UnityHelpers.createUnityActionItem "UnityImport" "Unity" title parentMenu;
329+
UnityGUI.createUnityActionItem "UnityImport" "Unity" title parentMenu;
330330
),
331331

332332
fn createUnityExportAction title parentMenu = (
333-
UnityHelpers.createUnityActionItem "UnityExport" "Unity" title parentMenu;
333+
UnityGUI.createUnityActionItem "UnityExport" "Unity" title parentMenu;
334334
),
335335

336336
fn createUnityExportModelAction title parentMenu = (
337-
UnityHelpers.createUnityActionItem "UnityExportModel" "Unity" title parentMenu;
337+
UnityGUI.createUnityActionItem "UnityExportModel" "Unity" title parentMenu;
338338
),
339339

340340
fn unityResetExportOptions = (
@@ -365,9 +365,9 @@ if (maxVersion())[1] >= 20000 then(
365365
local exportMenu = getExportMenu()
366366
if importMenu != undefined and exportMenu != undefined do
367367
(
368-
local unityImportTitle = "Import from Unity"
368+
local unityImportTitle = "Import from Unity..."
369369
local unityExportTitle = "Export to Unity"
370-
local unityExportModelTitle = "Export Model Only to Unity"
370+
local unityExportModelTitle = "Export to Unity (Model Only)"
371371

372372
-- check if menu items already exist, delete if they do
373373
local foundUnityImport = false
@@ -390,9 +390,9 @@ if (maxVersion())[1] >= 20000 then(
390390
id = genClassID returnValue:true
391391
if menuMan.registerMenuContext id[1] then
392392
(
393-
global unityImportAction = UnityHelpers.createUnityImportAction unityImportTitle importMenu
394-
global unityExportAction = UnityHelpers.createUnityExportAction unityExportTitle exportMenu
395-
global unityExportModelAction = UnityHelpers.createUnityExportModelAction unityExportModelTitle exportMenu
393+
global unityImportAction = UnityGUI.createUnityImportAction unityImportTitle importMenu
394+
global unityExportAction = UnityGUI.createUnityExportAction unityExportTitle exportMenu
395+
global unityExportModelAction = UnityGUI.createUnityExportModelAction unityExportModelTitle exportMenu
396396

397397
menuMan.updateMenuBar() --update the menu bar
398398
)
@@ -417,8 +417,8 @@ if (maxVersion())[1] >= 20000 then(
417417

418418
-- when opening a new scene, reset the export options to make
419419
-- sure we don't accidentally overwrite anything
420-
callbacks.addScript #postSceneReset ("UnityHelpers.unityResetExportOptions()")
421-
callbacks.addScript #systemPreNew ("UnityHelpers.unityResetExportOptions()")
420+
callbacks.addScript #postSceneReset ("UnityGUI.unityResetExportOptions()")
421+
callbacks.addScript #systemPreNew ("UnityGUI.unityResetExportOptions()")
422422
)
423423
else if (maxVersion())[1] == 19000 then (
424424
-- for 3ds Max 2017
@@ -433,7 +433,7 @@ else if (maxVersion())[1] == 19000 then (
433433
-- Setup UI
434434
fn setupUnityPluginUI = (
435435
local unityMenu = getUnityMenu()
436-
local unityImportTitle = "Import"
436+
local unityImportTitle = "Import..."
437437
local unityExportTitle = "Export"
438438
local unityExportModelTitle = "Export Model Only"
439439
if unityMenu != undefined do
@@ -450,9 +450,9 @@ else if (maxVersion())[1] == 19000 then (
450450
local unityMenuItem = menuMan.createSubMenuItem unityMenuName unityMenu
451451
mainMenuBar.addItem unityMenuItem (mainMenuBar.numItems())
452452

453-
UnityHelpers.createUnityImportAction unityImportTitle unityMenu
454-
UnityHelpers.createUnityExportAction unityExportTitle unityMenu
455-
UnityHelpers.createUnityExportModelAction unityExportModelTitle unityMenu
453+
UnityGUI.createUnityImportAction unityImportTitle unityMenu
454+
UnityGUI.createUnityExportAction unityExportTitle unityMenu
455+
UnityGUI.createUnityExportModelAction unityExportModelTitle unityMenu
456456

457457
menuMan.updateMenuBar() --update the menu bar
458458
)
@@ -469,8 +469,8 @@ else if (maxVersion())[1] == 19000 then (
469469

470470
-- when opening a new scene, reset the export options to make
471471
-- sure we don't accidentally overwrite anything
472-
callbacks.addScript #postSceneReset ("UnityHelpers.unityResetExportOptions()")
473-
callbacks.addScript #systemPreNew ("UnityHelpers.unityResetExportOptions()")
472+
callbacks.addScript #postSceneReset ("UnityGUI.unityResetExportOptions()")
473+
callbacks.addScript #systemPreNew ("UnityGUI.unityResetExportOptions()")
474474
)
475475
else(
476476
print "Error: Unity Integration only supports 3ds Max 2017 or later"

0 commit comments

Comments
 (0)