@@ -3539,7 +3539,7 @@ public void Dispose ()
3539
3539
private string m_tempFilePath { get ; set ; }
3540
3540
private string m_lastFilePath { get ; set ; }
3541
3541
3542
- const string Extension = "fbx" ;
3542
+ const string kFBXFileExtension = "fbx" ;
3543
3543
3544
3544
public enum AnimationExportType {
3545
3545
timelineAnimationClip ,
@@ -3549,7 +3549,7 @@ public enum AnimationExportType{
3549
3549
}
3550
3550
3551
3551
3552
- private static string MakeFileName ( string basename = "test" , string extension = "fbx" )
3552
+ private static string MakeFileName ( string basename = "test" , string extension = kFBXFileExtension )
3553
3553
{
3554
3554
return basename + "." + extension ;
3555
3555
}
@@ -3560,11 +3560,9 @@ private static string GetExportFilePath(string filenameSuggestion = ""){
3560
3560
? Application . dataPath
3561
3561
: System . IO . Path . GetDirectoryName ( LastFilePath ) ;
3562
3562
3563
- var title = string . Format ( "Export Model FBX ({0})" , FileBaseName ) ;
3563
+ var title = string . Format ( "Export To FBX ({0})" , FileBaseName ) ;
3564
3564
3565
- var filePath = EditorUtility . SaveFilePanel ( title , directory , filenameSuggestion , "fbx" ) ;
3566
-
3567
- return filePath ;
3565
+ return EditorUtility . SaveFilePanel ( title , directory , filenameSuggestion , kFBXFileExtension ) ;
3568
3566
}
3569
3567
3570
3568
private static void OnExport ( AnimationExportType exportType = AnimationExportType . all )
@@ -3574,10 +3572,10 @@ private static void OnExport (AnimationExportType exportType = AnimationExportTy
3574
3572
GameObject [ ] selectedGOs = Selection . GetFiltered < GameObject > ( SelectionMode . TopLevel ) ;
3575
3573
string filename = null ;
3576
3574
if ( selectedGOs . Length == 1 ) {
3577
- filename = ConvertToValidFilename ( selectedGOs [ 0 ] . name + ".fbx" ) ;
3575
+ filename = ConvertToValidFilename ( selectedGOs [ 0 ] . name + "." + kFBXFileExtension ) ;
3578
3576
} else {
3579
3577
filename = string . IsNullOrEmpty ( LastFilePath )
3580
- ? MakeFileName ( basename : FileBaseName , extension : Extension )
3578
+ ? MakeFileName ( basename : FileBaseName , extension : kFBXFileExtension )
3581
3579
: System . IO . Path . GetFileName ( LastFilePath ) ;
3582
3580
}
3583
3581
0 commit comments