On 07/08/2017 at 13:27, xxxxxxxx wrote:
I created an importer which imports a whole bunch of objects (~20'000) into a scene. I already avoided creating any duplicate objects (by automatically replacing them with instances), but since some geometrically different objects still share a common material, I end up with a few (~30%) duplicate materials (can't avoid that since it's an OBJ import with MTLs).
After the import, I want my script to automatically do the two steps I currently do "by hand", namely execute the two commands "Remove Duplicate Materials" and "Remove Unused Materials".
Is there an easy way to do that or do I have to "recreate" those two functions in my script?