svn merge ^/trunk/blender -r42886:42902
authorCampbell Barton <ideasman42@gmail.com>
Tue, 27 Dec 2011 13:28:30 +0000 (13:28 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 27 Dec 2011 13:28:30 +0000 (13:28 +0000)
1  2 
CMakeLists.txt
source/blender/blenloader/intern/writefile.c
source/blender/editors/space_view3d/drawobject.c
source/blender/makesdna/DNA_mesh_types.h
source/creator/CMakeLists.txt

diff --cc CMakeLists.txt
Simple merge
index ea3fe09ff6986cb04500689dfcffc7abc69513d0,c6775873fabfc6309063fbd0e04a55ec3348329e..3a45f3eb5bbb26346195a4b3a411db5ca8c8dbe2
@@@ -2842,40 -2779,37 +2842,46 @@@ static void draw_em_indices(BMEditMesh 
        float pos[3];
        unsigned char col[4];
  
 -      /* For now, reuse appropriate theme colors from stats text colors */
 +      BMIter iter;
 +      BMesh *bm= em->bm;
  
-       UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEANG, col);
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
-               if (BM_TestHFlag(v, BM_SELECT)) {
-                       sprintf(val, "%d", i);
-                       view3d_cached_text_draw_add(v->co, val, 0, V3D_CACHE_TEXT_ASCII, col);
 +      /* For now, reuse appropriate theme colors from stats text colors */
 +      i= 0;
 -              for (v = em->verts.first, i = 0; v; v = v->next, i++) {
 -                      if (v->f & SELECT) {
+       if (em->selectmode & SCE_SELECT_VERTEX) {
+               UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEANG, col);
++              BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
++                      if (BM_TestHFlag(v, BM_SELECT)) {
+                               sprintf(val, "%d", i);
+                               view3d_cached_text_draw_add(v->co, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                       }
++                      i++;
                }
-               i++;
        }
  
-       i= 0;
-       UI_GetThemeColor3ubv(TH_DRAWEXTRA_EDGELEN, col);
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
-               if (BM_TestHFlag(e, BM_SELECT)) {
-                       sprintf(val, "%d", i);
-                       mid_v3_v3v3(pos, e->v1->co, e->v2->co);
-                       view3d_cached_text_draw_add(pos, val, 0, V3D_CACHE_TEXT_ASCII, col);
+       if (em->selectmode & SCE_SELECT_EDGE) {
++              i= 0;
+               UI_GetThemeColor3ubv(TH_DRAWEXTRA_EDGELEN, col);
 -              for (e = em->edges.first, i = 0; e; e = e->next, i++) {
 -                      if (e->f & SELECT) {
++              BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
++                      if (BM_TestHFlag(e, BM_SELECT)) {
+                               sprintf(val, "%d", i);
+                               mid_v3_v3v3(pos, e->v1->co, e->v2->co);
+                               view3d_cached_text_draw_add(pos, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                       }
++                      i++;
                }
-               i++;
        }
  
-       i= 0;
-       UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEAREA, col);
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
-               if (BM_TestHFlag(f, BM_SELECT)) {
-                       BM_Compute_Face_CenterMean(bm, f, pos);
-                       sprintf(val, "%d", i);
-                       view3d_cached_text_draw_add(pos, val, 0, V3D_CACHE_TEXT_ASCII, col);
+       if (em->selectmode & SCE_SELECT_FACE) {
++              i= 0;
+               UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEAREA, col);
 -              for (f = em->faces.first, i = 0; f; f = f->next, i++) {
 -                      if (f->f & SELECT) {
++              BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
++                      if (BM_TestHFlag(f, BM_SELECT)) {
++                              BM_Compute_Face_CenterMean(bm, f, pos);
+                               sprintf(val, "%d", i);
 -                              view3d_cached_text_draw_add(f->cent, val, 0, V3D_CACHE_TEXT_ASCII, col);
++                              view3d_cached_text_draw_add(pos, val, 0, V3D_CACHE_TEXT_ASCII, col);
+                       }
++                      i++;
                }
-               i++;
        }
  }
  
index bb8c6083ea15a2d931c71e7e67dd57c8b6029544,4bca7e7a77f37802d889b9c217472b17e6e9e6f9..18dd682bfaf94efba23d0ebde9d02a8695a5a743
@@@ -211,6 -194,10 +211,8 @@@ typedef struct TFace 
  
  /* this is so we can save bmesh files that load in trunk, ignoring NGons
   * will eventually be removed */
 -#if 0 /* enable in bmesh branch only for now */
  #define USE_MESH_FORWARDS_COMAT
 -#endif
  
  #endif
Simple merge