Cancelling rotation on axis/angle object rotation didnt restore the original rotation.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 19 Oct 2010 11:15:08 +0000 (11:15 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 19 Oct 2010 11:15:08 +0000 (11:15 +0000)
also commented drotAxis/Angle since its not used yet.

source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c

index bb6ffe9155fe6499d51f5c4134a849345dda8740..c897c1df84299882ffaf9731c35dd71be71cdea0 100644 (file)
@@ -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)                                 */
index d723f77f537d33ff4141c773bb03efb89ede3fa6..7e74d12941ba76177205ff876fc628c2fea30d2f 100644 (file)
@@ -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;
index c473d6395ec5259c3eb2fd485b71dfd859570507..cd40cb3bb2545d9994b1eabedddc64e4d34a4684 100644 (file)
@@ -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);
                }