From c86d20b176b21a60b04a0a6758d2bf38d5023be6 Mon Sep 17 00:00:00 2001 From: Gyedo Jeon Date: Tue, 31 Jul 2007 19:42:10 +0000 Subject: [PATCH] Fixed Maya Camera control mode problem --- direct/src/directtools/DirectCameraControl.py | 5 +++-- direct/src/directtools/DirectManipulation.py | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/direct/src/directtools/DirectCameraControl.py b/direct/src/directtools/DirectCameraControl.py index 008c08b146..7e111835c0 100644 --- a/direct/src/directtools/DirectCameraControl.py +++ b/direct/src/directtools/DirectCameraControl.py @@ -128,7 +128,7 @@ class DirectCameraControl(DirectObject): deltaT = stopT - self.startT stopF = globalClock.getFrameCount() deltaF = stopF - self.startF - if (deltaT <= 0.25) or (deltaF <= 1): + if not self.useMayaCamControls and (deltaT <= 0.25) or (deltaF <= 1): # Check for a hit point based on # current mouse position # Allow intersection with unpickable objects @@ -148,7 +148,7 @@ class DirectCameraControl(DirectObject): self.coaMarker.show() # Resize it self.updateCoaMarkerSize() - + def mouseFlyStartTopWin(self): print "Moving mouse 2 in new window" #altIsDown = base.getAlt() @@ -253,6 +253,7 @@ class DirectCameraControl(DirectObject): if (self.lockRoll == True): # flatten roll base.direct.camera.setR(0) + return Task.cont def HPPanTask(self, state): diff --git a/direct/src/directtools/DirectManipulation.py b/direct/src/directtools/DirectManipulation.py index 894448bbad..df9ed762ee 100644 --- a/direct/src/directtools/DirectManipulation.py +++ b/direct/src/directtools/DirectManipulation.py @@ -43,6 +43,10 @@ class DirectManipulationControl(DirectObject): def manipulationStart(self, modifiers): # Start out in select mode self.mode = 'select' + + if base.direct.cameraControl.useMayaCamControls and modifiers == 4: + self.mode = 'camera' + # Check for a widget hit point entry = base.direct.iRay.pickWidget() # Did we hit a widget?