svn merge -r39951:39986 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorCampbell Barton <ideasman42@gmail.com>
Wed, 7 Sep 2011 00:46:11 +0000 (00:46 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 7 Sep 2011 00:46:11 +0000 (00:46 +0000)
1  2 
source/blender/blenkernel/intern/blender.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/transform/transform.c
source/blender/python/mathutils/mathutils_geometry.c

index 2b994a2d0d273dd77905d0397faedd81d4e316d8,d573198aa10e557c1b7865a3e63ac95403820097..5d10764dad35f2a95ea6f9c1164716a6f08c4c64
@@@ -2502,12 -2435,12 +2502,32 @@@ static void draw_em_measure_stats(View3
        /* useful for debugging index vs shape key index */
  #if 0
        {
--              EditVert *eve;
--              int j;
++              BMIter iter;
++              BMVert *eve;
++              int j=0;
++
                UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEANG, col);
--              for(eve= em->verts.first, j= 0; eve; eve= eve->next, j++) {
--                      sprintf(val, "%d:%d", j, eve->keyindex);
--                      view3d_cached_text_draw_add(eve->co, val, 0, V3D_CACHE_TEXT_ASCII, col);
++
++              if(CustomData_has_layer(&em->bm->vdata, CD_SHAPE_KEYINDEX)) {
++                      int *keyi;
++                      BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
++                              keyi = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_SHAPE_KEYINDEX);
++                              if(keyi && *keyi != ORIGINDEX_NONE) {
++                                      sprintf(val, "%d:%d", j, *keyi);
++                              }
++                              else {
++                                      sprintf(val, "%d", j);
++                              }
++                              view3d_cached_text_draw_add(eve->co, val, 0, V3D_CACHE_TEXT_ASCII, col);
++                              i++;
++                      }
++              }
++              else {
++                      BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
++                              sprintf(val, "%d", j);
++                              view3d_cached_text_draw_add(eve->co, val, 0, V3D_CACHE_TEXT_ASCII, col);
++                              j++;
++                      }
                }
        }
  #endif