Animations would be missing in external software when importing FBX that
have their AnimationLayer or AnimationStack element as the last element
in a block. Importing such files through Blender, however, would import
the animations without issue.
AnimationLayer and AnimationStack elements are an exception to normal
FBX behaviour in that they always need to write a block sentinel after
them. However, this was not happening when the AnimationLayer was the
last element in a block.
With this patch, the block sentinel is now always written for
AnimationLayer and AnimationStack elements.
This patch should only affect FBX files converted from json to binary
with the json2fbx.py script because FBX exported from Blender always
writes the AnimationStack, AnimationLayer and then AnimationCurveNodes
and AnimationCurves of that AnimationLayer, so the only time the
AnimationLayer could be the last element in the block is when there are
no animations in the AnimationLayer to begin with.