Browse Source

fix to single axis scaling

Justin Butler 18 years ago
parent
commit
38a4e312b0
1 changed files with 5 additions and 1 deletions
  1. 5 1
      direct/src/directtools/DirectManipulation.py

+ 5 - 1
direct/src/directtools/DirectManipulation.py

@@ -506,6 +506,10 @@ class DirectManipulationControl(DirectObject):
         # Reset fHitInitFlag
         self.fHitInit = 1
 
+        # reset the scale of the scaling widget so the calls to
+        # getAxisIntersectPt calculate the correct distance
+        base.direct.widget.setScale(1,1,1)
+
         # Scale factor is ratio current mag with init mag
         if self.constraint[:1] == 'x':
             currScale = Vec3(self.initScale.getX() * 
@@ -518,7 +522,7 @@ class DirectManipulationControl(DirectObject):
         elif self.constraint[:1] == 'z':
             currScale = Vec3(self.initScale.getX(), self.initScale.getY(),
                              self.initScale.getZ() * self.objectHandles.getAxisIntersectPt('z').length() / self.initScaleMag)
-        
+
         base.direct.widget.setScale(currScale)
 
     def scale3D(self, state):