Browse Source

Remove superfluous import lines (this is really genPyCode's task)

rdb 12 years ago
parent
commit
8365c5ce13

+ 15 - 25
direct/src/extensions_native/CInterval_extensions.py

@@ -1,13 +1,3 @@
-from extension_native_helpers import *
-try:
-  Dtool_PreloadDLL("libp3direct")
-  from libp3direct import *
-except:
-  Dtool_PreloadDLL("libdirect")
-  from libdirect import *
-
-#####################################################################
-
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
 notify = directNotify.newCategory("Interval")
 notify = directNotify.newCategory("Interval")
 Dtool_ObjectToDict(CInterval,"notify", notify)
 Dtool_ObjectToDict(CInterval,"notify", notify)
@@ -26,39 +16,39 @@ del setT
 #####################################################################
 #####################################################################
 
 
 def play(self, t0 = 0.0, duration = None, scale = 1.0):
 def play(self, t0 = 0.0, duration = None, scale = 1.0):
-        self.notify.error("using deprecated CInterval.play() interface")
-        if duration:  # None or 0 implies full length
-            self.start(t0, t0 + duration, scale)
-        else:
-            self.start(t0, -1, scale)
+    self.notify.error("CInterval.play() is deprecated, use start() instead")
+    if duration:  # None or 0 implies full length
+        self.start(t0, t0 + duration, scale)
+    else:
+        self.start(t0, -1, scale)
 
 
 Dtool_funcToMethod(play, CInterval)
 Dtool_funcToMethod(play, CInterval)
 del play
 del play
 #####################################################################
 #####################################################################
 
 
 def stop(self):
 def stop(self):
-        self.notify.error("using deprecated CInterval.stop() interface")
-        self.finish()
+    self.notify.error("CInterval.stop() is deprecated, use finish() instead")
+    self.finish()
 
 
 Dtool_funcToMethod(stop, CInterval)
 Dtool_funcToMethod(stop, CInterval)
 del stop
 del stop
 #####################################################################
 #####################################################################
 
 
 def setFinalT(self):
 def setFinalT(self):
-        self.notify.error("using deprecated CInterval.setFinalT() interface")
-        self.finish()
+    self.notify.error("CInterval.setFinalT() is deprecated, use finish() instead")
+    self.finish()
 
 
 Dtool_funcToMethod(setFinalT, CInterval)
 Dtool_funcToMethod(setFinalT, CInterval)
 del setFinalT
 del setFinalT
 #####################################################################
 #####################################################################
 
 
 def privPostEvent(self):
 def privPostEvent(self):
-        # Call after calling any of the priv* methods to do any required
-        # Python finishing steps.
-        t = self.getT()
-        if hasattr(self, "setTHooks"):
-            for func in self.setTHooks:
-                func(t)
+    # Call after calling any of the priv* methods to do any required
+    # Python finishing steps.
+    t = self.getT()
+    if hasattr(self, "setTHooks"):
+        for func in self.setTHooks:
+            func(t)
 
 
 Dtool_funcToMethod(privPostEvent, CInterval)
 Dtool_funcToMethod(privPostEvent, CInterval)
 del privPostEvent
 del privPostEvent

+ 0 - 4
direct/src/extensions_native/EggGroupNode_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpandaegg")
-from libpandaegg import *
-
 ####################################################################
 ####################################################################
 #Dtool_funcToMethod(func, class)        
 #Dtool_funcToMethod(func, class)        
 #del func
 #del func

+ 0 - 4
direct/src/extensions_native/EggPrimitive_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpandaegg")
-from libpandaegg import *
-
 ####################################################################
 ####################################################################
 #Dtool_funcToMethod(func, class)        
 #Dtool_funcToMethod(func, class)        
 #del func
 #del func

+ 0 - 4
direct/src/extensions_native/HTTPChannel_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpandaexpress")
-from libpandaexpress import *
-
 ####################################################################
 ####################################################################
 #Dtool_funcToMethod(func, class)        
 #Dtool_funcToMethod(func, class)        
 #del func
 #del func

+ 0 - 4
direct/src/extensions_native/Mat3_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpanda")
-from libpanda import *
-
 ####################################################################
 ####################################################################
 #Dtool_funcToMethod(func, class)        
 #Dtool_funcToMethod(func, class)        
 #del func
 #del func

+ 0 - 4
direct/src/extensions_native/NodePathCollection_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpanda")
-from libpanda import *
-
 #####################################################################
 #####################################################################
 
 
 # For iterating over children
 # For iterating over children

+ 4 - 6
direct/src/extensions_native/NodePath_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpanda")
-from libpanda import *
-
 ####################################################################
 ####################################################################
 #Dtool_funcToMethod(func, class)
 #Dtool_funcToMethod(func, class)
 #del func
 #del func
@@ -15,6 +11,7 @@ of the NodePath class
 ####################################################################
 ####################################################################
 def id(self):
 def id(self):
         """Returns a unique id identifying the NodePath instance"""
         """Returns a unique id identifying the NodePath instance"""
+        print "Warning: NodePath.id() is deprecated.  Use hash(NodePath) or NodePath.get_key() instead."
         return self.getKey()
         return self.getKey()
 
 
 Dtool_funcToMethod(id, NodePath)
 Dtool_funcToMethod(id, NodePath)
@@ -28,7 +25,7 @@ del id
     # For iterating over children
     # For iterating over children
 def getChildrenAsList(self):
 def getChildrenAsList(self):
         """Converts a node path's child NodePathCollection into a list"""
         """Converts a node path's child NodePathCollection into a list"""
-        print "Warning: NodePath.getChildrenAsList() is deprecated.  Use getChildren() instead."
+        print "Warning: NodePath.getChildrenAsList() is deprecated.  Use get_children() instead."
         return list(self.getChildren())
         return list(self.getChildren())
 
 
 Dtool_funcToMethod(getChildrenAsList, NodePath)
 Dtool_funcToMethod(getChildrenAsList, NodePath)
@@ -99,6 +96,7 @@ del isolate
 
 
 def remove(self):
 def remove(self):
         """Remove a node path from the scene graph"""
         """Remove a node path from the scene graph"""
+        print "Warning: NodePath.remove() is deprecated.  Use remove_node() instead."
         # Send message in case anyone needs to do something
         # Send message in case anyone needs to do something
         # before node is deleted
         # before node is deleted
         messenger.send('preRemoveNodePath', [self])
         messenger.send('preRemoveNodePath', [self])
@@ -148,7 +146,7 @@ del reverseLsNames
 #####################################################################
 #####################################################################
 def getAncestry(self):
 def getAncestry(self):
         """Get a list of a node path's ancestors"""
         """Get a list of a node path's ancestors"""
-        print "NodePath.getAncestry() is deprecated.  Use getAncestors() instead."""
+        print "NodePath.getAncestry() is deprecated.  Use get_ancestors() instead."""
         ancestors = list(self.getAncestors())
         ancestors = list(self.getAncestors())
         ancestors.reverse()
         ancestors.reverse()
         return ancestors
         return ancestors

+ 0 - 4
direct/src/extensions_native/OdeBody_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpanda")
-from libpanda import *
-
 ####################################################################
 ####################################################################
 #Dtool_funcToMethod(func, class)
 #Dtool_funcToMethod(func, class)
 #del func
 #del func

+ 0 - 4
direct/src/extensions_native/OdeGeom_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpanda")
-from libpanda import *
-
 ####################################################################
 ####################################################################
 #Dtool_funcToMethod(func, class)
 #Dtool_funcToMethod(func, class)
 #del func
 #del func

+ 0 - 4
direct/src/extensions_native/OdeJoint_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpanda")
-from libpanda import *
-
 ####################################################################
 ####################################################################
 #Dtool_funcToMethod(func, class)
 #Dtool_funcToMethod(func, class)
 #del func
 #del func

+ 0 - 4
direct/src/extensions_native/OdeSpace_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpanda")
-from libpanda import *
-
 ####################################################################
 ####################################################################
 #Dtool_funcToMethod(func, class)
 #Dtool_funcToMethod(func, class)
 #del func
 #del func

+ 0 - 4
direct/src/extensions_native/Ramfile_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpandaexpress")
-from libpandaexpress import *
-
 """
 """
 Ramfile_extensions module: contains methods to extend functionality
 Ramfile_extensions module: contains methods to extend functionality
 of the Ramfile class
 of the Ramfile class

+ 0 - 4
direct/src/extensions_native/StreamReader_extensions.py

@@ -1,7 +1,3 @@
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpandaexpress")
-from libpandaexpress import *
-
 """
 """
 StreamReader_extensions module: contains methods to extend functionality
 StreamReader_extensions module: contains methods to extend functionality
 of the StreamReader class
 of the StreamReader class

+ 0 - 5
direct/src/extensions_native/VBase3_extensions.py

@@ -2,11 +2,6 @@
 Methods to extend functionality of the VBase3 class
 Methods to extend functionality of the VBase3 class
 """
 """
 
 
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpanda")
-from libpanda import *
-
-
 def pPrintValues(self):
 def pPrintValues(self):
     """
     """
     Pretty print
     Pretty print

+ 0 - 5
direct/src/extensions_native/VBase4_extensions.py

@@ -2,11 +2,6 @@
 Methods to extend functionality of the VBase4 class
 Methods to extend functionality of the VBase4 class
 """
 """
 
 
-from extension_native_helpers import *
-Dtool_PreloadDLL("libpanda")
-from libpanda import *
-
-
 def pPrintValues(self):
 def pPrintValues(self):
     """
     """
     Pretty print
     Pretty print