diff options
author | Ken Hughes <khughes@pacific.edu> | 2006-11-09 17:30:11 +0300 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2006-11-09 17:30:11 +0300 |
commit | 56a12a30c5fa3699b66a3f6e92781c373b5403a0 (patch) | |
tree | 8062d8151722809767c2495d5b5efe6dc788368c /source/blender/src/editmesh_tools.c | |
parent | c1b05cace9543c84d319038695367560b611166a (diff) |
Patch #4896, submitted by Juho Vepsäläinen (bebraw):
Allows "Degr" field in Mesh tools accept negative and positive float values
from range [-360, 360].
Diffstat (limited to 'source/blender/src/editmesh_tools.c')
-rw-r--r-- | source/blender/src/editmesh_tools.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index 8a9b5dc9a31..33f47fe76dd 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -787,7 +787,7 @@ void extrude_repeat_mesh(int steps, float offs) BIF_undo_push("Extrude Repeat"); } -void spin_mesh(int steps, int degr, float *dvec, int mode) +void spin_mesh(int steps, float degr, float *dvec, int mode) { EditMesh *em = G.editMesh; EditVert *eve,*nextve; @@ -810,9 +810,8 @@ void spin_mesh(int steps, int degr, float *dvec, int mode) cent[2]-= G.obedit->obmat[3][2]; Mat3MulVecfl(imat, cent); - phi= (float)(degr*M_PI/360.0); + phi= degr*M_PI/(-360.0); phi/= steps; - if(G.scene->toolsettings->editbutflag & B_CLOCKWISE) phi= -phi; if(dvec) { n[0]=n[1]= 0.0; @@ -879,7 +878,7 @@ void screw_mesh(int steps, int turns) EditMesh *em = G.editMesh; EditVert *eve,*v1=0,*v2=0; EditEdge *eed; - float dvec[3], nor[3]; + float dvec[3], nor[3],deg=(-360); TEST_EDITMESH @@ -937,8 +936,9 @@ void screw_mesh(int steps, int turns) dvec[1]= -dvec[1]; dvec[2]= -dvec[2]; } + if(G.scene->toolsettings->editbutflag & B_CLOCKWISE) deg= -deg; - spin_mesh(turns*steps, turns*360, dvec, 0); + spin_mesh(turns*steps, turns*deg, dvec, 0); BIF_undo_push("Spin"); } |