@@ -3339,7 +3339,7 @@ public static void ExportSingleTimelineClip(TimelineClip timelineClipSelected, G
3339
3339
} ;
3340
3340
3341
3341
if ( ! string . IsNullOrEmpty ( filePath ) ) {
3342
- ExportObjects ( filePath , exportArray , timelineAnim : true ) ;
3342
+ ExportObjects ( filePath , exportArray ) ;
3343
3343
return ;
3344
3344
}
3345
3345
@@ -3372,7 +3372,7 @@ public static void ExportAllTimelineClips(GameObject objectWithPlayableDirector,
3372
3372
}
3373
3373
string filePath = string . Format ( AnimFbxFormat , folderPath , atObject . name , timelineClip . displayName ) ;
3374
3374
UnityEngine . Object [ ] myArray = new UnityEngine . Object [ ] { atObject , timelineClip . animationClip } ;
3375
- ExportObjects ( filePath , myArray , exportOptions , timelineAnim : true ) ;
3375
+ ExportObjects ( filePath , myArray , exportOptions ) ;
3376
3376
}
3377
3377
}
3378
3378
}
@@ -3866,8 +3866,7 @@ private static void OnExport ()
3866
3866
public static string ExportObjects (
3867
3867
string filePath ,
3868
3868
UnityEngine . Object [ ] objects = null ,
3869
- IExportOptions exportOptions = null ,
3870
- bool timelineAnim = false )
3869
+ IExportOptions exportOptions = null )
3871
3870
{
3872
3871
LastFilePath = filePath ;
3873
3872
@@ -3881,7 +3880,8 @@ public static string ExportObjects (
3881
3880
}
3882
3881
3883
3882
Dictionary < GameObject , AnimationOnlyExportData > animationExportData = null ;
3884
- if ( timelineAnim ) {
3883
+ // if there are only two objects for export and the second is an animation clip, then we are exporting from the timeline
3884
+ if ( objects . Length == 2 && objects [ 1 ] is AnimationClip ) {
3885
3885
// We expect the first argument in the list to be the GameObject, the second one is the Animation Clip/Track we are exporting from the timeline
3886
3886
GameObject rootObject = ModelExporter . GetGameObject ( objects [ 0 ] ) ;
3887
3887
AnimationClip timelineClip = objects [ 1 ] as AnimationClip ;
@@ -3909,10 +3909,9 @@ public static string ExportObjects (
3909
3909
3910
3910
public static string ExportObject (
3911
3911
string filePath , UnityEngine . Object root ,
3912
- IExportOptions exportOptions = null ,
3913
- bool isTimelineAnim = false )
3912
+ IExportOptions exportOptions = null )
3914
3913
{
3915
- return ExportObjects ( filePath , new Object [ ] { root } , exportOptions , isTimelineAnim ) ;
3914
+ return ExportObjects ( filePath , new Object [ ] { root } , exportOptions ) ;
3916
3915
}
3917
3916
3918
3917
private static void EnsureDirectory ( string path )
0 commit comments