Page MenuHome

FBX Exporter: Support special case of constant interpolation

Authored by Dalai Felinto (dfelinto) on Feb 28 2019, 4:49 PM.



If all the keyframes were set to constant interpolation.

Diff Detail

Event Timeline

This revision is now accepted and ready to land.Feb 28 2019, 6:05 PM
This revision was automatically updated to reflect the committed changes.

@Dalai Felinto (dfelinto) I was wondering if you could tell me a little bit about this commit and the follow-up one that reverted it (5e6bebf). I'm hoping to do something similar, but I'm not familiar with the FBX file format. Why did you end up reverting this commit? Do you know whether it's possible to export a curve to FBX that has multiple interpolation modes?

For some context, I maintain an addon called Stop Motion OBJ. It allows you to import a sequence of OBJ (or STL or PLY) files, then play them back one frame at a time. I'm trying to figure out how to export these sequences to FBX. To show and hide each mesh, I have a keyframe with constant interpolation that lasts exactly one frame. However, when I export to FBX, they're converted to linear interpolation. When I import these files into Unity, there are some pretty weird things going on. I think it's because my animations are 24fps but Unity is playing at 60fps and sampling my exported animation "in between" keyframes.

Sorry to bother, but I'm still hoping to get my previous question answered. I'd like to understand why this commit was reverted so that I can eventually implement Constant interpolation exports myself.