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>
The importer already checks if a mesh has vertex colors and enables
vertex colors on the material using it.
Before this fix, GLTF importer would force shader generation to use
vertex colors even if the scene did not have vertex colors at all, or
did not need them; causing inefficient shader and PSO generation.
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
This reads the multiplier for the emission strength from GLTF files.
This is fairly universal and is required for blender's emission value to be imported.
The value is a simple universal multiplier and is unitless.
Sponsored by The Mirror.
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:
Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.
Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:
- Local includes
* Conditional local includes
- Core includes
* Conditional core includes
- Thirdparty includes
* Conditional thirdparty includes