glTF exporter: Always bake scene animation

This way, we can handle drivers animation
This commit is contained in:
Julien Duroure
2024-11-28 09:35:38 +01:00
parent f7a2d0095e
commit 7ea11a4724
2 changed files with 6 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (4, 4, 20),
"version": (4, 4, 21),
'blender': (4, 3, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@@ -16,10 +16,11 @@ from .anim_utils import link_samplers, add_slide_data
def gather_scene_animations(export_settings):
# if there is no animation in file => no need to bake. Except if we are trying to bake GN instances
if len(bpy.data.actions) == 0 and export_settings['gltf_gn_mesh'] is False:
# TODO : get a better filter by checking we really have some GN instances...
return []
# Even if we don't have any animation,
# We are going to bake.
# Here are some cases where there are no action in bpy.data.actions, but we still have to bake:
# - GN instances, that can be animated
# - Everything that can be animated by drivers (animation pointer, but not only)
total_channels = []
animations = []