diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-03-26 20:43:07 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-03-26 20:43:07 +0300 |
commit | 121075ec15cff682a010dee75d77432b16fe7172 (patch) | |
tree | 060043edef1674c24df81f2f4c1ca52facef45be /source/blender/blenkernel | |
parent | 1fa04dce8cc32c96670d1f458e02dc86207fe550 (diff) |
One more fix for recent normals re-calculation change
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 946f02a97b8..bc3e6b4c4dd 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -1321,15 +1321,12 @@ void mesh_calc_normals(MVert *mverts, int numVerts, MFace *mfaces, int numFaces, for(i=0; i<numFaces; i++) { MFace *mf= &mfaces[i]; + float *f_no= fnors[i]; - if((mf->flag&ME_SMOOTH)==0) { - float *f_no= fnors[i]; - - if(bit_array[mf->v1/nr_bits]&(1<<(mf->v1&(nr_bits-1)))) add_v3_v3(tnorms[mf->v1], f_no); - if(bit_array[mf->v2/nr_bits]&(1<<(mf->v2&(nr_bits-1)))) add_v3_v3(tnorms[mf->v2], f_no); - if(bit_array[mf->v3/nr_bits]&(1<<(mf->v3&(nr_bits-1)))) add_v3_v3(tnorms[mf->v3], f_no); - if(mf->v4 && bit_array[mf->v4/nr_bits]&(1<<(mf->v4&(nr_bits-1)))) add_v3_v3(tnorms[mf->v4], f_no); - } + if(bit_array[mf->v1/nr_bits]&(1<<(mf->v1&(nr_bits-1)))) add_v3_v3(tnorms[mf->v1], f_no); + if(bit_array[mf->v2/nr_bits]&(1<<(mf->v2&(nr_bits-1)))) add_v3_v3(tnorms[mf->v2], f_no); + if(bit_array[mf->v3/nr_bits]&(1<<(mf->v3&(nr_bits-1)))) add_v3_v3(tnorms[mf->v3], f_no); + if(mf->v4 && bit_array[mf->v4/nr_bits]&(1<<(mf->v4&(nr_bits-1)))) add_v3_v3(tnorms[mf->v4], f_no); } MEM_freeN(bit_array); |