Mopath updates to enable loading of old player curves:wq

This commit is contained in:
Mark Mine 2002-04-09 01:04:04 +00:00
parent 1575910f01
commit aa23723b37
2 changed files with 5 additions and 4 deletions

View File

@ -254,12 +254,12 @@ class DirectCameraControl(PandaObject):
t.coaCenter = getScreenXY(self.coaMarker)
t.lastAngle = getCrankAngle(t.coaCenter)
# Get a copy of the camera/manipRef offset matrix
t.wrtMat = Mat4()
t.wrtMat.assign(direct.camera.getMat( self.camManipRef ))
t.wrtMat = Mat4(direct.camera.getMat( self.camManipRef ))
taskMgr.add(t, 'manipulateCamera')
def mouseRollTask(self, state):
wrtMat = state.wrtMat
print wrtMat
angle = getCrankAngle(state.coaCenter)
deltaAngle = angle - state.lastAngle
state.lastAngle = angle

View File

@ -20,8 +20,9 @@ class Mopath(PandaObject):
def getMaxT(self):
return self.maxT
def loadFile(self, filename):
self.reset()
def loadFile(self, filename, fReset = 1):
if fReset:
self.reset()
nodePath = loader.loadModel(filename)
if nodePath:
self.__extractCurves(nodePath)