Revision: 58740
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58740
Author:   campbellbarton
Date:     2013-07-30 09:50:17 +0000 (Tue, 30 Jul 2013)
Log Message:
-----------
fix for error in own recent changes to transform initialization, proportional 
editmode needs to skip hidden faces.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/transform_conversions.c

Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_conversions.c      
2013-07-30 09:26:45 UTC (rev 58739)
+++ trunk/blender/source/blender/editors/transform/transform_conversions.c      
2013-07-30 09:50:17 UTC (rev 58740)
@@ -2128,7 +2128,7 @@
        float *mappedcos = NULL, *quats = NULL;
        float mtx[3][3], smtx[3][3], (*defmats)[3][3] = NULL, (*defcos)[3] = 
NULL;
        float *dists = NULL;
-       int count = 0, countsel = 0, a, totleft;
+       int a;
        int propmode = (t->flag & T_PROP_EDIT) ? (t->flag & T_PROP_EDIT_ALL) : 
0;
        int mirror = 0;
        int cd_vert_bweight_offset = -1;
@@ -2164,10 +2164,6 @@
                BLI_assert(0);
        }
 
-       countsel = bm->totvertsel;
-       if (propmode) {
-               count = bm->totvert;
-       }
 
        /* check active */
        eve_act = BM_mesh_active_vert_get(bm);
@@ -2178,6 +2174,13 @@
        }
 
        if (propmode) {
+               unsigned int count = 0;
+               BM_ITER_MESH (eve, &iter, bm, BM_VERTS_OF_MESH) {
+                       if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
+                               count++;
+                       }
+               }
+
                t->total = count;
 
                /* allocating scratch arrays */
@@ -2185,7 +2188,7 @@
                        dists = MEM_mallocN(em->bm->totvert * sizeof(float), 
"scratch nears");
        }
        else {
-               t->total = countsel;
+               t->total = bm->totvertsel;
        }
 
        tob = t->data = MEM_callocN(t->total * sizeof(TransData), 
"TransObData(Mesh EditMode)");
@@ -2217,6 +2220,7 @@
        /* detect CrazySpace [tm] */
        if (modifiers_getCageIndex(t->scene, t->obedit, NULL, 1) >= 0) {
                if (modifiers_isCorrectableDeformed(t->obedit)) {
+                       int totleft;
                        /* check if we can use deform matrices for modifier 
from the
                         * start up to stack, they are more accurate than quats 
*/
                        totleft = editbmesh_get_first_deform_matrices(t->scene, 
t->obedit, em, &defmats, &defcos);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to