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
notify = directNotify.newCategory("Interval")
Dtool_ObjectToDict(CInterval,"notify", notify)
@ -26,39 +16,39 @@ del setT
#####################################################################
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)
del play
#####################################################################
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)
del stop
#####################################################################
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)
del setFinalT
#####################################################################
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)
del privPostEvent

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,3 @@
from extension_native_helpers import *
Dtool_PreloadDLL("libpanda")
from libpanda import *
#####################################################################
# 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)
#del func
@ -15,6 +11,7 @@ of the NodePath class
####################################################################
def id(self):
"""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()
Dtool_funcToMethod(id, NodePath)
@ -28,7 +25,7 @@ del id
# For iterating over children
def getChildrenAsList(self):
"""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())
Dtool_funcToMethod(getChildrenAsList, NodePath)
@ -99,6 +96,7 @@ del isolate
def remove(self):
"""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
# before node is deleted
messenger.send('preRemoveNodePath', [self])
@ -148,7 +146,7 @@ del reverseLsNames
#####################################################################
def getAncestry(self):
"""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.reverse()
return ancestors

View File

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

View File

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

View File

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

View File

@ -1,7 +1,3 @@
from extension_native_helpers import *
Dtool_PreloadDLL("libpanda")
from libpanda import *
####################################################################
#Dtool_funcToMethod(func, class)
#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
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
of the StreamReader class

View File

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

View File

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