Skip to content

Commit 07073b8

Browse files
committed
replace strings with vars to avoid Windows/Mac quote escaping inconsistencies
1 parent 4755812 commit 07073b8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Assets/Integrations/Autodesk/maya/scripts/unitySetupUI.mel

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ global string $unityFamilyLabel = "The UnityFbxForMaya plugin allows you to reli
1111
global string $unityImportLabel = "Import FBX file from Unity Project and auto-configure for exporting";
1212
global string $unityExportLabel = "Export Model to Unity";
1313

14+
global string $unityCommandsFile = "unityCommands.mel";
15+
global string $unityImportMenuName = "Import";
16+
global string $unityExportMenuName = "Export";
17+
global string $unityImportCommand = "unityImport";
18+
global string $unityExportCommand = "unityExport";
1419

1520
global proc string unityWhatsNewVersion(){
1621
return `about -q -version`;
@@ -28,9 +33,9 @@ global proc unitySetupUI(){
2833
evalDeferred -lowestPriority "buildFileMenu; \
2934
$parentMenu = $gMainFileMenu; \
3035
$pluginVersion = unityWhatsNewVersion(); \
31-
source \"unityCommands.mel\"; \
36+
source $unityCommandsFile; \
3237
menuItem -parent $parentMenu -insertAfter $unityMenuInsertAfter -divider true -longDivider false -version $pluginVersion $unityMenuDivider; \
3338
menuItem -parent $parentMenu -insertAfter $unityMenuDivider -subMenu true -label $unityMenuLabel -tearOff true -version $pluginVersion -image $unityIconPath -annotation $unityFamilyLabel $unityMenuName; \
34-
menuItem -parent $unityMenuName -label \"Import\" -version $pluginVersion -image $unityImportIconPath -annotation $unityImportLabel -command \"unityImport\"; \
35-
menuItem -parent $unityMenuName -label \"Export\" -version $pluginVersion -image $unityExportIconPath -annotation $unityExportLabel -command \"unityExport\";";
39+
menuItem -parent $unityMenuName -label $unityImportMenuName -version $pluginVersion -image $unityImportIconPath -annotation $unityImportLabel -command $unityImportCommand; \
40+
menuItem -parent $unityMenuName -label $unityExportMenuName -version $pluginVersion -image $unityExportIconPath -annotation $unityExportLabel -command $unityExportCommand;";
3641
}

0 commit comments

Comments
 (0)