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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user