← All ideas
  • Published 2 Aug 2020

Prevent blender from duplicating materials if they already exist in scene

For instance I have multiple versions of the same mesh but with slight differences in geometry. import.png I'd like to edit them all so I improt them. But here is the problem mats.gif Same problem you get appending objects from different blend files. This is not convenient if you use texture atlas, where there are multiple objects that can use the same material with it.

I remember working in different 3d software that had a popup window during import process with question like what to do with materials that have same names and gave me options like "use scene materials, auto-rename materials, overwrite existing material with imported", I guess we need something similar in import settings, like this: import8e7fbcdc8964479a.png

98.7%

Development Status: Open

Upvote 74 Downvote 1
slayerdude93
2 Aug 2020

8 Comments

IIIFGIII

+1 But this issue is wider than just materials. It's about all types of data while import/append - mesh data, textures, scene, etc. same adding .001 new one instead of using/merging to existing. And it need something more than just one checkbox. It need some "import manager" special type window which will show conflict data table and has instruments to set individually/massively to replace/use existing/merge(scenes).

And you made duplicate while asking to prevent duplication... :)

6
jan_hofmeister

* @IIIFGIII * That's a good point. I had the case when I reimported some CAD-data at a different resolution and wanted to replace all existing mesh data in the scene (which already had materials assigned) to use the new objects, without having to re-assign materials. It might be easier to implement only for materials first (as it's only a name check), but ultimately a more detailed import manager might be needed.

thinsoldier

If the code could look at the name and all values of the material and generate a checksum, it could compare checksums and be 100% certain that the materials are identical and then not make duplicates.

3
lsscpp

* @thinsoldier * Or maybe in an easier way: if one or more names are the same ask the user what to do, as it happens in file managers

4
thinsoldier

* @ Lsscpp * Technically what I described is a technique used by programs that manage massive numbers of files automatically where the user does not want to be bothered with the same question for several hundred files when there is a way to automatically detect if files are exactly the same.

APEC

For FBX import one man made attempt and fail... devtalk.blender.org/t/help-test-improved-fbx-import-reuse-materials/12376/3 developers did not respond...

1
mattLi

I agree, this is extremely annoying / I always hit this issue. I have to use various addons to clean it up / try to clean it up. I also send Geo back and forth from 3DS Max and often have to batch re-name because of the auto-rename to .001 / etc.

1
hansolocambo

Working with multiple 3D apps and sending objects back and forth to and from Blender is a real pain in the ass because of that. hundreds of materials being constantly created and named .001 .002 .055. Fuck. That's terrible. Spend my days cleaning this mess. Never seen anything like it in years of 3DS Max, Maya or even C4D. Who decided that... this was a good idea to implement really ? Hope it's gonna change someday :/