Skip to content

Commit b539fd4

Browse files
authored
Merge pull request #505 from Unity-Technologies/UT-3313-fix-interpolation-issues
UT-3313 don't reduce keyframes after recording and before exporting
2 parents 3aa7450 + 68fdbcc commit b539fd4

File tree

1 file changed

+5
-3
lines changed
  • com.unity.formats.fbx/Editor/Sources/Recorders/FbxRecorder

1 file changed

+5
-3
lines changed

com.unity.formats.fbx/Editor/Sources/Recorders/FbxRecorder/FbxRecorder.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ protected override void EndRecording(RecordingSession session)
3838
var absolutePath = FileNameGenerator.SanitizePath(settings.FileNameGenerator.BuildAbsolutePath(session));
3939
var clipName = absolutePath.Replace(FileNameGenerator.SanitizePath(Application.dataPath), "Assets");
4040

41-
#if UNITY_2018_3_OR_NEWER
42-
aInput.GameObjectRecorder.SaveToClip(clip, settings.FrameRate);
41+
#if UNITY_2019_3_OR_NEWER
42+
var options = new Animations.CurveFilterOptions();
43+
options.keyframeReduction = false;
44+
aInput.GameObjectRecorder.SaveToClip(clip, settings.FrameRate, options);
4345
#else
44-
aInput.gameObjectRecorder.SaveToClip(clip);
46+
aInput.GameObjectRecorder.SaveToClip(clip, settings.FrameRate);
4547
#endif
4648
var root = ((AnimationInputSettings)aInput.settings).gameObject;
4749
clip.name = "recorded_clip";

0 commit comments

Comments
 (0)