You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-01 16:38:31 +00:00
Fixes #76338. Blender 3.6 imports fail with: ``` TypeError: Converting py args to operator properties: : keyword "export_nla_strips" unrecognized ``` The `export_nla_strips` flag was removed and replaced with `export_animation_mode`. In 3.6.0-3.6.21, this option does not exist at all and causes the failure above. In 3.6.22, this option was re-added, but does nothing. See96a73cb664. We now need to check the blender version to determine what flags to use. This adds an additional shell command before every import. We might consider caching the version, but we'd have to invalidate the cache if the blender version or path changes. As an aside, the "group animations" setting in Godot does the opposite of what I'd expect. When `group_tracks=true`, each animation is exported individually. When `group_tracks=false`, all animations are exported as a single track. This seems backwards, but I've kept the 3.6 behavior consistent with 3.5. From https://docs.blender.org/api/3.6/bpy.ops.export_scene.html: > ACTIONS Actions – Export actions (actives and on NLA tracks) as separate animations. > ACTIVE_ACTIONS Active actions merged – All the currently assigned actions become one glTF animation. Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> (cherry picked from commit7e64c6c399)
Godot GLTF import and export module
In a nutshell, the GLTF module works like this:
- The
structures/folder contains GLTF structures, the small pieces that make up a GLTF file, represented as C++ classes. - The
extensions/folder contains GLTF extensions, which are optional features that build on top of the base GLTF spec. GLTFStateholds collections of structures and extensions.GLTFDocumentoperates on GLTFState and its elements.- The
editor/folder uses GLTFDocument to import and export 3D models.