Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-30 13:50:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-30 13:50:17 +0400
commit298a03ee634d2ef7eef0d4a7f1c23c7df7593a4c (patch)
treeabe49f92f1575f1d15344d5350f5e6cfc9636c0b /source/blender/editors/transform
parent5ce3588c6c4c0f34911ffb829ec6e4aa31b00dda (diff)
fix for error in own recent changes to transform initialization, proportional editmode needs to skip hidden faces.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform_conversions.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index c2ca8cd46b6..b154acc7456 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -2128,7 +2128,7 @@ static void createTransEditVerts(TransInfo *t)
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 @@ static void createTransEditVerts(TransInfo *t)
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 @@ static void createTransEditVerts(TransInfo *t)
}
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 @@ static void createTransEditVerts(TransInfo *t)
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 @@ static void createTransEditVerts(TransInfo *t)
/* 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);