diff --git a/direct/src/extensions_native/CInterval_extensions.py b/direct/src/extensions_native/CInterval_extensions.py index 7b04f17f37..34c7a781cc 100644 --- a/direct/src/extensions_native/CInterval_extensions.py +++ b/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 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 diff --git a/direct/src/extensions_native/EggGroupNode_extensions.py b/direct/src/extensions_native/EggGroupNode_extensions.py index f852100854..6c6173e66f 100644 --- a/direct/src/extensions_native/EggGroupNode_extensions.py +++ b/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) #del func diff --git a/direct/src/extensions_native/EggPrimitive_extensions.py b/direct/src/extensions_native/EggPrimitive_extensions.py index 9478ca9ea7..657f99a132 100644 --- a/direct/src/extensions_native/EggPrimitive_extensions.py +++ b/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) #del func diff --git a/direct/src/extensions_native/HTTPChannel_extensions.py b/direct/src/extensions_native/HTTPChannel_extensions.py index 3a5769c636..fbbb4421dc 100644 --- a/direct/src/extensions_native/HTTPChannel_extensions.py +++ b/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) #del func diff --git a/direct/src/extensions_native/Mat3_extensions.py b/direct/src/extensions_native/Mat3_extensions.py index 921d0dddf3..3895a4dd46 100755 --- a/direct/src/extensions_native/Mat3_extensions.py +++ b/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) #del func diff --git a/direct/src/extensions_native/NodePathCollection_extensions.py b/direct/src/extensions_native/NodePathCollection_extensions.py index 5a7503c082..f7f379ab32 100644 --- a/direct/src/extensions_native/NodePathCollection_extensions.py +++ b/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 diff --git a/direct/src/extensions_native/NodePath_extensions.py b/direct/src/extensions_native/NodePath_extensions.py index d4f6b4d472..c1a19f3784 100644 --- a/direct/src/extensions_native/NodePath_extensions.py +++ b/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) #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 diff --git a/direct/src/extensions_native/OdeBody_extensions.py b/direct/src/extensions_native/OdeBody_extensions.py index 91d30521ae..78b71cb638 100755 --- a/direct/src/extensions_native/OdeBody_extensions.py +++ b/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) #del func diff --git a/direct/src/extensions_native/OdeGeom_extensions.py b/direct/src/extensions_native/OdeGeom_extensions.py index 6075cbd858..e154e05e55 100755 --- a/direct/src/extensions_native/OdeGeom_extensions.py +++ b/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) #del func diff --git a/direct/src/extensions_native/OdeJoint_extensions.py b/direct/src/extensions_native/OdeJoint_extensions.py index f9bcd68f88..e113e6fdfa 100755 --- a/direct/src/extensions_native/OdeJoint_extensions.py +++ b/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) #del func diff --git a/direct/src/extensions_native/OdeSpace_extensions.py b/direct/src/extensions_native/OdeSpace_extensions.py index 5fed35c2f7..14b3c1e618 100755 --- a/direct/src/extensions_native/OdeSpace_extensions.py +++ b/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) #del func diff --git a/direct/src/extensions_native/Ramfile_extensions.py b/direct/src/extensions_native/Ramfile_extensions.py index e112a19b58..c05040c73e 100644 --- a/direct/src/extensions_native/Ramfile_extensions.py +++ b/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 of the Ramfile class diff --git a/direct/src/extensions_native/StreamReader_extensions.py b/direct/src/extensions_native/StreamReader_extensions.py index 2cff97c311..b4111cc965 100755 --- a/direct/src/extensions_native/StreamReader_extensions.py +++ b/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 of the StreamReader class diff --git a/direct/src/extensions_native/VBase3_extensions.py b/direct/src/extensions_native/VBase3_extensions.py index 4ea1ec2310..331bafdd4e 100755 --- a/direct/src/extensions_native/VBase3_extensions.py +++ b/direct/src/extensions_native/VBase3_extensions.py @@ -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 diff --git a/direct/src/extensions_native/VBase4_extensions.py b/direct/src/extensions_native/VBase4_extensions.py index f5de0f5252..8b7c022593 100755 --- a/direct/src/extensions_native/VBase4_extensions.py +++ b/direct/src/extensions_native/VBase4_extensions.py @@ -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