diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-12-14 10:42:04 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-12-14 10:42:04 +0300 |
commit | 18246268e802958bf02ffa14c764d2cc32ddb4d4 (patch) | |
tree | 9359d37137116430f478945f938e71a1d3be8929 /io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py | |
parent | 13b7618409aac26eb512133373828ab9e92a6ac7 (diff) |
glTF exporter: define a user extension API
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py index fa0f9976..5fcd4ede 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py @@ -20,6 +20,7 @@ from io_scene_gltf2.blender.exp.gltf2_blender_gather_cache import cached from io_scene_gltf2.blender.exp import gltf2_blender_gather_nodes from io_scene_gltf2.blender.exp import gltf2_blender_gather_joints from io_scene_gltf2.blender.exp import gltf2_blender_gather_skins +from io_scene_gltf2.io.exp.gltf2_io_user_extensions import export_user_extensions @cached def gather_animation_channel_target(channels: typing.Tuple[bpy.types.FCurve], @@ -29,13 +30,23 @@ def gather_animation_channel_target(channels: typing.Tuple[bpy.types.FCurve], export_settings ) -> gltf2_io.AnimationChannelTarget: - return gltf2_io.AnimationChannelTarget( + animation_channel_target = gltf2_io.AnimationChannelTarget( extensions=__gather_extensions(channels, blender_object, export_settings, bake_bone), extras=__gather_extras(channels, blender_object, export_settings, bake_bone), node=__gather_node(channels, blender_object, export_settings, bake_bone), path=__gather_path(channels, blender_object, export_settings, bake_bone, bake_channel) ) + export_user_extensions('gather_animation_channel_target_hook', + export_settings, + animation_channel_target, + channels, + blender_object, + bake_bone, + bake_channel) + + return animation_channel_target + def __gather_extensions(channels: typing.Tuple[bpy.types.FCurve], blender_object: bpy.types.Object, export_settings, |