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_channels.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_channels.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py
index aa81b073..40a30e78 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py
@@ -59,11 +59,12 @@ def gather_animation_channels(blender_action: bpy.types.Action,
bone.name,
p,
bake_range_start,
- bake_range_end)
+ bake_range_end,
+ blender_action.name)
channels.append(channel)
else:
for channel_group in __get_channel_groups(blender_action, blender_object, export_settings):
- channel = __gather_animation_channel(channel_group, blender_object, export_settings, None, None, None, None)
+ channel = __gather_animation_channel(channel_group, blender_object, export_settings, None, None, None, None, blender_action.name)
if channel is not None:
channels.append(channel)
@@ -76,7 +77,8 @@ def __gather_animation_channel(channels: typing.Tuple[bpy.types.FCurve],
bake_bone: typing.Union[str, None],
bake_channel: typing.Union[str, None],
bake_range_start,
- bake_range_end
+ bake_range_end,
+ action_name: str
) -> typing.Union[gltf2_io.AnimationChannel, None]:
if not __filter_animation_channel(channels, blender_object, export_settings):
return None
@@ -84,7 +86,7 @@ def __gather_animation_channel(channels: typing.Tuple[bpy.types.FCurve],
return gltf2_io.AnimationChannel(
extensions=__gather_extensions(channels, blender_object, export_settings, bake_bone),
extras=__gather_extras(channels, blender_object, export_settings, bake_bone),
- sampler=__gather_sampler(channels, blender_object, export_settings, bake_bone, bake_channel, bake_range_start, bake_range_end),
+ sampler=__gather_sampler(channels, blender_object, export_settings, bake_bone, bake_channel, bake_range_start, bake_range_end, action_name),
target=__gather_target(channels, blender_object, export_settings, bake_bone, bake_channel)
)
@@ -118,7 +120,8 @@ def __gather_sampler(channels: typing.Tuple[bpy.types.FCurve],
bake_bone: typing.Union[str, None],
bake_channel: typing.Union[str, None],
bake_range_start,
- bake_range_end
+ bake_range_end,
+ action_name
) -> gltf2_io.AnimationSampler:
return gltf2_blender_gather_animation_samplers.gather_animation_sampler(
channels,
@@ -127,6 +130,7 @@ def __gather_sampler(channels: typing.Tuple[bpy.types.FCurve],
bake_channel,
bake_range_start,
bake_range_end,
+ action_name,
export_settings
)