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-06-14 00:29:09 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-06-14 00:29:09 +0300
commit4579db103294ac8b6b81549c6b9cfc91b37e5847 (patch)
tree5775642df160ab334fb637bdd3f7b8d2f823a202 /io_scene_gltf2/blender/exp/gltf2_blender_gather.py
parent139166de51d3c7f8f09de49fcd149c7183ff60cd (diff)
glTF exporter: export animation only if corresponding object is exported
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather.py5
1 files changed, 4 insertions, 1 deletions
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