Skip to content

Commit b325982

Browse files
committed
make sure clip exported with display name
+ fix model exporter test so it passes if we dont export objects that dont have renderers
1 parent 30f3db3 commit b325982

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2962,7 +2962,7 @@ static void OnClipContextClick(MenuCommand command)
29622962

29632963
GameObject animationTrackGObject = UnityEditor.Timeline.TimelineEditor.playableDirector.GetGenericBinding (editorClipAnimationTrack) as GameObject;
29642964

2965-
string filePath = GetExportFilePath (animationTrackGObject.name + "@" + timeLineClip.animationClip.name);
2965+
string filePath = GetExportFilePath (animationTrackGObject.name + "@" + timeLineClip.displayName);
29662966
if (string.IsNullOrEmpty (filePath)) {
29672967
continue;
29682968
}
@@ -3027,7 +3027,7 @@ static void OnGameObjectWithTimelineContextClick(MenuCommand command)
30273027
GameObject atObject = pd.GetGenericBinding(output.sourceObject) as GameObject;
30283028
// One file by animation clip
30293029
foreach (TimelineClip timeLineClip in at.GetClips()) {
3030-
string filePath = string.Format(AnimFbxFileFormat, folderPath, atObject.name, timeLineClip.animationClip.name);
3030+
string filePath = string.Format(AnimFbxFileFormat, folderPath, atObject.name, timeLineClip.displayName);
30313031
UnityEngine.Object[] myArray = new UnityEngine.Object[] { atObject, timeLineClip.animationClip };
30323032
ExportObjects (filePath, myArray, AnimationExportType.timelineAnimationClip);
30333033

Assets/FbxExporters/Editor/UnitTests/ModelExporterTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ public void TestComponentAttributeExport()
468468

469469
var gameObject = new GameObject ();
470470
var meshFilter = gameObject.AddComponent<MeshFilter> ();
471+
gameObject.AddComponent<MeshRenderer> ();
471472

472473
meshFilter.sharedMesh = mesh;
473474

0 commit comments

Comments
 (0)