Browse Source

remove support for old panda

David Rose 21 years ago
parent
commit
b169b29435
2 changed files with 8 additions and 44 deletions
  1. 2 25
      direct/src/interval/MetaInterval.py
  2. 6 19
      direct/src/showbase/ShowBase.py

+ 2 - 25
direct/src/interval/MetaInterval.py

@@ -265,16 +265,8 @@ class MetaInterval(CMetaInterval):
         # is TRACK_START.
         # is TRACK_START.
         self.pushLevel(name, relTime, relTo)
         self.pushLevel(name, relTime, relTo)
         for tuple in list:
         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]
                 relTime = tuple[0]
                 ival = tuple[1]
                 ival = tuple[1]
                 if len(tuple) >= 3:
                 if len(tuple) >= 3:
@@ -567,14 +559,6 @@ class Track(MetaInterval):
         # this is the same as asking that the component is itself an
         # this is the same as asking that the component is itself an
         # Interval.
         # 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 \
         if not (isinstance(tuple, types.TupleType) or \
                 isinstance(tuple, types.ListType)):
                 isinstance(tuple, types.ListType)):
             # It's not a tuple.
             # It's not a tuple.
@@ -602,10 +586,3 @@ class Track(MetaInterval):
 
 
         # Looks good.
         # Looks good.
         return 1
         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)

+ 6 - 19
direct/src/showbase/ShowBase.py

@@ -389,20 +389,12 @@ class ShowBase(DirectObject.DirectObject):
             name = 'window%s' % (self.nextWindowIndex)
             name = 'window%s' % (self.nextWindowIndex)
             self.nextWindowIndex += 1
             self.nextWindowIndex += 1
 
 
-        # Temporary try .. except for old Pandas.
         win = None
         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:
         if win == None:
             # Couldn't create a window!
             # Couldn't create a window!
@@ -514,12 +506,7 @@ class ShowBase(DirectObject.DirectObject):
 
 
     def isMainWindowOpen(self):
     def isMainWindowOpen(self):
         if self.win != None:
         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
         return 0
         
         
     def openMainWindow(self):
     def openMainWindow(self):