@@ -316,7 +316,7 @@ struct UnityExportHelpers (
316
316
)
317
317
)
318
318
319
- struct UnityHelpers (
319
+ struct UnityGUI (
320
320
fn createUnityActionItem macroName category title parentMenu = (
321
321
local unityAction = menuMan.createActionItem macroName category; -- create an ActionItem from the MacroScript
322
322
unityAction.setTitle title;
@@ -326,15 +326,15 @@ struct UnityHelpers (
326
326
),
327
327
328
328
fn createUnityImportAction title parentMenu = (
329
- UnityHelpers .createUnityActionItem " UnityImport" " Unity" title parentMenu;
329
+ UnityGUI .createUnityActionItem " UnityImport" " Unity" title parentMenu;
330
330
),
331
331
332
332
fn createUnityExportAction title parentMenu = (
333
- UnityHelpers .createUnityActionItem " UnityExport" " Unity" title parentMenu;
333
+ UnityGUI .createUnityActionItem " UnityExport" " Unity" title parentMenu;
334
334
),
335
335
336
336
fn createUnityExportModelAction title parentMenu = (
337
- UnityHelpers .createUnityActionItem " UnityExportModel" " Unity" title parentMenu;
337
+ UnityGUI .createUnityActionItem " UnityExportModel" " Unity" title parentMenu;
338
338
),
339
339
340
340
fn unityResetExportOptions = (
@@ -365,9 +365,9 @@ if (maxVersion())[1] >= 20000 then(
365
365
local exportMenu = getExportMenu()
366
366
if importMenu != undefined and exportMenu != undefined do
367
367
(
368
- local unityImportTitle = " Import from Unity"
368
+ local unityImportTitle = " Import from Unity... "
369
369
local unityExportTitle = " Export to Unity"
370
- local unityExportModelTitle = " Export Model Only to Unity"
370
+ local unityExportModelTitle = " Export to Unity (Model Only) "
371
371
372
372
-- check if menu items already exist, delete if they do
373
373
local foundUnityImport = false
@@ -390,9 +390,9 @@ if (maxVersion())[1] >= 20000 then(
390
390
id = genClassID returnValue: true
391
391
if menuMan.registerMenuContext id[1 ] then
392
392
(
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
396
396
397
397
menuMan.updateMenuBar() -- update the menu bar
398
398
)
@@ -417,8 +417,8 @@ if (maxVersion())[1] >= 20000 then(
417
417
418
418
-- when opening a new scene, reset the export options to make
419
419
-- 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()" )
422
422
)
423
423
else if (maxVersion())[1 ] == 19000 then (
424
424
-- for 3ds Max 2017
@@ -433,7 +433,7 @@ else if (maxVersion())[1] == 19000 then (
433
433
-- Setup UI
434
434
fn setupUnityPluginUI = (
435
435
local unityMenu = getUnityMenu()
436
- local unityImportTitle = " Import"
436
+ local unityImportTitle = " Import... "
437
437
local unityExportTitle = " Export"
438
438
local unityExportModelTitle = " Export Model Only"
439
439
if unityMenu != undefined do
@@ -450,9 +450,9 @@ else if (maxVersion())[1] == 19000 then (
450
450
local unityMenuItem = menuMan.createSubMenuItem unityMenuName unityMenu
451
451
mainMenuBar.addItem unityMenuItem (mainMenuBar.numItems())
452
452
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
456
456
457
457
menuMan.updateMenuBar() -- update the menu bar
458
458
)
@@ -469,8 +469,8 @@ else if (maxVersion())[1] == 19000 then (
469
469
470
470
-- when opening a new scene, reset the export options to make
471
471
-- 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()" )
474
474
)
475
475
else (
476
476
print " Error: Unity Integration only supports 3ds Max 2017 or later"
0 commit comments