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

This commit is contained in:
rdb 2013-12-23 19:39:22 +00:00
parent 2275784525
commit 8365c5ce13
15 changed files with 19 additions and 85 deletions

View File

@ -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") self.notify.error("CInterval.play() is deprecated, use start() instead")
if duration: # None or 0 implies full length if duration: # None or 0 implies full length
self.start(t0, t0 + duration, scale) self.start(t0, t0 + duration, scale)
else: else:
self.start(t0, -1, scale) 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.notify.error("CInterval.stop() is deprecated, use finish() instead")
self.finish() 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.notify.error("CInterval.setFinalT() is deprecated, use finish() instead")
self.finish() 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 # Call after calling any of the priv* methods to do any required
# Python finishing steps. # Python finishing steps.
t = self.getT() t = self.getT()
if hasattr(self, "setTHooks"): if hasattr(self, "setTHooks"):
for func in self.setTHooks: for func in self.setTHooks:
func(t) func(t)
Dtool_funcToMethod(privPostEvent, CInterval) Dtool_funcToMethod(privPostEvent, CInterval)
del privPostEvent del privPostEvent

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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