Skip to content

Commit 866ddcc

Browse files
author
AJubrey
committed
[CHANGED] replaced the prompt in the decompression function
[REMOVED] the ui which set the integrations path
1 parent cd0309f commit 866ddcc

File tree

2 files changed

+7
-34
lines changed

2 files changed

+7
-34
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -97,38 +97,6 @@ public override void OnInspectorGUI() {
9797
}
9898
GUILayout.EndHorizontal ();
9999

100-
GUILayout.BeginHorizontal ();
101-
GUILayout.Label (new GUIContent (
102-
"Integrations Path:",
103-
"Installation path for 3D application integrations."), GUILayout.Width(LabelWidth - 3));
104-
105-
var IntegrationsPathLabel = ExportSettings.GetIntegrationSavePath();
106-
EditorGUILayout.SelectableLabel(IntegrationsPathLabel,
107-
EditorStyles.textField,
108-
GUILayout.MinWidth(SelectableLabelMinWidth),
109-
GUILayout.Height(EditorGUIUtility.singleLineHeight));
110-
111-
if (GUILayout.Button(new GUIContent("...", "Browse to a new installation path for 3D application integrations"), EditorStyles.miniButton, GUILayout.Width(BrowseButtonWidth)))
112-
{
113-
string initialPath = ExportSettings.GetIntegrationSavePath();
114-
115-
string fullPath = EditorUtility.OpenFolderPanel(
116-
"Select Integrations Path", initialPath, null
117-
);
118-
119-
if (!string.IsNullOrEmpty(fullPath))
120-
{
121-
ExportSettings.SetIntegrationSavePath(fullPath);
122-
123-
// Make sure focus is removed from the selectable label
124-
// otherwise it won't update
125-
GUIUtility.hotControl = 0;
126-
GUIUtility.keyboardControl = 0;
127-
}
128-
}
129-
130-
GUILayout.EndHorizontal();
131-
132100
EditorGUILayout.Space ();
133101

134102
GUILayout.BeginHorizontal ();

Assets/FbxExporters/Editor/InstallIntegration.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,13 @@ private static bool GetIntegrationFolder(DCCIntegration dcc){
742742

743743
private static bool DecompressIntegrationZipFile(string zipPath, DCCIntegration dcc)
744744
{
745-
string unzipFolder;
746-
unzipFolder = EditorTools.ExportSettings.GetIntegrationSavePath();
745+
// prompt user to enter location to unzip file
746+
var unzipFolder = EditorUtility.OpenFolderPanel(string.Format("Select Location to Save {0} Integration", dcc.DccDisplayName), EditorTools.ExportSettings.GetIntegrationSavePath(), "");
747+
if (string.IsNullOrEmpty(unzipFolder))
748+
{
749+
// user has cancelled, do nothing
750+
return false;
751+
}
747752

748753
// check that this is a valid location to unzip the file
749754
if (!DirectoryHasWritePermission (unzipFolder)) {

0 commit comments

Comments
 (0)