Cancelling rotation on axis/angle object rotation didnt restore the original rotation.

also commented drotAxis/Angle since its not used yet.
This commit is contained in:
Campbell Barton 2010-10-19 11:15:08 +00:00
parent 5738f3b0b4
commit 03d4121a55
3 changed files with 11 additions and 4 deletions

@ -131,8 +131,8 @@ typedef struct TransCon {
typedef struct TransDataExtension {
float drot[3]; /* Initial object drot */
float drotAngle; /* Initial object drotAngle */
float drotAxis[3]; /* Initial object drotAxis */
// float drotAngle; /* Initial object drotAngle, TODO: not yet implimented */
// float drotAxis[3]; /* Initial object drotAxis, TODO: not yet implimented */
float dquat[4]; /* Initial object dquat */
float dsize[3]; /* Initial object dsize */
float *rot; /* Rotation of the data to transform (Faculative) */

@ -4298,8 +4298,8 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
td->ext->irotAngle= ob->rotAngle;
VECCOPY(td->ext->irotAxis, ob->rotAxis);
td->ext->drotAngle= ob->drotAngle;
VECCOPY(td->ext->drotAxis, ob->drotAxis);
// td->ext->drotAngle= ob->drotAngle; // XXX, not implimented
// VECCOPY(td->ext->drotAxis, ob->drotAxis); // XXX, not implimented
}
else {
td->ext->rot= NULL;

@ -1177,6 +1177,13 @@ static void restoreElement(TransData *td) {
if (td->ext->rot) {
VECCOPY(td->ext->rot, td->ext->irot);
}
if(td->ext->rotAngle) {
*td->ext->rotAngle= td->ext->irotAngle;
}
if(td->ext->rotAxis) {
VECCOPY(td->ext->rotAxis, td->ext->irotAxis);
}
/* XXX, drotAngle & drotAxis not used yet */
if (td->ext->size) {
VECCOPY(td->ext->size, td->ext->isize);
}