I’m writing an import script. The data I’m importing gives me UVs and texture names, but not the location of the texture. So I need to assign faces to a texture without loading it into Blender.
imageHandle = Blender.Image.New(texName,128,128,32) # later on... self.mesh.faces[-1].image = imageHandle
This code creates a new image and assigns the face to it as I expected. But there are two problems:
- The generated texture is pure black. How can I get the UV test grid?
- I expected the user to be able to replace the generated image with an actual file. But UV Editor > Image > Replace… has no effect whatsoever; the image chosen isn’t even loaded into a different datablock, let alone active one. I’m stuck with the black texture that I can’t even delete from the scene! Replacing an image does work if the user has opened it through the UI.
Am I missing some vital stage here? Why can’t the user replace the stand-in image?