Skip to content

Commit eba9b7a

Browse files
committed
remove timeline anim arg from ExportObjects
1 parent bc6df6e commit eba9b7a

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Assets/FbxExporters/Editor/ExportModelEditorWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ protected override bool Export(){
556556
return true;
557557
}
558558

559-
if (ModelExporter.ExportObjects (filePath, ToExport, SettingsObject, timelineAnim: m_isTimelineAnim) != null) {
559+
if (ModelExporter.ExportObjects (filePath, ToExport, SettingsObject) != null) {
560560
// refresh the asset database so that the file appears in the
561561
// asset folder view.
562562
AssetDatabase.Refresh ();

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3339,7 +3339,7 @@ public static void ExportSingleTimelineClip(TimelineClip timelineClipSelected, G
33393339
};
33403340

33413341
if (!string.IsNullOrEmpty (filePath)) {
3342-
ExportObjects (filePath, exportArray, timelineAnim: true);
3342+
ExportObjects (filePath, exportArray);
33433343
return;
33443344
}
33453345

@@ -3372,7 +3372,7 @@ public static void ExportAllTimelineClips(GameObject objectWithPlayableDirector,
33723372
}
33733373
string filePath = string.Format(AnimFbxFormat, folderPath, atObject.name, timelineClip.displayName);
33743374
UnityEngine.Object[] myArray = new UnityEngine.Object[] { atObject, timelineClip.animationClip };
3375-
ExportObjects (filePath, myArray, exportOptions, timelineAnim: true);
3375+
ExportObjects (filePath, myArray, exportOptions);
33763376
}
33773377
}
33783378
}
@@ -3866,8 +3866,7 @@ private static void OnExport ()
38663866
public static string ExportObjects (
38673867
string filePath,
38683868
UnityEngine.Object[] objects = null,
3869-
IExportOptions exportOptions = null,
3870-
bool timelineAnim = false)
3869+
IExportOptions exportOptions = null)
38713870
{
38723871
LastFilePath = filePath;
38733872

@@ -3881,7 +3880,8 @@ public static string ExportObjects (
38813880
}
38823881

38833882
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) {
38853885
// 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
38863886
GameObject rootObject = ModelExporter.GetGameObject (objects [0]);
38873887
AnimationClip timelineClip = objects [1] as AnimationClip;
@@ -3909,10 +3909,9 @@ public static string ExportObjects (
39093909

39103910
public static string ExportObject (
39113911
string filePath, UnityEngine.Object root,
3912-
IExportOptions exportOptions = null,
3913-
bool isTimelineAnim = false)
3912+
IExportOptions exportOptions = null)
39143913
{
3915-
return ExportObjects(filePath, new Object[] { root }, exportOptions, isTimelineAnim);
3914+
return ExportObjects(filePath, new Object[] { root }, exportOptions);
39163915
}
39173916

39183917
private static void EnsureDirectory (string path)

0 commit comments

Comments
 (0)