diff options
author | Martin Poirier <theeth@yahoo.com> | 2005-05-02 06:18:13 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2005-05-02 06:18:13 +0400 |
commit | 61f2736ec36154f5832c11ae5d018e6eaf89a3b2 (patch) | |
tree | ae4c589272b3065c36134a976496bc9b793e15dc /source/blender/src/transform.c | |
parent | 01a053f98975665d65a608a396fe2d6eedb2f454 (diff) |
Local axis constraint external call. Had to do it in a very hackish way which highlight a design problem in the code. To solve it (and would solve other problems too), we'd have to split off the initialisation function. Not terribly hard to do but I'm overwhelmed with work...
Push/Pull had a problem with constraints enabling/disabling. Fixed
Restablished infinite line for constraint draw (when not using manipulator) as discussed in meeting.
Diffstat (limited to 'source/blender/src/transform.c')
-rwxr-xr-x | source/blender/src/transform.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 3c6de26b7d6..1df4025da04 100755 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -233,6 +233,16 @@ void Transform(int mode, int context) return; } + /* CHECKING FOR CTX_SETLOCALCONST CONTEXT FLAG */ + /* EVIL, best would be to split off init, this way all the external constraint call could work like that: + initTransform(mode) + initconstraint(setup) + Transform() + */ + if (Trans.context & CTX_SETLOCALCONST) { + setLocalConstraint(&Trans, Trans.con.mode, Trans.con.text); + } + /* EVIL! posemode code can switch translation to rotate when 1 bone is selected. will be removed (ton) */ /* EVIL2: we gave as argument also texture space context bit... was cleared */ mode= Trans.mode; @@ -395,6 +405,7 @@ void Transform(int mode, int context) Trans.redraw= 1; } else { + cmode = '\0'; stopConstraint(&Trans); Trans.redraw = 1; } @@ -1899,7 +1910,7 @@ int PushPull(TransInfo *t, short mval[2]) sprintf(str, "Push/Pull: %.4f%s %s", distance, t->con.text, t->proptext); } - if (t->con.applyRot) { + if (t->con.applyRot && t->con.mode & CON_APPLY) { t->con.applyRot(t, NULL, axis); } @@ -1908,7 +1919,7 @@ int PushPull(TransInfo *t, short mval[2]) break; VecSubf(vec, t->center, td->center); - if (t->con.applyRot) { + if (t->con.applyRot && t->con.mode & CON_APPLY) { t->con.applyRot(t, td, axis); Projf(vec, vec, axis); } |