Import scene without materials/textures, don't show them in inspector?

I want to import a scene/object but without it’s external materials and textures.
Sure some are my own babylon textures, but these for example 'no name" ones.
I wanna get rid of them in the inspector.

Wouldn’t calling dispose on them work? “no name” is what appears when, well, the object doesn’t have any name set on it.

i tried but did not, work. but well it’s not a big problem, just a bit annoying

How it did not work? Were the materials not disposed? Or were they disposed but still visible on the Inspector?

Here in line 35 i added a quick material dispose on all meshes.
Once the camera does not zoom on the meshes anymore now, and the materials are still in the inspector view. They are either not displayed on the model because they are unkwon i guess and i either use StandardMaterial, Grey on all meshes.

The console shows an error:
image

Which means some of the meshes that were loaded didn’t have materials, so you have to check they exist before calling dispose. I looked at your scene again and realized the materials without name are the ones created by the axes viewer, so we probably don’t want to dispose of them since they’re being used :sweat_smile: but they should have a more descriptive name, I’ll open a PR for that

2 Likes