@@ -1281,7 +1281,7 @@ protected bool ExportInstance (GameObject unityGo, FbxNode fbxNode, FbxScene fbx
1281
1281
if ( materials != null )
1282
1282
{
1283
1283
foreach ( var mat in materials ) {
1284
- if ( MaterialMap . TryGetValue ( mat . name , out newMaterial ) ) ;
1284
+ if ( MaterialMap . TryGetValue ( mat . name , out newMaterial ) )
1285
1285
{
1286
1286
fbxNode . AddMaterial ( newMaterial ) ;
1287
1287
}
@@ -3044,7 +3044,7 @@ protected static bool ExportSingleEditorClip(Object editorClipSelected)
3044
3044
return false ;
3045
3045
}
3046
3046
3047
- public static void ExportSingleTimelineClip ( TimelineClip timelineClipSelected , GameObject animationTrackGObject , string folderPath = null )
3047
+ public static void ExportSingleTimelineClip ( TimelineClip timelineClipSelected , GameObject animationTrackGObject , string filePath = null )
3048
3048
{
3049
3049
3050
3050
UnityEngine . Object [ ] exportArray = new UnityEngine . Object [ ] {
@@ -3062,7 +3062,7 @@ public static void ExportSingleTimelineClip(TimelineClip timelineClipSelected, G
3062
3062
{
3063
3063
AnimFbxFormat = "{1}" ;
3064
3064
}
3065
- ExportModelEditorWindow . Init ( myArray , string . Format ( AnimFbxFormat , animationTrackGObject . name , timelineClipSelected . displayName ) , isTimelineAnim : true ) ;
3065
+ ExportModelEditorWindow . Init ( exportArray , string . Format ( AnimFbxFormat , animationTrackGObject . name , timelineClipSelected . displayName ) , isTimelineAnim : true ) ;
3066
3066
}
3067
3067
3068
3068
/// <summary>
@@ -3113,9 +3113,14 @@ public static void ExportAllTimelineClips(GameObject objectWithPlayableDirector,
3113
3113
3114
3114
GameObject atObject = pd . GetGenericBinding ( output . sourceObject ) as GameObject ;
3115
3115
// One file by animation clip
3116
- foreach ( TimelineClip timeLineClip in at . GetClips ( ) ) {
3117
- string filePath = string . Format ( AnimFbxFileFormat , folderPath , atObject . name , timeLineClip . displayName ) ;
3118
- UnityEngine . Object [ ] myArray = new UnityEngine . Object [ ] { atObject , timeLineClip . animationClip } ;
3116
+ foreach ( TimelineClip timelineClip in at . GetClips ( ) ) {
3117
+ string AnimFbxFormat = AnimFbxFileFormat ;
3118
+ if ( timelineClip . displayName . Contains ( "@" ) )
3119
+ {
3120
+ AnimFbxFormat = "{0}/{2}.fbx" ;
3121
+ }
3122
+ string filePath = string . Format ( AnimFbxFormat , folderPath , atObject . name , timelineClip . displayName ) ;
3123
+ UnityEngine . Object [ ] myArray = new UnityEngine . Object [ ] { atObject , timelineClip . animationClip } ;
3119
3124
ExportObjects ( filePath , myArray , exportOptions , timelineAnim : true ) ;
3120
3125
}
3121
3126
}
@@ -3146,33 +3151,6 @@ public static bool ValidateClipContextClick()
3146
3151
return false ;
3147
3152
}
3148
3153
3149
- public static void ExportAllTimelineClips ( GameObject objectWithPlayableDirector , string folderPath )
3150
- {
3151
- PlayableDirector pd = objectWithPlayableDirector . GetComponent < PlayableDirector > ( ) ;
3152
- if ( pd != null )
3153
- {
3154
- foreach ( PlayableBinding output in pd . playableAsset . outputs )
3155
- {
3156
- AnimationTrack animationTrack = output . sourceObject as AnimationTrack ;
3157
-
3158
- GameObject animationTrackObject = pd . GetGenericBinding ( output . sourceObject ) as GameObject ;
3159
- // One file by animation clip
3160
- foreach ( TimelineClip timelineClip in animationTrack . GetClips ( ) )
3161
- {
3162
- string AnimFbxFormat = AnimFbxFileFormat ;
3163
- if ( timelineClip . displayName . Contains ( "@" ) )
3164
- {
3165
- AnimFbxFormat = "{0}/{2}.fbx" ;
3166
- }
3167
- string filePath = string . Format ( AnimFbxFormat , folderPath , animationTrackObject . name , timelineClip . displayName ) ;
3168
-
3169
- UnityEngine . Object [ ] exportArray = new UnityEngine . Object [ ] { animationTrackObject , timelineClip . animationClip } ;
3170
- ExportObjects ( filePath , exportArray , AnimationExportType . timelineAnimationClip ) ;
3171
- }
3172
- }
3173
- }
3174
- }
3175
-
3176
3154
/// <summary>
3177
3155
/// Add a menu item "Export Model..." to a GameObject's context menu.
3178
3156
/// </summary>
0 commit comments