@@ -27,7 +27,7 @@ public override void OnInspectorGUI() {
27
27
GUILayout . Label ( "Version: " + version , EditorStyles . centeredGreyMiniLabel ) ;
28
28
EditorGUILayout . Space ( ) ;
29
29
}
30
-
30
+ GUILayout . BeginVertical ( ) ;
31
31
exportSettings . mayaCompatibleNames = EditorGUILayout . Toggle (
32
32
new GUIContent ( "Convert to Maya Compatible Naming:" ,
33
33
"In Maya some symbols such as spaces and accents get replaced when importing an FBX " +
@@ -49,7 +49,6 @@ public override void OnInspectorGUI() {
49
49
GUILayout . Label ( new GUIContent (
50
50
"Export Path:" ,
51
51
"Relative path for saving Model Prefabs." ) ) ;
52
-
53
52
var pathLabel = ExportSettings . GetRelativeSavePath ( ) ;
54
53
if ( pathLabel == "." ) { pathLabel = "(Assets root)" ; }
55
54
EditorGUILayout . SelectableLabel ( pathLabel ,
@@ -93,17 +92,13 @@ public override void OnInspectorGUI() {
93
92
GUILayout . Label ( new GUIContent (
94
93
"3D Application:" ,
95
94
"Select the 3D Application for which you would like to install the Unity integration." ) ) ;
96
-
95
+
97
96
// dropdown to select Maya version to use
98
97
var options = ExportSettings . GetDCCOptions ( ) ;
99
- // make sure we never initially have browse selected
100
- if ( exportSettings . selectedDCCApp == options . Length - 1 ) {
101
- exportSettings . selectedDCCApp = exportSettings . GetPreferredDCCApp ( ) ;
102
- }
103
98
104
99
int oldValue = exportSettings . selectedDCCApp ;
105
100
exportSettings . selectedDCCApp = EditorGUILayout . Popup ( exportSettings . selectedDCCApp , options ) ;
106
- if ( exportSettings . selectedDCCApp == options . Length - 1 ) {
101
+ if ( GUILayout . Button ( "Browse" , EditorStyles . miniButton , GUILayout . Width ( BrowseButtonWidth ) ) ) {
107
102
var ext = "" ;
108
103
switch ( Application . platform ) {
109
104
case RuntimePlatform . WindowsEditor :
@@ -149,8 +144,6 @@ public override void OnInspectorGUI() {
149
144
ExportSettings . AddDCCOption ( dccPath , foundDCC ) ;
150
145
}
151
146
Repaint ( ) ;
152
- } else {
153
- exportSettings . selectedDCCApp = oldValue ;
154
147
}
155
148
}
156
149
GUILayout . EndHorizontal ( ) ;
@@ -164,6 +157,7 @@ public override void OnInspectorGUI() {
164
157
165
158
GUILayout . FlexibleSpace ( ) ;
166
159
GUILayout . EndScrollView ( ) ;
160
+ GUILayout . EndVertical ( ) ;
167
161
168
162
if ( GUI . changed ) {
169
163
EditorUtility . SetDirty ( exportSettings ) ;
@@ -550,19 +544,17 @@ public static GUIContent[] GetDCCOptions(){
550
544
551
545
if ( instance . dccOptionPaths . Count <= 0 ) {
552
546
return new GUIContent [ ] {
553
- new GUIContent ( "<No 3D Application found>" ) ,
554
- new GUIContent ( "Browse..." )
547
+ new GUIContent ( "<No 3D Application found>" )
555
548
} ;
556
549
}
557
550
558
- GUIContent [ ] optionArray = new GUIContent [ instance . dccOptionPaths . Count + 1 ] ;
551
+ GUIContent [ ] optionArray = new GUIContent [ instance . dccOptionPaths . Count ] ;
559
552
for ( int i = 0 ; i < instance . dccOptionPaths . Count ; i ++ ) {
560
553
optionArray [ i ] = new GUIContent (
561
554
instance . dccOptionNames [ i ] ,
562
555
instance . dccOptionPaths [ i ]
563
556
) ;
564
557
}
565
- optionArray [ optionArray . Length - 1 ] = new GUIContent ( "Browse..." ) ;
566
558
567
559
return optionArray ;
568
560
}
0 commit comments