Browse Source

remove support for old panda

David Rose 23 years ago
parent
commit
94c019d62c
3 changed files with 5 additions and 21 deletions
  1. 2 5
      direct/src/actor/Actor.py
  2. 0 1
      direct/src/gui/DirectEntry.py
  3. 3 15
      direct/src/showbase/ShowBase.py

+ 2 - 5
direct/src/actor/Actor.py

@@ -94,9 +94,7 @@ class Actor(PandaObject, NodePath):
             self.gotName = 0
             self.gotName = 0
             root = ModelNode('actor')
             root = ModelNode('actor')
             root.setPreserveTransform(1)
             root.setPreserveTransform(1)
-            # temporary support for old Panda
-            #self.assign(NodePath(root))
-            self.assign(hidden.attachNewNode(root))
+            self.assign(NodePath(root))
             self.setGeomNode(self.attachNewNode(ModelNode('actorGeom')))
             self.setGeomNode(self.attachNewNode(ModelNode('actorGeom')))
             self.__hasLOD = 0
             self.__hasLOD = 0
             
             
@@ -185,8 +183,7 @@ class Actor(PandaObject, NodePath):
 
 
             # copy the scene graph elements of other
             # copy the scene graph elements of other
             otherCopy = other.copyTo(hidden)
             otherCopy = other.copyTo(hidden)
-            # temporarily commented out for old Panda
-            #otherCopy.detachNode()
+            otherCopy.detachNode()
             # assign these elements to ourselve
             # assign these elements to ourselve
             self.gotName = other.gotName
             self.gotName = other.gotName
             self.assign(otherCopy)
             self.assign(otherCopy)

+ 0 - 1
direct/src/gui/DirectEntry.py

@@ -99,7 +99,6 @@ class DirectEntry(DirectFrame):
         PGEntry.setCursorKeysActive(self.guiItem, self['cursorKeys'])
         PGEntry.setCursorKeysActive(self.guiItem, self['cursorKeys'])
 
 
     def setObscureMode(self):
     def setObscureMode(self):
-        # Temporary try..except to support old Pandas.
         PGEntry.setObscureMode(self.guiItem, self['obscured'])
         PGEntry.setObscureMode(self.guiItem, self['obscured'])
 
 
     def setBackgroundFocus(self):
     def setBackgroundFocus(self):

+ 3 - 15
direct/src/showbase/ShowBase.py

@@ -36,10 +36,7 @@ class ShowBase:
         self.config = ConfigConfigureGetConfigConfigShowbase
         self.config = ConfigConfigureGetConfigConfigShowbase
 
 
         if self.config.GetBool('use-vfs', 1):
         if self.config.GetBool('use-vfs', 1):
-            try:  # temporary try .. except for old Pandas
-                vfs = VirtualFileSystem.getGlobalPtr()
-            except:
-                vfs = None
+            vfs = VirtualFileSystem.getGlobalPtr()
         else:
         else:
             vfs = None
             vfs = None
 
 
@@ -581,11 +578,7 @@ class ShowBase:
         """ Returns the current window background color.  This assumes
         """ Returns the current window background color.  This assumes
         the window is set up to clear the color each frame (this is
         the window is set up to clear the color each frame (this is
         the normal setting). """
         the normal setting). """
-        # Temporary try .. except for old Pandas.
-        try:
-            return VBase4(self.win.getClearColor())
-        except:
-            return VBase4(self.win.getGsg().getColorClearValue())
+        return VBase4(self.win.getClearColor())
 
 
     def setBackgroundColor(self, *args):
     def setBackgroundColor(self, *args):
         """ Sets the window background color to the indicated value.
         """ Sets the window background color to the indicated value.
@@ -605,12 +598,7 @@ class ShowBase:
         else:
         else:
             raise TypeError, ('Invalid number of arguments: %d, expected 1, 3, or 4.' % numArgs)
             raise TypeError, ('Invalid number of arguments: %d, expected 1, 3, or 4.' % numArgs)
             
             
-            
-        # Temporary try .. except for old Pandas.
-        try:
-            self.win.setClearColor(color)
-        except:
-            self.win.getGsg().setColorClearValue(color)
+        self.win.setClearColor(color)
                 
                 
     def toggleBackface(self):
     def toggleBackface(self):
         if self.backfaceCullingEnabled:
         if self.backfaceCullingEnabled: