fix to single axis scaling

This commit is contained in:
Justin Butler 2007-06-27 22:08:27 +00:00
parent 0bda78dd8d
commit 38a4e312b0
1 changed files with 5 additions and 1 deletions

View File

@ -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):