Bug or feature ?

A simple example: two mesh objects, one with a red material, the other with a green one. Let’s join them and then separate them immediately with the ‘loose parts’ option. Now our objects have both materials each, although, obviously, one is completely useless and unassigned.

My question is: is there any reason this should be so ? Shouldn’t unused material slots just be dropped on saving the file, at least, like any other datablock without a user ?

As it is, it’s terribly messy. :confused:

Thanks for your time.

Just to be clear. The empty material slut is persisted through save, close blender, start blender, load file through “File->Open”?

Yes, it survives that, probably because those materials have users, two to be precise.