I have tested the exporter in July and it appeared to work, it did create a
proper file set for an object. However now, after a huge amount of time spent
in modeling a terminal in my project, when I tried to export, it throws an
error. What’s even worse, the file I tested on, back in July, also returns an
error. I installed Blender 3.1.2 and tried there - same error. All materials
are converted. Please help, I can’t work on the project if I can’t export the
files.
location: :-1
Error: Python: Traceback (most recent call last):
File "C:\Users\Roman\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\io\msfs_multi_export.py", line 171, in execute
MSFS_OT_MultiExportGLTF2.export(
File "C:\Users\Roman\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\io_scene_gltf2_msfs\io\msfs_multi_export.py", line 45, in export
bpy.ops.export_scene.gltf(
File "D:\Program Files\Blender 3.1\3.1\scripts\modules\bpy\ops.py", line 132, in __call__
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
File "D:\Program Files\Blender 3.1\3.1\scripts\addons\io_scene_gltf2\__init__.py", line 651, in execute
return gltf2_blender_export.save(context, export_settings)
File "D:\Program Files\Blender 3.1\3.1\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 46, in save
json, buffer = __export(export_settings)
File "D:\Program Files\Blender 3.1\3.1\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 71, in __export
json = __fix_json(exporter.glTF.to_dict())
File "D:\Program Files\Blender 3.1\3.1\scripts\addons\io_scene_gltf2\io\com\gltf2_io.py", line 1203, in to_dict
result["materials"] = from_union([lambda x: from_list(lambda x: to_class(Material, x), x), from_none],
File "D:\Program Files\Blender 3.1\3.1\scripts\addons\io_scene_gltf2\io\com\gltf2_io.py", line 56, in from_union
assert False
AssertionError
location: D:\Program Files\Blender 3.1\3.1\scripts\modules\bpy\ops.py:132
location: :-1
Edit: This has something to do with materials. If I create a test cube with a
MSFS Srandard material it works OK and exports without errors - although all
images are named image.png, image-1.png and so on, instead of material name or
something meaningful. That also means multiple images for same materials on
different objects? But as soon as I change material from “Standard” to
“Parallax” (which I use extensively in my sceneries) - I get the same error!
What’s worse, if I check the “day/night cycle” checkbox even on “Standard”
material - I get the same error immediately! And checking “Collision Material”
results in the same error! So either “Parallax” or “Day/Nifht cycle” or
“Collision Material” do not work, and result in the fatal error. This is a
major disaster! I have spent a lot of time on creating an Asset Library and
converting/migrating all my materials (about a hundred of them) to the new
format. Now it turns out nothing can’t be exported, and basically this Asobo
Blender Exporter is unusable, because it can’t export parallax, day/night
cycle and collision, which I always use. Please tell me there’s something with
my setup that’s wrong and can be fixed, and it’s not a dead end…