From b169b29435513f00d594e871f0fb9d9b688236c8 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 20 Apr 2004 22:51:39 +0000 Subject: [PATCH] remove support for old panda --- direct/src/interval/MetaInterval.py | 27 ++------------------------- direct/src/showbase/ShowBase.py | 25 ++++++------------------- 2 files changed, 8 insertions(+), 44 deletions(-) diff --git a/direct/src/interval/MetaInterval.py b/direct/src/interval/MetaInterval.py index b7e6e69834..90cbc28acd 100644 --- a/direct/src/interval/MetaInterval.py +++ b/direct/src/interval/MetaInterval.py @@ -265,16 +265,8 @@ class MetaInterval(CMetaInterval): # is TRACK_START. self.pushLevel(name, relTime, relTo) for tuple in list: - if isinstance(tuple, Interval.Interval) or \ - isinstance(tuple, CInterval): - # Actually, it's not a tuple, but just an interval. - # In this case we fall back on the old default of - # assuming a sequential list of intervals. This is a - # temporary feature for backward compatibility. - self.addInterval(tuple, 0.0, PREVIOUS_END) - - elif isinstance(tuple, types.TupleType) or \ - isinstance(tuple, types.ListType): + if isinstance(tuple, types.TupleType) or \ + isinstance(tuple, types.ListType): relTime = tuple[0] ival = tuple[1] if len(tuple) >= 3: @@ -567,14 +559,6 @@ class Track(MetaInterval): # this is the same as asking that the component is itself an # Interval. - #if isinstance(tuple, CInterval) or \ - # isinstance(tuple, Interval.Interval): - # # Actually, it's not a tuple, but just an interval. - # # In this case we fall back on the old default of - # # assuming a sequential list of intervals. This is a - # # temporary feature for backward compatibility. - # return 1 - if not (isinstance(tuple, types.TupleType) or \ isinstance(tuple, types.ListType)): # It's not a tuple. @@ -602,10 +586,3 @@ class Track(MetaInterval): # Looks good. return 1 - - -# Temporary for backward compatibility. -#class MultiTrack(MetaInterval): -# def applyIvals(self, meta, relTime, relTo): -# meta.addParallel(self.ivals, self.getName(), -# relTime, relTo, self.phonyDuration) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 9dcbbbdae3..63113851ef 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -389,20 +389,12 @@ class ShowBase(DirectObject.DirectObject): name = 'window%s' % (self.nextWindowIndex) self.nextWindowIndex += 1 - # Temporary try .. except for old Pandas. win = None - try: - if type == 'onscreen': - win = self.graphicsEngine.makeWindow(gsg, name, 0) - elif type == 'offscreen': - win = self.graphicsEngine.makeBuffer( - gsg, name, 0, props.getXSize(), props.getYSize(), 0) - except: - if type == 'onscreen': - win = self.graphicsEngine.makeWindow(pipe, gsg) - elif type == 'offscreen': - win = self.graphicsEngine.makeBuffer( - pipe, gsg, props.getXSize(), props.getYSize(), 0) + if type == 'onscreen': + win = self.graphicsEngine.makeWindow(gsg, name, 0) + elif type == 'offscreen': + win = self.graphicsEngine.makeBuffer( + gsg, name, 0, props.getXSize(), props.getYSize(), 0) if win == None: # Couldn't create a window! @@ -514,12 +506,7 @@ class ShowBase(DirectObject.DirectObject): def isMainWindowOpen(self): if self.win != None: - # Temporary try .. except for old Pandas. - try: - valid = self.win.isValid() - except: - valid = self.win.isOpen() - return valid + return self.win.isValid() return 0 def openMainWindow(self):