svn merge -r41431:41453 ^/trunk/blender
authorCampbell Barton <ideasman42@gmail.com>
Tue, 1 Nov 2011 23:24:51 +0000 (23:24 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 1 Nov 2011 23:24:51 +0000 (23:24 +0000)
1  2 
build_files/cmake/cmake_consistency_check_config.py
source/blender/blenkernel/intern/smoke.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_api/spacetypes.c
source/blender/makesdna/DNA_userdef_types.h
source/blender/modifiers/intern/MOD_solidify.c

index 7a80e34ff7f7d9b51e3724c7dae1b57bc7f887df,a6215b40ae8335113f0cb04fb9b4cffd98d80316..2634b1ae5677ca204881fec66fce0c1d24a309e5
@@@ -45,19 -45,10 +45,19 @@@ IGNORE = 
      "extern/eltopo/common/meshes/TriangleIndex.hpp",
      "extern/eltopo/common/meshes/meshloader.h",
      "extern/eltopo/eltopo3d/broadphase_blenderbvh.h",
-     "extern/recastnavigation/Recast/Include/RecastLog.h",
-     "extern/recastnavigation/Recast/Include/RecastTimer.h",
-     "intern/audaspace/SRC/AUD_SRCResampleFactory.h",
-     "intern/audaspace/SRC/AUD_SRCResampleReader.h",
+     "extern/recastnavigation/Recast/Include/RecastLog.h",
+     "extern/recastnavigation/Recast/Include/RecastTimer.h",
+     "intern/audaspace/SRC/AUD_SRCResampleFactory.h",
+     "intern/audaspace/SRC/AUD_SRCResampleReader.h",
 +
 +    # for bmesh branch only
 +    "source/blender/bmesh/editmesh_tools.c",
 +    "source/blender/bmesh/intern/in-progress/BME_conversions.c",
 +    "source/blender/bmesh/tools/BME_bevel.c",
 +    "source/blender/bmesh/tools/BME_dupe_ops.c",
 +    "source/blender/bmesh/tools/BME_duplicate.c",
 +    "source/blender/bmesh/tools/BME_extrude.c",
 +    "source/blender/bmesh/tools/BME_weld.c",
      )
  
  UTF8_CHECK = True
index 781ac58b32c2661a7d19651680d7b6f09888ec3d,347af0066c6fdfdcda1fc90ebc0aea16a084325f..62ee904c29313f8698d084bda80a426869dd48b0
@@@ -114,19 -110,27 +114,19 @@@ static void dm_calc_normal(DerivedMesh 
                                        edge_ref->f2=i; \
                                }
  
 -              for(i = 0; i < numFaces; i++, mf++) {
 +              for(i = 0; i < numFaces; i++, mp++) {
 +                      int j;
 +                      
                        f_no = face_nors[i];
 +                      if(calc_face_nors)
 +                              mesh_calc_poly_normal(mp, mloop+mp->loopstart, mvert, f_no);
  
 -                      if(mf->v4) {
 -                              if(calc_face_nors)
 -                                      normal_quad_v3(f_no, mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co, mv[mf->v4].co);
 -
 -                              NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE(mf->v1, mf->v2);
 -                              NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE(mf->v2, mf->v3);
 -                              NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE(mf->v3, mf->v4);
 -                              NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE(mf->v4, mf->v1);
 -                      } else {
 -                              if(calc_face_nors)
 -                                      normal_tri_v3(f_no, mv[mf->v1].co, mv[mf->v2].co, mv[mf->v3].co);
 -
 -                              NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE(mf->v1, mf->v2);
 -                              NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE(mf->v2, mf->v3);
 -                              NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE(mf->v3, mf->v1);
 +                      ml = mloop + mp->loopstart;
 +                      for (j=0; j<mp->totloop; j++) {
 +                              NOCALC_EDGEWEIGHT_ADD_EDGEREF_FACE(ml[j].v, ml[(j+1)%mp->totloop].v);
                        }
                }
-               
                for(edge_iter = BLI_edgehashIterator_new(edge_hash); !BLI_edgehashIterator_isDone(edge_iter); BLI_edgehashIterator_step(edge_iter)) {
                        /* Get the edge vert indices, and edge value (the face indices that use it)*/
                        BLI_edgehashIterator_getKey(edge_iter, (int*)&ed_v1, (int*)&ed_v2);
@@@ -449,31 -440,32 +449,31 @@@ static DerivedMesh *applyModifier(Modif
                                normal_short_to_float_v3(vert_nors[i], mv->no);
                        }
                }
-       
 -              for(i=0, mf=mface; i<numFaces; i++, mf++) {
 -
 +              for (i=0, mp=mpoly; i<numFaces; i++, mp++) {
 +                      mesh_calc_poly_normal(mp, mloop+mp->loopstart, mvert, face_nors[i]);
 +                      
                        /* just added, calc the normal */
 -                      if(face_nors_calc) {
 -                              if(mf->v4)
 -                                      normal_quad_v3(face_nors[i], mvert[mf->v1].co, mvert[mf->v2].co, mvert[mf->v3].co, mvert[mf->v4].co);
 -                              else
 -                                      normal_tri_v3(face_nors[i] , mvert[mf->v1].co, mvert[mf->v2].co, mvert[mf->v3].co);
 -                      }
 -
 -                      if(mf->v4) {
 -                              angle_quad_v3(face_angles, mvert[mf->v1].co, mvert[mf->v2].co, mvert[mf->v3].co, mvert[mf->v4].co);
 -                              j= 3;
 +                      BLI_array_empty(face_angles);
 +                      for (j=0, ml=mloop+mp->loopstart; j<mp->totloop; j++, ml++) {
 +                              MLoop *ml2 = mloop + mp->loopstart + (j+1)%mp->totloop; //next
 +                              MLoop *ml3 = mloop + mp->loopstart + (j+mp->totloop-1)%mp->totloop; //previous
 +                              float e1[3], e2[3], angle;
 +                              
 +                              sub_v3_v3v3(e1, mvert[ml2->v].co, mvert[ml->v].co);
 +                              sub_v3_v3v3(e2, mvert[ml3->v].co, mvert[ml->v].co);
 +                              angle = M_PI - angle_normalized_v3v3(e1, e2);
 +                              BLI_array_append(face_angles, angle);
                        }
 -                      else {
 -                              angle_tri_v3(face_angles, mvert[mf->v1].co, mvert[mf->v2].co, mvert[mf->v3].co);
 -                              j= 2;
 -                      }
 -
 -                      do {
 -                              vidx = *(&mf->v1 + j);
 +                      
 +                      for (j=0, ml=mloop+mp->loopstart; j<mp->totloop; j++, ml++) {
 +                              vidx = ml->v;
                                vert_accum[vidx] += face_angles[j];
                                vert_angles[vidx]+= shell_angle_to_dist(angle_normalized_v3v3(vert_nors[vidx], face_nors[i])) * face_angles[j];
 -                      } while(j--);
 +                      }
                }
 +      
 +              BLI_array_free(face_angles);
  
                /* vertex group support */
                if(dvert) {