Fix related to new split normals draw code.

Tessellated split normals CDlayer had no swap func, hence ugly little test_index_face()
could not rotate its values correctly when rotating tessellated faces...

Extra-reported in T39735.
This commit is contained in:
2014-04-16 16:51:49 +02:00
parent eecc426d86
commit a7120b9730
2 changed files with 15 additions and 2 deletions

View File

@@ -1236,7 +1236,7 @@ void BKE_mesh_loops_to_tessdata(CustomData *fdata, CustomData *ldata, CustomData
float (*lnors)[3] = CustomData_get_layer(ldata, CD_NORMAL);
for (findex = 0, lidx = loopindices; findex < num_faces; lidx++, findex++, fnors++) {
for (j = (*lidx)[3] ? 4 : 3; j--;) {
for (j = (mface ? mface[findex].v4 : (*lidx)[3]) ? 4 : 3; j--;) {
normal_float_to_short_v3((*fnors)[j], lnors[(*lidx)[j]]);
}
}