From 20ca39fc2c08432d6f62cb602706fd8b0708c5b1 Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Tue, 22 Jan 2002 18:04:30 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/directscripts/runPythonEmacs | 4 ++++ direct/src/directutil/Mopath.py | 12 ++++++------ direct/src/gui/DirectWaitBar.py | 3 ++- direct/src/interval/Interval.py | 3 +++ 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/direct/src/directscripts/runPythonEmacs b/direct/src/directscripts/runPythonEmacs index 139c711bdc..d7a55f8b6d 100755 --- a/direct/src/directscripts/runPythonEmacs +++ b/direct/src/directscripts/runPythonEmacs @@ -66,6 +66,10 @@ if [ "$TTMODELS" ]; then export TTMODELS fi +if [ "$BARMODELS" ]; then + TTMODELS=`cygpath -w $BARMODELS` + export BARMODELS +fi # Export the proper home environment variable diff --git a/direct/src/directutil/Mopath.py b/direct/src/directutil/Mopath.py index a5c715f3e7..65eebd3811 100644 --- a/direct/src/directutil/Mopath.py +++ b/direct/src/directutil/Mopath.py @@ -13,6 +13,8 @@ class Mopath(PandaObject): self.nameIndex = self.nameIndex + 1 self.name = name self.tPoint = Point3(0) + self.posPoint = Point3(0) + self.hprPoint = Point3(0) self.reset() def getMaxT(self): @@ -91,13 +93,11 @@ class Mopath(PandaObject): return self.playbackTime = self.calcTime(CLAMP(time, 0.0, self.maxT)) if (self.xyzNurbsCurve != None): - pos = Point3(0) - self.xyzNurbsCurve.getPoint(self.playbackTime, pos) - node.setPos(pos) + self.xyzNurbsCurve.getPoint(self.playbackTime, self.posPoint) + node.setPos(self.posPoint) if (self.hprNurbsCurve != None): - hpr = Point3(0) - self.hprNurbsCurve.getPoint(self.playbackTime, hpr) - node.setHpr(hpr) + self.hprNurbsCurve.getPoint(self.playbackTime, self.hprPoint) + node.setHpr(self.hprPoint) def play(self, node, time = 0.0, loop = 0): if (self.xyzNurbsCurve == None) and (self.hprNurbsCurve == None): diff --git a/direct/src/gui/DirectWaitBar.py b/direct/src/gui/DirectWaitBar.py index 38e5709a5c..fd9d11b057 100644 --- a/direct/src/gui/DirectWaitBar.py +++ b/direct/src/gui/DirectWaitBar.py @@ -71,7 +71,8 @@ class DirectWaitBar(DirectFrame): self.updateBarStyle() def setBarColor(self): - self.barStyle.setColor(*self['barColor']) + color = self['barColor'] + self.barStyle.setColor(color[0], color[1], color[2], color[3]) self.updateBarStyle() def update(self, value): diff --git a/direct/src/interval/Interval.py b/direct/src/interval/Interval.py index cd89a37dff..689c207206 100644 --- a/direct/src/interval/Interval.py +++ b/direct/src/interval/Interval.py @@ -68,6 +68,9 @@ class Interval(DirectObject): # Record t for next time around self.prev_t = self.curr_t + def getT(self): + return self.curr_t + def updateFunc(self, t, event = IVAL_NONE): """ updateFunc(t, event) """