glTF exporter: export animation only if corresponding object is exported
This commit is contained in:
parent
139166de51
commit
4579db1032
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue