diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-06-14 00:29:09 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-06-14 00:29:09 +0300 |
commit | 4579db103294ac8b6b81549c6b9cfc91b37e5847 (patch) | |
tree | 5775642df160ab334fb637bdd3f7b8d2f823a202 | |
parent | 139166de51d3c7f8f09de49fcd149c7183ff60cd (diff) |
glTF exporter: export animation only if corresponding object is exported
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 32f642ff..afd1d7ad 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, 26), + "version": (0, 9, 27), '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.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather.py index 3fa697fc..63254899 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather.py @@ -59,7 +59,10 @@ def __gather_scene(blender_scene, export_settings): def __gather_animations(blender_scene, export_settings): animations = [] for blender_object in blender_scene.objects: - animations += gltf2_blender_gather_animations.gather_animations(blender_object, export_settings) + # First check if this object is exported or not. Do not export animation of not exported object + obj_node = gltf2_blender_gather_nodes.gather_node(blender_object, export_settings) + if obj_node is not None: + animations += gltf2_blender_gather_animations.gather_animations(blender_object, export_settings) return animations |