@@ -16,21 +16,22 @@ global string $unityImportMenuName = "Import";
16
16
global string $unityExportMenuName = "Export";
17
17
global string $unityImportCommand = "unityImport";
18
18
global string $unityExportCommand = "unityExport";
19
- global string $unityRemoveSendToUnityMenuOption = "UnityFbxForMaya_removeSendToUnityMenu";
20
- global string $unitySendToUnityMenuName = "sendToUnityMenu";
21
19
22
20
global proc string unityWhatsNewVersion(){
23
21
return `about -q -version`;
24
22
25
23
}
26
24
27
25
global proc unitySetupUI(){
28
-
26
+ global string $unityCommandsFile;
29
27
$isHeadless = `optionVar -q "UnityFbxForMaya_Headless"`;
30
28
if($isHeadless){
31
29
// headless install, don't add UI
32
30
return;
33
31
}
32
+
33
+ eval ("source " + $unityCommandsFile);
34
+ loadUnityDependencies();
34
35
35
36
evalDeferred -lowestPriority "unityInstallUI";
36
37
}
@@ -55,9 +56,6 @@ global proc unityInstallUI(){
55
56
global string $unityImportCommand;
56
57
global string $unityExportCommand;
57
58
58
- global string $unityRemoveSendToUnityMenuOption;
59
- global string $unitySendToUnityMenuName;
60
-
61
59
global string $gMainFileMenu;
62
60
63
61
buildFileMenu;
@@ -68,10 +66,7 @@ global proc unityInstallUI(){
68
66
menuItem -parent $parentMenu -insertAfter $unityMenuDivider -subMenu true -label $unityMenuLabel -tearOff true -version $pluginVersion -image $unityIconPath -annotation $unityFamilyLabel $unityMenuName;
69
67
menuItem -parent $unityMenuName -label $unityImportMenuName -version $pluginVersion -image $unityImportIconPath -annotation $unityImportLabel -command $unityImportCommand;
70
68
menuItem -parent $unityMenuName -label $unityExportMenuName -version $pluginVersion -image $unityExportIconPath -annotation $unityExportLabel -command $unityExportCommand;
71
-
72
- $unityRemoveSendToUnityMenuOption = `optionVar -q $unityRemoveSendToUnityMenuOption`;
73
- if($unityRemoveSendToUnityMenuOption && `menu -exists $unitySendToUnityMenuName`){
74
- menu -e -visible false $unitySendToUnityMenuName;
75
- }
69
+
70
+ unityRemoveNativeMenuOnLoad();
76
71
77
72
}
0 commit comments