I'm trying to update a 3rd party addon from Blender 2.6 to 2.7, as the author won't do it. The only problem I have is here:
ActiveUV = BMesh.data.uv_textures.active
for iFace, BFace in enumerate( BMesh.data.polygons ):
FaceUVs = []
if ActiveUV != None:
for UV in ActiveUV.data[iFace].uv:
FaceUVs.append( [UV[0], UV[1]] )
And I have this error message:
'MeshTexturePoly' object has no attribute 'uv'
I've tried with:
BMesh.data.tessface_uv_textures.active
But it returns 'None'
And with:
BMesh.data.uv_layers.active
But It doesn't seem to be the right one.
len(ob.data.uv_layers.active.data)
is always 0 in Edit Mode, you need to be in Object Mode to access it. Fortessface_*
attributes, it is required to callMesh.calc_tessface()
beforehand. $\endgroup$