@@ -82,14 +82,8 @@ public class ModelExporter : System.IDisposable
82
82
// from being passed to command, thus resulting in OnContextItem()
83
83
// being called only once regardless of what is selected.
84
84
const string MenuItemName = "GameObject/Export To FBX..." ;
85
- const string ModelOnlyMenuItemName = "GameObject/Export Model Only..." ;
86
85
87
- const string ClipMenuItemName = "GameObject/Export All Recorded Animation Clips..." ;
88
- const string TimelineClipMenuItemName = "GameObject/Export Selected Timeline Clip..." ;
89
-
90
- const string AnimOnlyMenuItemName = "GameObject/Export Animation Only..." ;
91
-
92
- const string FileBaseName = "Untitled" ;
86
+ const string TimelineClipMenuItemName = "GameObject/Export Selected Timeline Clip..." ;
93
87
94
88
const string ProgressBarTitle = "Fbx Export" ;
95
89
@@ -3112,40 +3106,6 @@ public static bool OnValidateMenuItem ()
3112
3106
return true ;
3113
3107
}
3114
3108
3115
- /// <summary>
3116
- /// Validate the menu item defined by the function ModelOnlyOnContextItem.
3117
- /// </summary>
3118
- [ MenuItem ( ModelOnlyMenuItemName , true , 30 ) ]
3119
- public static bool ModelOnlyOnValidateMenuItem ( )
3120
- {
3121
- return true ;
3122
- }
3123
-
3124
- /// <summary>
3125
- // Validate the menu item defined by the function above.
3126
- /// </summary>
3127
- [ MenuItem ( AnimOnlyMenuItemName , true , 30 ) ]
3128
- public static bool OnValidateAnimOnlyMenuItem ( )
3129
- {
3130
- Object [ ] selection = Selection . objects ;
3131
-
3132
- if ( selection == null || selection . Length == 0 )
3133
- {
3134
- return false ;
3135
- }
3136
-
3137
- foreach ( Object obj in selection )
3138
- {
3139
- GameObject gameObj = obj as GameObject ;
3140
- if ( gameObj != null && ( gameObj . GetComponent < Animation > ( ) != null || gameObj . GetComponent < Animator > ( ) != null ) )
3141
- {
3142
- return true ;
3143
- }
3144
- }
3145
-
3146
- return false ;
3147
- }
3148
-
3149
3109
public static void DisplayNoSelectionDialog ( )
3150
3110
{
3151
3111
UnityEditor . EditorUtility . DisplayDialog (
@@ -3596,18 +3556,7 @@ private static string MakeFileName (string basename = "test", string extension =
3596
3556
{
3597
3557
return basename + "." + extension ;
3598
3558
}
3599
-
3600
-
3601
- private static string GetExportFilePath ( string filenameSuggestion = "" ) {
3602
- var directory = string . IsNullOrEmpty ( LastFilePath )
3603
- ? Application . dataPath
3604
- : System . IO . Path . GetDirectoryName ( LastFilePath ) ;
3605
-
3606
- var title = string . Format ( "Export To FBX ({0})" , FileBaseName ) ;
3607
-
3608
- return EditorUtility . SaveFilePanel ( title , directory , filenameSuggestion , kFBXFileExtension ) ;
3609
- }
3610
-
3559
+
3611
3560
private static void OnExport ( )
3612
3561
{
3613
3562
GameObject [ ] selectedGOs = Selection . GetFiltered < GameObject > ( SelectionMode . TopLevel ) ;
0 commit comments