Skip to content

Commit 683b1de

Browse files
authored
Merge pull request #214 from Unity-Technologies/UNI-31096-sprint34-release
Uni 31096 sprint34 release bug fixes
2 parents 986b981 + d0ee524 commit 683b1de

File tree

3 files changed

+48
-11
lines changed

3 files changed

+48
-11
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ public class ExportSettings : ScriptableSingleton<ExportSettings>
255255
public const string kMayaLtOptionName = "MayaLT ";
256256
public const string kBlenderOptionName = "Blender ";
257257

258+
private static string DefaultIntegrationSavePath {
259+
get{
260+
return Path.GetDirectoryName(Application.dataPath);
261+
}
262+
}
263+
258264
/// <summary>
259265
/// The paths where all the different versions of Maya are installed
260266
/// by default. Depends on the platform.
@@ -328,7 +334,7 @@ protected override void LoadDefaults()
328334
launchAfterInstallation = true;
329335
ExportFormatSelection = 0;
330336
convertToModelSavePath = kDefaultSavePath;
331-
IntegrationSavePath = Directory.GetCurrentDirectory().ToString();
337+
IntegrationSavePath = DefaultIntegrationSavePath;
332338
dccOptionPaths = null;
333339
dccOptionNames = null;
334340
}
@@ -760,7 +766,7 @@ public static string GetIntegrationSavePath()
760766
if (string.IsNullOrEmpty(instance.IntegrationSavePath.Trim()) || !Directory.Exists(instance.IntegrationSavePath))
761767
{
762768
//The project folder, above the asset folder
763-
Directory.GetCurrentDirectory().ToString();
769+
instance.IntegrationSavePath = DefaultIntegrationSavePath;
764770
}
765771
return instance.IntegrationSavePath;
766772
}

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

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,55 @@ 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`;
1722

1823
}
1924

2025
global proc unitySetupUI(){
21-
2226
$isHeadless = `optionVar -q "UnityFbxForMaya_Headless"`;
2327
if($isHeadless){
2428
// headless install, don't add UI
2529
return;
2630
}
31+
32+
evalDeferred -lowestPriority "unityInstallUI";
33+
}
34+
35+
global proc unityInstallUI(){
36+
global string $unityMenuName;
37+
global string $unityMenuDivider;
38+
global string $unityMenuLabel;
39+
global string $unityMenuInsertAfter;
40+
41+
global string $unityImportIconPath;
42+
global string $unityExportIconPath;
43+
global string $unityIconPath;
44+
45+
global string $unityFamilyLabel;
46+
global string $unityImportLabel;
47+
global string $unityExportLabel;
48+
49+
global string $unityCommandsFile;
50+
global string $unityImportMenuName;
51+
global string $unityExportMenuName;
52+
global string $unityImportCommand;
53+
global string $unityExportCommand;
54+
55+
global string $gMainFileMenu;
2756

28-
evalDeferred -lowestPriority "buildFileMenu; \
29-
$parentMenu = $gMainFileMenu; \
30-
$pluginVersion = unityWhatsNewVersion(); \
31-
source \"unityCommands.mel\"; \
32-
menuItem -parent $parentMenu -insertAfter $unityMenuInsertAfter -divider true -longDivider false -version $pluginVersion $unityMenuDivider; \
33-
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\";";
57+
buildFileMenu;
58+
$parentMenu = $gMainFileMenu;
59+
$pluginVersion = unityWhatsNewVersion();
60+
eval ("source " + $unityCommandsFile);
61+
menuItem -parent $parentMenu -insertAfter $unityMenuInsertAfter -divider true -longDivider false -version $pluginVersion $unityMenuDivider;
62+
menuItem -parent $parentMenu -insertAfter $unityMenuDivider -subMenu true -label $unityMenuLabel -tearOff true -version $pluginVersion -image $unityIconPath -annotation $unityFamilyLabel $unityMenuName;
63+
menuItem -parent $unityMenuName -label $unityImportMenuName -version $pluginVersion -image $unityImportIconPath -annotation $unityImportLabel -command $unityImportCommand;
64+
menuItem -parent $unityMenuName -label $unityExportMenuName -version $pluginVersion -image $unityExportIconPath -annotation $unityExportLabel -command $unityExportCommand;
3665
}

RELEASE_NOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ RELEASE NOTES
44

55
NEW FEATURES
66

7+
* Ship all C# scripts as source code
8+
79
* Added Maya LT Integration
810

911
Replaced Maya python implementation with MEL script, which is used by both Maya and Maya LT.

0 commit comments

Comments
 (0)