Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py10
2 files changed, 9 insertions, 3 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 8d849b63..321d7a69 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -15,7 +15,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
- "version": (0, 9, 38),
+ "version": (0, 9, 39),
'blender': (2, 80, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py
index 32656936..a24b2298 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py
@@ -80,6 +80,12 @@ class Keyframe:
def set_value_index(self, idx, val):
self.__value[idx] = val
+ def set_first_tangent(self):
+ self.__in_tangent = self.__value
+
+ def set_last_tangent(self):
+ self.__out_tangent = self.__value
+
@property
def value(self) -> typing.Union[mathutils.Vector, mathutils.Euler, mathutils.Quaternion, typing.List[float]]:
return self.__value
@@ -188,7 +194,7 @@ def gather_keyframes(blender_object_if_armature: typing.Optional[bpy.types.Objec
# Construct the in tangent
if frame == frames[0]:
# start in-tangent should become all zero
- key.in_tangent = key.value
+ key.set_first_tangent()
else:
# otherwise construct an in tangent coordinate from the keyframes control points. We intermediately
# use a point at t-1 to define the tangent. This allows the tangent control point to be transformed
@@ -201,7 +207,7 @@ def gather_keyframes(blender_object_if_armature: typing.Optional[bpy.types.Objec
# Construct the out tangent
if frame == frames[-1]:
# end out-tangent should become all zero
- key.out_tangent = key.value
+ key.set_last_tangent()
else:
# otherwise construct an in tangent coordinate from the keyframes control points. We intermediately
# use a point at t+1 to define the tangent. This allows the tangent control point to be transformed