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:
authorMartin Poirier <theeth@yahoo.com>2003-10-26 02:24:00 +0400
committerMartin Poirier <theeth@yahoo.com>2003-10-26 02:24:00 +0400
commit36668278ac0c0ea8114154f75e63e20f72cc1057 (patch)
tree50f7b2ec89d57d5c5fc90c8c1afc763a5e09453b /source/blender
parentf3532c7be527cf90a3f67b181315d25506b2f29d (diff)
Fixed grab on local axis in object mode
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/src/editobject.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index c1885a2621c..70cea6ff7b8 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -4228,9 +4228,9 @@ void transform(int mode)
}
else {
window_to_3d(dvec, mval[0]-xn, mval[1]-yn);
- if(axismode==XTRANS) dvec[1]=dvec[2]= 0.0;
- if(axismode==YTRANS) dvec[0]=dvec[2]= 0.0;
- if(axismode==ZTRANS) dvec[0]=dvec[1]= 0.0;
+ if(axismode & XTRANS) dvec[1]=dvec[2]= 0.0;
+ if(axismode & YTRANS) dvec[0]=dvec[2]= 0.0;
+ if(axismode & ZTRANS) dvec[0]=dvec[1]= 0.0;
}
}
else window_to_3d(dvec, mval[0]-xn, mval[1]-yn);
@@ -4274,14 +4274,9 @@ void transform(int mode)
for(a=0; a<tottrans; a++, tob++, tv++) {
if(transmain) {
- float tvec[3];
-
- VECCOPY(tvec, dvec);
- if(axismode==XTRANSLOCAL) Projf(dvec, tvec, tob->axismat[0]);
- if(axismode==YTRANSLOCAL) Projf(dvec, tvec, tob->axismat[1]);
- if(axismode==ZTRANSLOCAL) Projf(dvec, tvec, tob->axismat[2]);
-
VECCOPY(dvecp, dvec);
+ if(axismode & TRANSLOCAL)
+ Mat3MulVecfl(tob->axismat, dvecp);
if(transmode==TRANS_TEX) Mat3MulVecfl(tob->obinv, dvecp);