[Bf-extensions-cvs] [d015eee1] gltf_vtree: glTF exporter: fix bug when no animation at all on file, and export only selection
Julien Duroure
noreply at git.blender.org
Wed Feb 9 22:10:58 CET 2022
Commit: d015eee1f40752baac62e9771498a6b2e878d2e9
Author: Julien Duroure
Date: Wed Feb 9 22:08:47 2022 +0100
Branches: gltf_vtree
https://developer.blender.org/rBAd015eee1f40752baac62e9771498a6b2e878d2e9
glTF exporter: fix bug when no animation at all on file, and export only selection
===================================================================
M io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
===================================================================
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
index a4088b87..f4a6843b 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
@@ -25,6 +25,10 @@ from io_scene_gltf2.io.exp.gltf2_io_user_extensions import export_user_extension
def __gather_channels_baked(obj_uuid, export_settings):
channels = []
+ # If no animation in file, no need to bake
+ if len(bpy.data.actions) == 0:
+ return None
+
start_frame = min([v[0] for v in [a.frame_range for a in bpy.data.actions]])
end_frame = max([v[1] for v in [a.frame_range for a in bpy.data.actions]])
More information about the Bf-extensions-cvs
mailing list