godot/modules/gltf/editor
Ryan Roden-Corrent c93d74aca0 Update blender export flags for 3.6.
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.
See 96a73cb664.

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 commit 7e64c6c399)
2023-10-24 19:51:53 +02:00
..
editor_import_blend_runner.cpp Better error handling for Blender RPC import 2023-02-06 18:23:20 +01:00
editor_import_blend_runner.h Fix blend runner copyright headers 2023-02-01 09:39:31 +01:00
editor_scene_exporter_gltf_plugin.cpp Style: Harmonize header includes in modules 2023-06-15 14:35:45 +02:00
editor_scene_exporter_gltf_plugin.h Style: Harmonize header includes in modules 2023-06-15 14:35:45 +02:00
editor_scene_importer_blend.cpp Update blender export flags for 3.6. 2023-10-24 19:51:53 +02:00
editor_scene_importer_blend.h Update blender export flags for 3.6. 2023-10-24 19:51:53 +02:00
editor_scene_importer_fbx.cpp fbx: Set base_dir correctly in append_from_scene 2023-02-20 16:32:27 -08:00
editor_scene_importer_fbx.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
editor_scene_importer_gltf.cpp Style: Harmonize header includes in modules 2023-06-15 14:35:45 +02:00
editor_scene_importer_gltf.h Handle gltf binary 2023-01-27 02:02:02 -08:00