--- Operating System, Graphics card ---
Windows 7 64bit,
--- Blender version with error, and version that worked ---
blender <=2.67b, works,
blender >=2.68a, with issue
--- Short description of error ---
i have problems with the UVs in my scripts i made on blender <=2.67a.
when i execute these scripts now with blender >=2.68a, uv seems to be shifted by one index per face.
--- Steps for others to reproduce the error (preferably based on attached .blend file) ---
open the attached blend file,
run the script,
select the created object,
go to edit mode,
select everything,
assign the packed image "untitled".
i have attached two videos, one made on blender 2.67b, one made on blender 2.68a.
Description
Event Timeline
maybe something changed in the API, but on
http://www.blender.org/documentation/blender_python_api_2_68_release/change_log.html
i can not see any changes
i think i got the point, where the indices run out of sync.
when i create a face, it will change the order between the input vertices and output vertices. so, when i create the uv coordinates, they will assign to the wrong vertices.
these order differs between blender 2.67b and 2.68a.
*in*:
BMech.faces.new(*0*, *1*, *2*, *3*)
*out*:
for vert in BMech.faces.verts -> blender 2.67b: (*0*, *1*, *2*, *3*); blender 2.68a: (*1*, *2*, *3*, *0*); blender 2.68svn59147: (*3*, *0*, *1*, *2*)
(see attached files
"issue_uv_bmesh_script_test v6.blend",
"issue_uv_bmesh_script_test v6.log1.267b.txt",
"issue_uv_bmesh_script_test v6.log1.268a.txt",
"issue_uv_bmesh_script_test v6.log1.268svn59147.txt",
),
i think, that is a bug!
(or how can i figure out the correct order of vertices after creating a face to assign uv coordinates to the correct face vertex?)
blender 2.67b ##############################################################################
CreateBMFaces
.BMFace[0]
*in*.BMVert[0].co=<Vector (0.0000, 0.0000, 0.0000)>, index=0
*in*.BMVert[1].co=<Vector (1.0000, 0.0000, 0.0000)>, index=1
*in*.BMVert[2].co=<Vector (1.0000, 1.0000, 0.0000)>, index=2
*in*.BMVert[3].co=<Vector (0.0000, 1.0000, 0.0000)>, index=3
*out*.BMVert[0].co=<Vector (0.0000, 0.0000, 0.0000)>, index=0
*out*.BMVert[1].co=<Vector (1.0000, 0.0000, 0.0000)>, index=1
*out*.BMVert[2].co=<Vector (1.0000, 1.0000, 0.0000)>, index=2
*out*.BMVert[3].co=<Vector (0.0000, 1.0000, 0.0000)>, index=3
blender 2.68a ##############################################################################
CreateBMFaces
.BMFace[0]
*in*.BMVert[0].co=<Vector (0.0000, 0.0000, 0.0000)>, index=0
*in*.BMVert[1].co=<Vector (1.0000, 0.0000, 0.0000)>, index=1
*in*.BMVert[2].co=<Vector (1.0000, 1.0000, 0.0000)>, index=2
*in*.BMVert[3].co=<Vector (0.0000, 1.0000, 0.0000)>, index=3
*out*.BMVert[0].co=<Vector (1.0000, 0.0000, 0.0000)>, index=1
*out*.BMVert[1].co=<Vector (1.0000, 1.0000, 0.0000)>, index=2
*out*.BMVert[2].co=<Vector (0.0000, 1.0000, 0.0000)>, index=3
*out*.BMVert[3].co=<Vector (0.0000, 0.0000, 0.0000)>, index=0
blender 2.68snv59147 ##############################################################################
CreateBMFaces
.BMFace[0]
*in*.BMVert[0].co=<Vector (0.0000, 0.0000, 0.0000)>, index=0
*in*.BMVert[1].co=<Vector (1.0000, 0.0000, 0.0000)>, index=1
*in*.BMVert[2].co=<Vector (1.0000, 1.0000, 0.0000)>, index=2
*in*.BMVert[3].co=<Vector (0.0000, 1.0000, 0.0000)>, index=3
*out*.BMVert[0].co=<Vector (0.0000, 1.0000, 0.0000)>, index=3
*out*.BMVert[1].co=<Vector (0.0000, 0.0000, 0.0000)>, index=0
*out*.BMVert[2].co=<Vector (1.0000, 0.0000, 0.0000)>, index=1
*out*.BMVert[3].co=<Vector (1.0000, 1.0000, 0.0000)>, index=2
i made a more straight through blend file "issue_UVMap_v0.blend", with easier to read code.
and a new video "issue_UVMap_v0.mp4", that demonstrate the results of the script in different blender versions.
from 2.65 to 2.67b, the orientation of the vertices of the face is lined up in the order it was created.
from 2.68 ... til now, the order of the vertices of the face is lined up in a wrong order as it was created (order randomly shifted - UV assignlent +-90°).
please fix this, i get seriously in trouble, it is very important to me and my add-ons.