Skip to content

Commit 51a7e9d

Browse files
committed
code review fixes
1 parent 24521b9 commit 51a7e9d

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3539,7 +3539,7 @@ public void Dispose ()
35393539
private string m_tempFilePath { get; set; }
35403540
private string m_lastFilePath { get; set; }
35413541

3542-
const string Extension = "fbx";
3542+
const string kFBXFileExtension = "fbx";
35433543

35443544
public enum AnimationExportType{
35453545
timelineAnimationClip,
@@ -3549,7 +3549,7 @@ public enum AnimationExportType{
35493549
}
35503550

35513551

3552-
private static string MakeFileName (string basename = "test", string extension = "fbx")
3552+
private static string MakeFileName (string basename = "test", string extension = kFBXFileExtension)
35533553
{
35543554
return basename + "." + extension;
35553555
}
@@ -3560,11 +3560,9 @@ private static string GetExportFilePath(string filenameSuggestion = ""){
35603560
? Application.dataPath
35613561
: System.IO.Path.GetDirectoryName (LastFilePath);
35623562

3563-
var title = string.Format ("Export Model FBX ({0})", FileBaseName);
3563+
var title = string.Format ("Export To FBX ({0})", FileBaseName);
35643564

3565-
var filePath = EditorUtility.SaveFilePanel (title, directory, filenameSuggestion, "fbx");
3566-
3567-
return filePath;
3565+
return EditorUtility.SaveFilePanel (title, directory, filenameSuggestion, kFBXFileExtension);
35683566
}
35693567

35703568
private static void OnExport (AnimationExportType exportType = AnimationExportType.all)
@@ -3574,10 +3572,10 @@ private static void OnExport (AnimationExportType exportType = AnimationExportTy
35743572
GameObject [] selectedGOs = Selection.GetFiltered<GameObject> (SelectionMode.TopLevel);
35753573
string filename = null;
35763574
if (selectedGOs.Length == 1) {
3577-
filename = ConvertToValidFilename (selectedGOs [0].name + ".fbx");
3575+
filename = ConvertToValidFilename (selectedGOs [0].name + "." + kFBXFileExtension);
35783576
} else {
35793577
filename = string.IsNullOrEmpty (LastFilePath)
3580-
? MakeFileName (basename: FileBaseName, extension: Extension)
3578+
? MakeFileName (basename: FileBaseName, extension: kFBXFileExtension)
35813579
: System.IO.Path.GetFileName (LastFilePath);
35823580
}
35833581

0 commit comments

Comments
 (0)