Using Blender 2.49's Python API I'm creating a mesh. I have a list of vertices and a list of face indices.
e.g.
mesh = bpy.data.meshes.new('mesh')
mesh.verts.extend(mVerts)
mesh.faces.extend(mFaces)
I've noticed MVert's uvco property and MFace's uv property, and added some random values, but I can't see any change when I render.
Regarding uvco, the documentation mentions:
Note: These are not seen in the UV editor and they are not a part of UV a UVLayer.
I tried this with the new mesh selected:
import Blender
from Blender import *
import random
scn = Scene.GetCurrent()
ob = scn.objects.active
o = ob.getData()
for v in o.verts:
v.uvco = (random.random(),random.random(),random.random())
print v.uvco
for f in o.faces:
r = (random.random(),random.random())
for i in range(0,4):
f.uv.append(r)
print f.uv
I can see the values change in Terminal, but I don't see any change when I render. If I reselect the object, the previous face uvs are gone.
Can anyone explain how are UVs set using the Blender 2.49 Python API ?
Thanks