godot: Failure to import `.blend` with Blender package from Arch Linux

Godot version

4.0.2-stable

System information

Fedora 37

Issue description

This is related to #67275. I noticed my .blend imports failing after my recent upgrade from Blender 3.3.1 to 3.5.0.

Blender 3.5 hasn’t yet been discussed in that issue, and so @lyuma suggested this may be a different problem to the ones we’ve experienced between 3.0 & 3.4.

I have also confirmed this isn’t a problem with Blender 3.4.1.

Screenshot from 2023-04-22 10-05-26

As is the case with #67275, the import keeps happening on a loop, which prevents me from working because the import modal repeatedly pops up:

Screenshot from 2023-04-22 10-05-09

Aside: it’d be useful to be able to debug this from the production editor build, perhaps by dumping Blender stderr into .godot/ somewhere.

Steps to reproduce

  • Ensure Blender 3.5 is installed + configured for Godot and that imports are enabled on the current project
  • Add any .blend file to the project

You’ll need to keep mashing Ctrl+Q to get the editor to quit after this.

Minimal reproduction project

src.zip

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 3
  • Comments: 27 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Yes, that’s what the cherrypick:4.1 label means on the PR.

The comment in https://github.com/godotengine/godot/pull/81194 explains more, but to clarify, this is not specific to ArchLinux. This is specific to a certain range of blender versions that removed the export_nla_strips parameter. Arch happened to package a version within that range.

More recent versions add that back for “backwards compatibility”, but the re-added parameter does nothing (so it’s not really backwards compatible).

the model that didn’t import for me in Godot is using the Blender Asset Library feature. Could this be the cause?

If you see keyword "export_nla_strips" unrecognized, then no. Blender import will fail on all blend files.

See #79881. So far all reports point to the Blender package from Arch Linux being problematic.

Regardless, Godot should not try to import these in a infinite loop.

EDIT: This issue is not related to .blend files only. Any file, for which the import fails, is getting into loop.

Aha! Found this in https://projects.blender.org/blender/blender-addons:

commit 96a73cb664bca687b7ea2e464c4d08f8082d5012
Author: Julien Duroure <julien.duroure@gmail.com>
Date:   Tue May 23 16:12:03 2023 +0200

    glTF exporter: keep backward compatibility for export options

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 0d50f4ad..a469c81e 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -4,7 +4,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": (3, 6, 21),
+    "version": (3, 6, 22),
     'blender': (3, 5, 0),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
@@ -601,6 +601,19 @@ class ExportGLTF2_Base(ConvertGLTF2_Base):
         default=False
     )
 
+    # This parameter is only here for backward compatibility, as this option is removed in 3.6
+    # This option does nothing, and is not displayed in UI
+    # What you are looking for is probably "export_animation_mode"
+    export_nla_strips: BoolProperty(
+        name='Group by NLA Track',
+        description=(
+            "When on, multiple actions become part of the same glTF animation if "
+            "they're pushed onto NLA tracks with the same name. "
+            "When off, all the currently assigned actions become one glTF animation"
+        ),
+        default=True
+    )
+
     will_save_settings: BoolProperty(
         name='Remember Export Settings',
         description='Store glTF export settings in the Blender project',

The parameter was removed recently, but re-added in even more recent addon versions for backwards compat. I think we want export_animation_mode=NLA_TRACKS going forward. I can open a PR.

My bad, I overlooked this. I guess this ticket is now being repurposed 😛

The problem with Arch is likely similar to the problem Fedora 37 briefly had, where they were not including all core addons. Arch and Fedora don’t share package sources but it might be that a missing build dependency or build option leads to not compiling all Blender addons we need (here notably glTF export stuff I suppose).