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
path: root/source
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2005-02-18 04:34:38 +0300
committerMartin Poirier <theeth@yahoo.com>2005-02-18 04:34:38 +0300
commitf24c823f779928ad0fd178401255173ad86e0e77 (patch)
treee11ecdc4d8ad73f6f9b2db8dd04836b33df3c93a /source
parent3d0780d3eca2a40be4940879e7f7183174ee4910 (diff)
Little test commit for slikdigit.
Moves mouse pointer to center of transformation on grabs init. Easier to select a constraint axis with MMB this way. This is testing only and very hackish (couldn't find a proper way to get a screen's global coordinates offset).
Diffstat (limited to 'source')
-rwxr-xr-xsource/blender/src/transform.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c
index 995a52a4985..34ee1e5106c 100755
--- a/source/blender/src/transform.c
+++ b/source/blender/src/transform.c
@@ -103,6 +103,9 @@
extern ListBase editNurb;
extern ListBase editelems;
+extern void helpline(float *vec);
+
+
#include "transform.h"
#include "transform_generics.h"
#include "transform_constraints.h"
@@ -712,6 +715,10 @@ void Transform(int mode) {
float MatI[3][3];
unsigned short event;
+ /*joeedh -> hopefully may be what makes the old transform() constant*/
+ areawinset(curarea->win);
+
+
Mat3One(MatI);
/* stupid PET initialisation code */
@@ -763,9 +770,6 @@ void Transform(int mode) {
event= extern_qread(&val);
}
- /*joeedh -> hopefully may be what makes the old transform() constant*/
- areawinset(curarea->win);
-
trans.redraw = 1;
while (ret_val == 0) {
@@ -964,8 +968,9 @@ int Shear(TransInfo *t, short mval[2]) {
if (td->flag & TD_NOACTION)
continue;
if (G.obedit) {
- Mat3MulMat3(totmat, tmat, omat);
- Mat3MulMat3(tmat, td->smtx, totmat);
+ float mat3[3][3];
+ Mat3MulMat3(mat3, totmat, omat);
+ Mat3MulMat3(tmat, td->smtx, mat3);
}
else {
Mat3CpyMat3(tmat, totmat);
@@ -1311,8 +1316,15 @@ int Rotation(TransInfo *t, short mval[2]) {
/* ************************** TRANSLATION *************************** */
void initTranslation(TransInfo *t) {
+ int x, y;
t->num.idx_max = 2;
t->transform = Translation;
+ x = G.vd->area->v1->vec.x;
+ y = G.vd->area->v1->vec.y + (G.vd->area->headwin?28:1);
+ warp_pointer(t->center2d[0] + x, t->center2d[1] + y);
+
+ t->imval[0] = t->center2d[0];
+ t->imval[1] = t->center2d[1];
}
int Translation(TransInfo *t, short mval[2]) {