Fix: glTF Exporter: Avoid crash when action has no slot assigned

This commit is contained in:
Julien Duroure
2025-03-02 07:59:42 +01:00
parent 2be7586bce
commit bb2f74e8ce
2 changed files with 6 additions and 1 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, 52),
"version": (4, 4, 53),
'blender': (4, 4, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@@ -107,6 +107,11 @@ def gather_track_animations(obj_uuid: int,
# Access to fcurve and action data
blender_object = export_settings['vtree'].nodes[obj_uuid].blender_object
# Before exporting, make sure the nla is not in edit mode
if bpy.context.scene.is_nla_tweakmode is True and blender_object.animation_data:
blender_object.animation_data.use_tweak_mode = False
# Collect all tracks affecting this object.
blender_tracks = __get_blender_tracks(obj_uuid, export_settings)