Hello, I am working on a script to simplify some material job I often have.
RIght now my script browse my model for each face and what I don’t find is how to assigne an existing material to the faces.
It looks like that:
sce = bpy.data.scenes.active
ob = sce.objects.active
mesh = ob.getData(mesh=1)
for face in mesh.faces:
I thried that to assigne the first material index:
THanks for your answer it seems than your had the exact same problem as me using only the uv image editor, but too late, my script works now and does the same as yours (just texface to material), but I have a problem with mine, I can’t assign more than 16 materials, do you have this problem too ?
this limit has been made much much larger in 2.5 can’t remeber what exactly, either 3000 ish or 32000 ish (plus some obligatory numbers that make the actual number strange but efficient from a memory point of view…
you may want to check out the “clean unused” script from my assign materials script… it will remove materials from your objects that have no faces assigned.