Skip to content

Commit 7f06b71

Browse files
committed
replace tabs with spaces
1 parent c12b716 commit 7f06b71

File tree

1 file changed

+100
-100
lines changed

1 file changed

+100
-100
lines changed

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

Lines changed: 100 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -344,49 +344,49 @@ struct UnityGUI (
344344

345345
-- Setup UI in existing Import/Export menus if using 3ds Max 2018+
346346
if (maxVersion())[1] >= 20000 then(
347-
global importMenuName = "File-Import"
348-
global exportMenuName = "File-Export"
349-
350-
-- get the import menu
351-
global getImportMenu
352-
fn getImportMenu = (
353-
menuMan.findMenu importMenuName
354-
);
347+
global importMenuName = "File-Import"
348+
global exportMenuName = "File-Export"
349+
350+
-- get the import menu
351+
global getImportMenu
352+
fn getImportMenu = (
353+
menuMan.findMenu importMenuName
354+
);
355355

356-
-- get the export menu
357-
global getExportMenu
358-
fn getExportMenu = (
359-
menuMan.findMenu exportMenuName
360-
);
361-
362-
-- Setup UI
363-
fn setupUnityPluginUI = (
364-
local importMenu = getImportMenu()
365-
local exportMenu = getExportMenu()
366-
if importMenu != undefined and exportMenu != undefined do
367-
(
368-
local unityImportTitle = "Import from Unity..."
369-
local unityExportTitle = "Export to Unity"
356+
-- get the export menu
357+
global getExportMenu
358+
fn getExportMenu = (
359+
menuMan.findMenu exportMenuName
360+
);
361+
362+
-- Setup UI
363+
fn setupUnityPluginUI = (
364+
local importMenu = getImportMenu()
365+
local exportMenu = getExportMenu()
366+
if importMenu != undefined and exportMenu != undefined do
367+
(
368+
local unityImportTitle = "Import from Unity..."
369+
local unityExportTitle = "Export to Unity"
370370
local unityExportModelTitle = "Export to Unity (Model Only)"
371-
372-
-- check if menu items already exist, delete if they do
373-
local foundUnityImport = false
374-
for i=1 to importMenu.numItems() while not foundUnityImport do(
375-
local mi = importMenu.getItem i
376-
if mi.getTitle() == unityImportTitle then(
377-
importMenu.removeItem mi
378-
foundUnityImport = true
379-
)
380-
)
381-
local foundUnityExport = false
382-
for i=1 to exportMenu.numItems() while not foundUnityExport do(
383-
local mi = exportMenu.getItem i
384-
if mi.getTitle() == unityExportTitle then(
385-
exportMenu.removeItem mi
386-
foundUnityExport = true
387-
)
388-
)
389-
371+
372+
-- check if menu items already exist, delete if they do
373+
local foundUnityImport = false
374+
for i=1 to importMenu.numItems() while not foundUnityImport do(
375+
local mi = importMenu.getItem i
376+
if mi.getTitle() == unityImportTitle then(
377+
importMenu.removeItem mi
378+
foundUnityImport = true
379+
)
380+
)
381+
local foundUnityExport = false
382+
for i=1 to exportMenu.numItems() while not foundUnityExport do(
383+
local mi = exportMenu.getItem i
384+
if mi.getTitle() == unityExportTitle then(
385+
exportMenu.removeItem mi
386+
foundUnityExport = true
387+
)
388+
)
389+
390390
id = genClassID returnValue:true
391391
if menuMan.registerMenuContext id[1] then
392392
(
@@ -396,76 +396,76 @@ if (maxVersion())[1] >= 20000 then(
396396

397397
menuMan.updateMenuBar() --update the menu bar
398398
)
399-
)
400-
);
401-
setupUnityPluginUI()
399+
)
400+
);
401+
setupUnityPluginUI()
402402

403-
-- Make sure that Menu gets removed at shutdown, force menu to reload each time Max is opened
404-
callbacks.addScript #preSavingMenus (
405-
"importMenu = getImportMenu(); \
406-
exportMenu = getExportMenu(); \
407-
if importMenu != undefined and unityImportAction != undefined then( \
408-
importMenu.removeItem unityImportAction; \
409-
) \
410-
if exportMenu != undefined and unityExportAction != undefined then( \
411-
exportMenu.removeItem unityExportAction; \
412-
) \
413-
if exportMenu != undefined and unityExportModelAction != undefined then( \
414-
exportMenu.removeItem unityExportModelAction; \
415-
)"
416-
)
403+
-- Make sure that Menu gets removed at shutdown, force menu to reload each time Max is opened
404+
callbacks.addScript #preSavingMenus (
405+
"importMenu = getImportMenu(); \
406+
exportMenu = getExportMenu(); \
407+
if importMenu != undefined and unityImportAction != undefined then( \
408+
importMenu.removeItem unityImportAction; \
409+
) \
410+
if exportMenu != undefined and unityExportAction != undefined then( \
411+
exportMenu.removeItem unityExportAction; \
412+
) \
413+
if exportMenu != undefined and unityExportModelAction != undefined then( \
414+
exportMenu.removeItem unityExportModelAction; \
415+
)"
416+
)
417417

418418
-- when opening a new scene, reset the export options to make
419419
-- sure we don't accidentally overwrite anything
420420
callbacks.addScript #postSceneReset ("UnityGUI.unityResetExportOptions()")
421421
callbacks.addScript #systemPreNew ("UnityGUI.unityResetExportOptions()")
422422
)
423423
else if (maxVersion())[1] == 19000 then (
424-
-- for 3ds Max 2017
425-
426-
global unityMenuName = "Unity"
427-
428-
global getUnityMenu
429-
fn getUnityMenu = (
430-
menuMan.findMenu unityMenuName
431-
);
432-
433-
-- Setup UI
434-
fn setupUnityPluginUI = (
435-
local unityMenu = getUnityMenu()
436-
local unityImportTitle = "Import..."
437-
local unityExportTitle = "Export"
424+
-- for 3ds Max 2017
425+
426+
global unityMenuName = "Unity"
427+
428+
global getUnityMenu
429+
fn getUnityMenu = (
430+
menuMan.findMenu unityMenuName
431+
);
432+
433+
-- Setup UI
434+
fn setupUnityPluginUI = (
435+
local unityMenu = getUnityMenu()
436+
local unityImportTitle = "Import..."
437+
local unityExportTitle = "Export"
438438
local unityExportModelTitle = "Export Model Only"
439-
if unityMenu != undefined do
440-
(
441-
-- remove the menu if it still exists
442-
menuMan.unRegisterMenu unityMenu
443-
)
444-
445-
id = genClassID returnValue:true
446-
if menuMan.registerMenuContext id[1] then
447-
(
448-
local mainMenuBar = menuMan.getMainMenuBar()
449-
local unityMenu = menuMan.createMenu unityMenuName
450-
local unityMenuItem = menuMan.createSubMenuItem unityMenuName unityMenu
451-
mainMenuBar.addItem unityMenuItem (mainMenuBar.numItems())
452-
453-
UnityGUI.createUnityImportAction unityImportTitle unityMenu
454-
UnityGUI.createUnityExportAction unityExportTitle unityMenu
439+
if unityMenu != undefined do
440+
(
441+
-- remove the menu if it still exists
442+
menuMan.unRegisterMenu unityMenu
443+
)
444+
445+
id = genClassID returnValue:true
446+
if menuMan.registerMenuContext id[1] then
447+
(
448+
local mainMenuBar = menuMan.getMainMenuBar()
449+
local unityMenu = menuMan.createMenu unityMenuName
450+
local unityMenuItem = menuMan.createSubMenuItem unityMenuName unityMenu
451+
mainMenuBar.addItem unityMenuItem (mainMenuBar.numItems())
452+
453+
UnityGUI.createUnityImportAction unityImportTitle unityMenu
454+
UnityGUI.createUnityExportAction unityExportTitle unityMenu
455455
UnityGUI.createUnityExportModelAction unityExportModelTitle unityMenu
456-
457-
menuMan.updateMenuBar() --update the menu bar
458-
)
459-
);
460-
setupUnityPluginUI()
456+
457+
menuMan.updateMenuBar() --update the menu bar
458+
)
459+
);
460+
setupUnityPluginUI()
461461

462-
-- Make sure that Menu gets removed at shutdown, force menu to reload each time Max is opened
463-
callbacks.addScript #preSavingMenus (
464-
"unityMenu = getUnityMenu(); \
465-
if unityMenu != undefined do ( \
466-
menuMan.unRegisterMenu unityMenu; \
467-
)"
468-
)
462+
-- Make sure that Menu gets removed at shutdown, force menu to reload each time Max is opened
463+
callbacks.addScript #preSavingMenus (
464+
"unityMenu = getUnityMenu(); \
465+
if unityMenu != undefined do ( \
466+
menuMan.unRegisterMenu unityMenu; \
467+
)"
468+
)
469469

470470
-- when opening a new scene, reset the export options to make
471471
-- sure we don't accidentally overwrite anything

0 commit comments

Comments
 (0)