- fix for mesh_get_mapped_verts_nors copying short normals to floats without scaling.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 12 Sep 2011 04:29:35 +0000 (04:29 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 12 Sep 2011 04:29:35 +0000 (04:29 +0000)
- BL_SkinDeformer also did this though for that case its not a problem because the normals are later accumulated anyway.

source/blender/blenkernel/intern/DerivedMesh.c
source/gameengine/Converter/BL_SkinDeformer.cpp

index 7d14ec9dec2c6404bef9373ae913d7d52a9b8a7c..ea4b4d27d2c2bb62615d779e2756a2d6b6e4ed09 100644 (file)
@@ -2517,13 +2517,13 @@ static void make_vertexcosnos__mapFunc(void *userData, int index, float *co, flo
        /* check if we've been here before (normal should not be 0) */
        if(vec[3] || vec[4] || vec[5]) return;
 
-       VECCOPY(vec, co);
+       copy_v3_v3(vec, co);
        vec+= 3;
        if(no_f) {
-               VECCOPY(vec, no_f);
+               copy_v3_v3(vec, no_f);
        }
        else {
-               VECCOPY(vec, no_s);
+               normal_short_to_float_v3(vec, no_s);
        }
 }
 
index 98afcf877a18650fbea887e7f161873c313d0888..93c65eb38de1f841e3fbb60f6d8c90873c5f03ca 100644 (file)
@@ -316,8 +316,8 @@ bool BL_SkinDeformer::UpdateInternal(bool shape_applied)
                        /* duplicate */
                        for (int v =0; v<m_bmesh->totvert; v++)
                        {
-                               VECCOPY(m_transverts[v], m_bmesh->mvert[v].co);
-                               VECCOPY(m_transnors[v], m_bmesh->mvert[v].no);
+                               copy_v3_v3(m_transverts[v], m_bmesh->mvert[v].co);
+                               normal_short_to_float_v3(m_transnors[v], m_bmesh->mvert[v].no);
                        }
                }