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:
authorGeoffrey Bantle <hairbat@yahoo.com>2006-05-31 05:49:05 +0400
committerGeoffrey Bantle <hairbat@yahoo.com>2006-05-31 05:49:05 +0400
commita9ac112be68fb8dfe4aa8d51946f4f08fd211238 (patch)
tree587a6fa3a8e4bc91fb5ddd34020d5f4baff183e8 /source/blender/src/editmesh_tools.c
parent1418cc4483704d1120a58376db073acdfc85e235 (diff)
-> Fix for bug #4162
Bug in buttons_editing.c meant that edge subdivide code was getting called with wrong arguments when accessed via the edit buttons, but was called correctly from wkey menu. Also added Alexander's small fix so that beauty subdivide behaves correctly when used on non-proportionally scaled objects.
Diffstat (limited to 'source/blender/src/editmesh_tools.c')
-rw-r--r--source/blender/src/editmesh_tools.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c
index 39247fa0b6d..1d3b218362f 100644
--- a/source/blender/src/editmesh_tools.c
+++ b/source/blender/src/editmesh_tools.c
@@ -2436,7 +2436,7 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype)
EditEdge *eed, *cedge, *sort[4];
EditVert **templist;
struct GHash *gh;
- float length[4];
+ float length[4], v1mat[3], v2mat[3], v3mat[3], v4mat[3];
int i, j, edgecount, facetype,hold;
//Set faces f1 to 0 cause we need it later
@@ -2466,10 +2466,19 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype)
continue;
}
if(ef->f & SELECT) {
- length[0] = VecLenf(ef->e1->v1->co,ef->e1->v2->co);
- length[1] = VecLenf(ef->e2->v1->co,ef->e2->v2->co);
- length[2] = VecLenf(ef->e3->v1->co,ef->e3->v2->co);
- length[3] = VecLenf(ef->e4->v1->co,ef->e4->v2->co);
+ VECCOPY(v1mat, ef->v1->co);
+ VECCOPY(v2mat, ef->v2->co);
+ VECCOPY(v3mat, ef->v3->co);
+ VECCOPY(v4mat, ef->v4->co);
+ Mat4Mul3Vecfl(G.obedit->obmat, v1mat);
+ Mat4Mul3Vecfl(G.obedit->obmat, v2mat);
+ Mat4Mul3Vecfl(G.obedit->obmat, v3mat);
+ Mat4Mul3Vecfl(G.obedit->obmat, v4mat);
+
+ length[0] = VecLenf(v1mat, v2mat);
+ length[1] = VecLenf(v2mat, v3mat);
+ length[2] = VecLenf(v3mat, v4mat);
+ length[3] = VecLenf(v4mat, v1mat);
sort[0] = ef->e1;
sort[1] = ef->e2;
sort[2] = ef->e3;