Exporting a scene containing a light node leads to a corrupt GLB file

It appears that exporting a scene with a light object as GLB results in an invalid file. I skimmed through the relevant part of the codebase, and I suspect it may insert null values into the transform attributes when attempting to optimise the scene by omitting the parent node.

I managed to create a minimal test scene to reproduce the problem. If you import the attached Babylon scene into the sandbox and export it as GLB after toggling the “Export Lights” option, you’ll get a corrupt file which cannot be imported into Blender.

scene.zip (393.4 KB)

cc @alexchuber

Thanks for the report! Will look into it now.

2 Likes

Here’s a fix for the light:

On a side note, I noticed your repro mesh exports with a flipped orientation. Is that intentional? If not, I can look into that too.

3 Likes

Thanks for the quick fix!

As to the flipped orientation, it wasn’t intentional. I just tried to create a minimal test case, so I didn’t pay much attention to anything else.

1 Like