Repository: khronosgroup/gltf-blender-io
Issue: Changing Y axis animation in blender results in no change in the exported gltf file.

**Describe the bug**
I'm trying to support gltf animation in a model viewer I work on. I have been struggling to reproduce the animations faithfully as they are presented in blender. In this particular report I produce two cubes, each with three animation key frames. The animation key frames only modify the Y axis rotation. The first cube has three rotations of 0deg -> 0deg -> 0deg. The second cube has three rotations of 0deg -> 45deg -> 0deg. The two exported gltf files contain the same data so it is impossible to represent this animation in a model viewer.

**To Reproduce**
Steps to reproduce the behavior:
1. Clone the repository on the page: https://github.com/tbutynAvalon/gltf_rotation_animation_bug
2. Open the 2 blender files and playback the animation to observe the difference in animation.
3. Run the python script and observe that the gltf files are the same.
4. (optional). If you want you can export the .blend files but the gltf files are also in the repo.

**Expected behavior**
I expected that changing the Y rotation would result in a change in the exported gltf file.

**.blend file/ .gltf**
[gltf_rotation_animation_bug.zip](https://github.com/KhronosGroup/glTF-Blender-IO/files/3779666/gltf_rotation_animation_bug.zip)

**Version**
 - OS: Windows
 - Blender Version 2.82 alpha (2019-10-16)
- Also on Blender Version 2.80 ()


Changed files:
addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py

diff --git a/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py b/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py
index 36c7081e..16d3c887 100644
--- a/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py
+++ b/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py
@@ -75,11 +75,7 @@ class Keyframe:
         result = [0.0] * self.get_target_len()
         for i, v in zip(self.__indices, value):
             result[i] = v
-        if self.target == "value":
-            return result
-        else:
-            result = gltf2_blender_math.list_to_mathutils(result, self.target)
-            return result
+        return result
 
     def get_indices(self):
         return self.__indices
@@ -87,6 +83,12 @@ class Keyframe:
     def set_value_index(self, idx, val):
         self.__value[idx] = val
 
+    def set_value_index_in(self, idx, val):
+        self.__in_tangent[idx] = val
+
+    def set_value_index_out(self, idx, val):
+        self.__out_tangent[idx] = val
+
     def set_first_tangent(self):
         self.__in_tangent = self.__value
 
@@ -95,7 +97,9 @@ class Keyframe:
 
     @property
     def value(self) -> typing.Union[mathutils.Vector, mathutils.Euler, mathutils.Quaternion, typing.List[float]]:
-        return self.__value
+        if self.target == "value":
+            return self.__value
+        return gltf2_blender_math.list_to_mathutils(self.__value, self.target)
 
     @value.setter
     def value(self, value: typing.List[float]):
@@ -103,7 +107,11 @@ class Keyframe:
 
     @property
     def in_tangent(self) -> typing.Union[mathutils.Vector, mathutils.Euler, mathutils.Quaternion, typing.List[float]]:
-        return self.__in_tangent
+        if self.__in_tangent is None:
+            return None
+        if self.target == "value":
+            return self.__in_tangent
+        return gltf2_blender_math.list_to_mathutils(self.__in_tangent, self.target)
 
     @in_tangent.setter
     def in_tangent(self, value: typing.List[float]):
@@ -111,7 +119,11 @@ class Keyframe:
 
     @property
     def out_tangent(self) -> typing.Union[mathutils.Vector, mathutils.Euler, mathutils.Quaternion, typing.List[float]]:
-        return self.__out_tangent
+        if self.__out_tangent is None:
+            return None
+        if self.target == "value":
+            return self.__out_tangent
+        return gltf2_blender_math.list_to_mathutils(self.__out_tangent, self.target)
 
     @out_tangent.setter
     def out_tangent(self, value: typing.List[float]):
@@ -277,6 +289,8 @@ def gather_keyframes(blender_object_if_armature: typing.Optional[bpy.types.Objec
                         for c in channels if c is not None
                     ]
 
+                complete_key_tangents(key, non_keyed_values)
+
             keyframes.append(key)
 
     return keyframes
@@ -291,6 +305,18 @@ def complete_key(key: Keyframe, non_keyed_values: typing.Tuple[typing.Optional[f
             continue # this is a keyed array_index or a SK animated
         key.set_value_index(i, non_keyed_values[i])
 
+def complete_key_tangents(key: Keyframe, non_keyed_values: typing.Tuple[typing.Optional[float]]):
+    """
+    Complete keyframe with non keyed values for tangents
+    """
+    for i in range(0, key.get_target_len()):
+        if i in key.get_indices():
+            continue # this is a keyed array_index or a SK animated
+        if key.in_tangent is not None:
+            key.set_value_index_in(i, non_keyed_values[i])
+        if key.out_tangent is not None:
+            key.set_value_index_out(i, non_keyed_values[i])
+
 def needs_baking(blender_object_if_armature: typing.Optional[bpy.types.Object],
                  channels: typing.Tuple[bpy.types.FCurve],
                  export_settings