Possible 3ds max 2023.1 exporter bug via custom maxscript tool

I have built a batch .glb exporter maxscript tool that used to work perfectly with previous version of 3ds max 2023. I updated to 3ds max 2023.1 (since they have bug fixed aspects of the glTF material) but now my batch exporter tool crashes when a bitmap is present in the glTF material, and I suspect it’s because something has changed in how the glTF material works.

the glTF materials and bitmaps used to work fine before the update.

When my tool crashes it gives the following error message:
Runtime error: .NET runtime exception: Invalid URI: The format of the URI could not be determined

The way my tool works is that is creates an dotNet assembly from Max2Babylon.dll (I have tested with the latest exporter version as well). I then create another dotNet object (dotNetObject “Max2Babylon.MaxScriptManager”).

The code crashes when the latter dotNet object is finalizing the export with all the parameters giving the error message above. This only happens if I have a bitmap assigned to any slot in the glTF material.

It does not matter what output folder I am exporting to. It does not matter where the bitmap is placed. If I disable exporting materials in my tool the crash does not happen, so this must be related to the material in some way.

But what is more interesting is that when using the official BabylonJS exporter the export seems to work fine under any situations.

I hope anyone can help me locate why this bug happens in 2023.1 because my batch exporter tool is a huge timesaver for my pipeline.


cc @Guillaume_Pelletier for max and @bghgary for GLTF

Let me update my Max to test. But i guess this is something with the path of the material. You May debug your tool to catch this exception and see what the difference between the both URI (the one with 2023 and the other with 2023.1). Usually, in .Net, this error occur when you construct an uri without the UriKind.Relative parameter and did not provide any Scheme for the uri.

So, if I want to debug, how specifically do I do that? I think the export log won’t generate because the script crashes before it has finished the actual export procedure… I don’t fully understand your suggestion.

So please send me a short repro that i can test and debug.