[Bf-extensions-cvs] [a84dac69] master: glTF exporter: fix bezier interpolation export
Julien Duroure
noreply at git.blender.org
Wed Jun 5 06:53:34 CEST 2019
Commit: a84dac69bc9d0b78b1cadd12a39cacc16a4eabe3
Author: Julien Duroure
Date: Wed Jun 5 06:52:58 2019 +0200
Branches: master
https://developer.blender.org/rBAa84dac69bc9d0b78b1cadd12a39cacc16a4eabe3
glTF exporter: fix bezier interpolation export
===================================================================
M io_scene_gltf2/__init__.py
M io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py
===================================================================
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 40e563f5..3d574f7d 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, 21),
+ "version": (0, 9, 22),
'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_samplers.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py
index 8c01a940..16346729 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py
@@ -296,7 +296,10 @@ def __gather_output(channels: typing.Tuple[bpy.types.FCurve],
if is_yup and blender_object_if_armature is None:
in_tangent = gltf2_blender_math.swizzle_yup(in_tangent, target_datapath)
# the tangent in glTF is relative to the keyframe value
- in_tangent = value - in_tangent if not isinstance(value, list) else [value[0] - in_tangent[0]]
+ if not isinstance(value, list):
+ in_tangent = value - in_tangent
+ else:
+ in_tangent = [value[i] - in_tangent[i] for i in range(len(value))]
keyframe_value = gltf2_blender_math.mathutils_to_gltf(in_tangent) + keyframe_value # append
if keyframe.out_tangent is not None:
@@ -305,7 +308,10 @@ def __gather_output(channels: typing.Tuple[bpy.types.FCurve],
if is_yup and blender_object_if_armature is None:
out_tangent = gltf2_blender_math.swizzle_yup(out_tangent, target_datapath)
# the tangent in glTF is relative to the keyframe value
- out_tangent = value - out_tangent if not isinstance(value, list) else [value[0] - out_tangent[0]]
+ if not isinstance(value, list):
+ out_tangent = value - out_tangent
+ else:
+ out_tangent = [value[i] - out_tangent[i] for i in range(len(value))]
keyframe_value = keyframe_value + gltf2_blender_math.mathutils_to_gltf(out_tangent) # append
values += keyframe_value
More information about the Bf-extensions-cvs
mailing list