summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_utility_functions.cpp
diff options
context:
space:
mode:
authorRyan Roden-Corrent <ryan@rcorre.net>2023-08-31 08:33:01 -0400
committerRyan Roden-Corrent <ryan@rcorre.net>2023-09-30 11:32:21 -0400
commit7e64c6c39973e13989ea3b0a4988f4c3da41cbda (patch)
tree4ff10b429b36d94f47943cf336c9d9f6ffff108d /modules/gdscript/gdscript_utility_functions.cpp
parentba3fb66d71cef59c1152a13eab9491ea25953ff3 (diff)
downloadredot-engine-7e64c6c39973e13989ea3b0a4988f4c3da41cbda.tar.gz
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 https://projects.blender.org/blender/blender-addons/commit/96a73cb664bca687b7ea2e464c4d08f8082d5012. 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>
Diffstat (limited to 'modules/gdscript/gdscript_utility_functions.cpp')
0 files changed, 0 insertions, 0 deletions