diff options
author | Martin Poirier <theeth@yahoo.com> | 2005-05-15 09:44:11 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2005-05-15 09:44:11 +0400 |
commit | 70c0f60df584240a8286e563402c3bf979ac4042 (patch) | |
tree | 54c16b1ea82dc1ee4e2762a55fd25220a250ebc1 /source/blender/src/transform.c | |
parent | 1533b6fd32005b30de1891be55bd6439733ffc44 (diff) |
Fixing bug #2556: http://projects.blender.org/tracker/?func=detail&atid=125&aid=2556&group_id=9
MEMSET was clearing the TransInfo struct after the constraint setup call has been made.
Temporary fix until the manipulator transform init is split off, like normal transform.
Diffstat (limited to 'source/blender/src/transform.c')
-rwxr-xr-x | source/blender/src/transform.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index e2b8c51644d..42ac8dda265 100755 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -216,6 +216,11 @@ static char *transform_to_undostr(TransInfo *t) /* ************************************************* */ +void checkFirstTime() { + if(Trans.mode==TFM_INIT) + memset(&Trans, 0, sizeof(TransInfo)); +} + void transformEvent(unsigned short event, short val) { float mati[3][3]; char cmode = constraintModeToChar(&Trans); @@ -431,7 +436,7 @@ void transformEvent(unsigned short event, short val) { void initTransform(int mode, int context) { /* added initialize, for external calls to set stuff in TransInfo, like undo string */ - if(Trans.mode==TFM_INIT) memset(&Trans, 0, sizeof(TransInfo)); + checkFirstTime(); Trans.state = TRANS_RUNNING; @@ -596,9 +601,6 @@ void ManipulatorTransform(int mode) short pmval[2] = {0, 0}, mval[2], val; unsigned short event; - /* added initialize, for external calls to set stuff in TransInfo, like undo string */ - if(Trans.mode==TFM_INIT) memset(&Trans, 0, sizeof(TransInfo)); - Trans.state = TRANS_RUNNING; /* stupid PET initialisation code */ |