Heya,
Im making an import script of models that use multitexturing.
First i imported it as a unique mesh, textures worked for rendering but it seems blender cannot display multi texture in viewport…
can you confirm it really doesnt, I would be sad to have to split the model to get correct viewport display
If it doesn’t, I would have to split the model, but anyway I cant find any API to set the texture displayed in the viewport, do u guys know how can i achieve this?
The textures im talking about are image textures mapped through UV coordinates.
no i mean, when the viewport is in textured view,
the texture displayed on the mesh is not the one from the assigned material’s texture, but the one selected in the UV/image editor when editing UV.
uv1 = mesh.uv_textures.new("UVMap")
uv_layer1 = mesh.uv_layers[0]
# add uv coordinates
for i in range(len(uv_layer1.data)):
uv_layer1.data[i].uv = texCoords[mesh.loops[i].vertex_index]
# set displayed texture for each face
for i in range(faceCount):
uv1.data[i].image = img
not really intuitive but it works ! thx for your answer CoDEmanX