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:
authorJulien Duroure <julien.duroure@gmail.com>2019-05-31 23:18:24 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-05-31 23:18:24 +0300
commita5f2de962763f9c4a037fad0ab2ddf049d73686a (patch)
tree96d6c6db2dc9af15d6240347618f78b800e3ca50 /io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py
parent178738edd2ee2817aaf49bf03b968215795e211c (diff)
glTF exporter: Export multiple actions (from NLA) when sampled is now fixed
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animation_samplers.py9
1 files changed, 8 insertions, 1 deletions
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 b4b5a943..8c01a940 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
@@ -36,6 +36,7 @@ def gather_animation_sampler(channels: typing.Tuple[bpy.types.FCurve],
bake_channel: typing.Union[str, None],
bake_range_start,
bake_range_end,
+ action_name: str,
export_settings
) -> gltf2_io.AnimationSampler:
@@ -57,7 +58,8 @@ def gather_animation_sampler(channels: typing.Tuple[bpy.types.FCurve],
return gltf2_io.AnimationSampler(
extensions=__gather_extensions(channels, blender_object_if_armature, export_settings, bake_bone, bake_channel),
extras=__gather_extras(channels, blender_object_if_armature, export_settings, bake_bone, bake_channel),
- input=__gather_input(channels, blender_object_if_armature, non_keyed_values, bake_bone, bake_channel, bake_range_start, bake_range_end, export_settings),
+ input=__gather_input(channels, blender_object_if_armature, non_keyed_values,
+ bake_bone, bake_channel, bake_range_start, bake_range_end, action_name, export_settings),
interpolation=__gather_interpolation(channels, blender_object_if_armature, export_settings, bake_bone, bake_channel),
output=__gather_output(channels, blender_object.matrix_parent_inverse.copy().freeze(),
blender_object_if_armature,
@@ -66,6 +68,7 @@ def gather_animation_sampler(channels: typing.Tuple[bpy.types.FCurve],
bake_channel,
bake_range_start,
bake_range_end,
+ action_name,
export_settings)
)
@@ -166,6 +169,7 @@ def __gather_input(channels: typing.Tuple[bpy.types.FCurve],
bake_channel: typing.Union[str, None],
bake_range_start,
bake_range_end,
+ action_name,
export_settings
) -> gltf2_io.Accessor:
"""Gather the key time codes."""
@@ -176,6 +180,7 @@ def __gather_input(channels: typing.Tuple[bpy.types.FCurve],
bake_channel,
bake_range_start,
bake_range_end,
+ action_name,
export_settings)
times = [k.seconds for k in keyframes]
@@ -225,6 +230,7 @@ def __gather_output(channels: typing.Tuple[bpy.types.FCurve],
bake_channel: typing.Union[str, None],
bake_range_start,
bake_range_end,
+ action_name,
export_settings
) -> gltf2_io.Accessor:
"""Gather the data of the keyframes."""
@@ -235,6 +241,7 @@ def __gather_output(channels: typing.Tuple[bpy.types.FCurve],
bake_channel,
bake_range_start,
bake_range_end,
+ action_name,
export_settings)
if bake_bone is not None:
target_datapath = "pose.bones['" + bake_bone + "']." + bake_channel