mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
Fixed Maya Camera control mode problem
This commit is contained in:
parent
7c1ebe56c8
commit
c86d20b176
@ -128,7 +128,7 @@ class DirectCameraControl(DirectObject):
|
|||||||
deltaT = stopT - self.startT
|
deltaT = stopT - self.startT
|
||||||
stopF = globalClock.getFrameCount()
|
stopF = globalClock.getFrameCount()
|
||||||
deltaF = stopF - self.startF
|
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
|
# Check for a hit point based on
|
||||||
# current mouse position
|
# current mouse position
|
||||||
# Allow intersection with unpickable objects
|
# Allow intersection with unpickable objects
|
||||||
@ -148,7 +148,7 @@ class DirectCameraControl(DirectObject):
|
|||||||
self.coaMarker.show()
|
self.coaMarker.show()
|
||||||
# Resize it
|
# Resize it
|
||||||
self.updateCoaMarkerSize()
|
self.updateCoaMarkerSize()
|
||||||
|
|
||||||
def mouseFlyStartTopWin(self):
|
def mouseFlyStartTopWin(self):
|
||||||
print "Moving mouse 2 in new window"
|
print "Moving mouse 2 in new window"
|
||||||
#altIsDown = base.getAlt()
|
#altIsDown = base.getAlt()
|
||||||
@ -253,6 +253,7 @@ class DirectCameraControl(DirectObject):
|
|||||||
if (self.lockRoll == True):
|
if (self.lockRoll == True):
|
||||||
# flatten roll
|
# flatten roll
|
||||||
base.direct.camera.setR(0)
|
base.direct.camera.setR(0)
|
||||||
|
|
||||||
return Task.cont
|
return Task.cont
|
||||||
|
|
||||||
def HPPanTask(self, state):
|
def HPPanTask(self, state):
|
||||||
|
@ -43,6 +43,10 @@ class DirectManipulationControl(DirectObject):
|
|||||||
def manipulationStart(self, modifiers):
|
def manipulationStart(self, modifiers):
|
||||||
# Start out in select mode
|
# Start out in select mode
|
||||||
self.mode = 'select'
|
self.mode = 'select'
|
||||||
|
|
||||||
|
if base.direct.cameraControl.useMayaCamControls and modifiers == 4:
|
||||||
|
self.mode = 'camera'
|
||||||
|
|
||||||
# Check for a widget hit point
|
# Check for a widget hit point
|
||||||
entry = base.direct.iRay.pickWidget()
|
entry = base.direct.iRay.pickWidget()
|
||||||
# Did we hit a widget?
|
# Did we hit a widget?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user