2
0
Эх сурвалжийг харах

Deprecate pandac.PandaModules and genPyCode, move extensions to panda3d/, clean up imports and deprecated behaviour

rdb 10 жил өмнө
parent
commit
d9342043b0
100 өөрчлөгдсөн 224 нэмэгдсэн , 922 устгасан
  1. 2 3
      direct/src/actor/Actor.py
  2. 1 1
      direct/src/cluster/ClusterClient.py
  3. 0 1
      direct/src/cluster/ClusterConfig.py
  4. 1 1
      direct/src/cluster/ClusterMsgs.py
  5. 1 1
      direct/src/cluster/ClusterServer.py
  6. 3 3
      direct/src/directbase/TestStart.py
  7. 2 16
      direct/src/directdevices/DirectDeviceManager.py
  8. 0 1
      direct/src/directnotify/Logger.py
  9. 0 1
      direct/src/directnotify/Notifier.py
  10. 1 1
      direct/src/directscripts/doxygen_filter.py
  11. 1 1
      direct/src/directscripts/extract_docs.py
  12. 1 1
      direct/src/directtools/DirectCameraControl.py
  13. 1 1
      direct/src/directtools/DirectGeometry.py
  14. 1 1
      direct/src/directtools/DirectGlobals.py
  15. 1 1
      direct/src/directtools/DirectGrid.py
  16. 1 1
      direct/src/directtools/DirectLights.py
  17. 7 9
      direct/src/directtools/DirectSession.py
  18. 2 1
      direct/src/distributed/PyDatagram.py
  19. 2 1
      direct/src/distributed/PyDatagramIterator.py
  20. 5 4
      direct/src/extensions_native/CInterval_extensions.py
  21. 47 742
      direct/src/extensions_native/NodePath_extensions.py
  22. 1 1
      direct/src/extensions_native/VBase3_extensions.py
  23. 1 1
      direct/src/extensions_native/VBase4_extensions.py
  24. 2 4
      direct/src/ffi/DoGenPyCode.py
  25. 0 1
      direct/src/ffi/FFITypes.py
  26. 0 1
      direct/src/ffi/jGenPyCode.py
  27. 2 2
      direct/src/filter/CommonFilters.py
  28. 3 4
      direct/src/filter/FilterManager.py
  29. 0 1
      direct/src/fsm/FourState.py
  30. 0 1
      direct/src/fsm/SampleFSM.py
  31. 0 1
      direct/src/fsm/State.py
  32. 1 1
      direct/src/fsm/StatePush.py
  33. 1 1
      direct/src/gui/DirectButton.py
  34. 1 1
      direct/src/gui/DirectCheckBox.py
  35. 1 2
      direct/src/gui/DirectCheckButton.py
  36. 1 1
      direct/src/gui/DirectDialog.py
  37. 1 1
      direct/src/gui/DirectEntry.py
  38. 2 4
      direct/src/gui/DirectEntryScroll.py
  39. 2 2
      direct/src/gui/DirectFrame.py
  40. 3 5
      direct/src/gui/DirectGuiBase.py
  41. 1 1
      direct/src/gui/DirectGuiGlobals.py
  42. 3 1
      direct/src/gui/DirectGuiTest.py
  43. 1 2
      direct/src/gui/DirectLabel.py
  44. 1 1
      direct/src/gui/DirectOptionMenu.py
  45. 1 1
      direct/src/gui/DirectRadioButton.py
  46. 1 1
      direct/src/gui/DirectScrollBar.py
  47. 1 1
      direct/src/gui/DirectScrolledFrame.py
  48. 2 2
      direct/src/gui/DirectScrolledList.py
  49. 1 1
      direct/src/gui/DirectSlider.py
  50. 1 1
      direct/src/gui/DirectWaitBar.py
  51. 2 3
      direct/src/gui/OnscreenGeom.py
  52. 2 3
      direct/src/gui/OnscreenImage.py
  53. 2 2
      direct/src/gui/OnscreenText.py
  54. 2 1
      direct/src/interval/ActorInterval.py
  55. 2 1
      direct/src/interval/AnimControlInterval.py
  56. 2 2
      direct/src/interval/FunctionInterval.py
  57. 2 1
      direct/src/interval/IndirectInterval.py
  58. 2 3
      direct/src/interval/Interval.py
  59. 10 8
      direct/src/interval/IntervalGlobal.py
  60. 2 4
      direct/src/interval/IntervalManager.py
  61. 5 3
      direct/src/interval/IntervalTest.py
  62. 2 1
      direct/src/interval/LerpInterval.py
  63. 5 4
      direct/src/interval/MetaInterval.py
  64. 2 1
      direct/src/interval/MopathInterval.py
  65. 2 2
      direct/src/interval/ParticleInterval.py
  66. 2 2
      direct/src/interval/ProjectileInterval.py
  67. 2 2
      direct/src/interval/ProjectileIntervalTest.py
  68. 2 1
      direct/src/interval/SoundInterval.py
  69. 2 2
      direct/src/interval/TestInterval.py
  70. 2 1
      direct/src/motiontrail/MotionTrail.py
  71. 4 3
      direct/src/p3d/AppRunner.py
  72. 2 0
      direct/src/p3d/DWBPackageInstaller.py
  73. 1 1
      direct/src/p3d/DeploymentTools.py
  74. 2 0
      direct/src/p3d/FileSpec.py
  75. 2 0
      direct/src/p3d/HostInfo.py
  76. 2 0
      direct/src/p3d/InstalledHostData.py
  77. 2 0
      direct/src/p3d/InstalledPackageData.py
  78. 2 0
      direct/src/p3d/JavaScript.py
  79. 3 1
      direct/src/p3d/PackageInfo.py
  80. 2 0
      direct/src/p3d/PackageInstaller.py
  81. 2 1
      direct/src/p3d/PackageMerger.py
  82. 2 2
      direct/src/p3d/Packager.py
  83. 2 0
      direct/src/p3d/PatchMaker.py
  84. 2 0
      direct/src/p3d/ScanDirectoryNode.py
  85. 2 0
      direct/src/p3d/SeqValue.py
  86. 2 1
      direct/src/particles/ForceGroup.py
  87. 7 3
      direct/src/particles/ParticleEffect.py
  88. 5 4
      direct/src/particles/ParticleFloorTest.py
  89. 2 4
      direct/src/particles/Particles.py
  90. 1 1
      direct/src/showbase/Audio3DManager.py
  91. 1 2
      direct/src/showbase/ContainerLeakDetector.py
  92. 2 2
      direct/src/showbase/ContainerReport.py
  93. 1 2
      direct/src/showbase/DistancePhasedNode.py
  94. 0 1
      direct/src/showbase/ExcelHandler.py
  95. 0 1
      direct/src/showbase/Finder.py
  96. 1 1
      direct/src/showbase/GarbageReport.py
  97. 0 1
      direct/src/showbase/LazySort.py
  98. 0 1
      direct/src/showbase/Messenger.py
  99. 0 1
      direct/src/showbase/ObjectPool.py
  100. 1 3
      direct/src/showbase/OnScreenDebug.py

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

@@ -2,11 +2,10 @@
 
 
 __all__ = ['Actor']
 __all__ = ['Actor']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
 from direct.directnotify import DirectNotifyGlobal
 from direct.directnotify import DirectNotifyGlobal
-from pandac.PandaModules import LODNode
-import types, copy
+import types
 
 
 class Actor(DirectObject, NodePath):
 class Actor(DirectObject, NodePath):
     """
     """

+ 1 - 1
direct/src/cluster/ClusterClient.py

@@ -1,6 +1,6 @@
 """ClusterClient: Master for mutli-piping or PC clusters.  """
 """ClusterClient: Master for mutli-piping or PC clusters.  """
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 from ClusterMsgs import *
 from ClusterMsgs import *
 from ClusterConfig import *
 from ClusterConfig import *
 from direct.directnotify import DirectNotifyGlobal
 from direct.directnotify import DirectNotifyGlobal

+ 0 - 1
direct/src/cluster/ClusterConfig.py

@@ -1,6 +1,5 @@
 
 
 from ClusterClient import *
 from ClusterClient import *
-import string
 
 
 # A dictionary of information for various cluster configurations.
 # A dictionary of information for various cluster configurations.
 # Dictionary is keyed on cluster-config string
 # Dictionary is keyed on cluster-config string

+ 1 - 1
direct/src/cluster/ClusterMsgs.py

@@ -3,7 +3,7 @@
 # This module is intended to supply routines and dataformats common to
 # This module is intended to supply routines and dataformats common to
 # both ClusterClient and ClusterServer.
 # both ClusterClient and ClusterServer.
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 from direct.distributed.PyDatagram import PyDatagram
 from direct.distributed.PyDatagram import PyDatagram
 from direct.distributed.PyDatagramIterator import PyDatagramIterator
 from direct.distributed.PyDatagramIterator import PyDatagramIterator
 import time
 import time

+ 1 - 1
direct/src/cluster/ClusterServer.py

@@ -1,4 +1,4 @@
-from pandac.PandaModules import *
+from panda3d.core import *
 from ClusterMsgs import *
 from ClusterMsgs import *
 from direct.distributed.MsgTypes import *
 from direct.distributed.MsgTypes import *
 from direct.directnotify import DirectNotifyGlobal
 from direct.directnotify import DirectNotifyGlobal

+ 3 - 3
direct/src/directbase/TestStart.py

@@ -1,10 +1,10 @@
-print 'TestStart: Starting up test environment.'
+print('TestStart: Starting up test environment.')
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 
 
 from direct.showbase.PythonUtil import *
 from direct.showbase.PythonUtil import *
 from direct.showbase import ShowBase
 from direct.showbase import ShowBase
-ShowBase.ShowBase()
+base = ShowBase.ShowBase()
 
 
 # Put an axis in the world:
 # Put an axis in the world:
 loader.loadModel("models/misc/xyzAxis").reparentTo(render)
 loader.loadModel("models/misc/xyzAxis").reparentTo(render)

+ 2 - 16
direct/src/directdevices/DirectDeviceManager.py

@@ -1,7 +1,8 @@
 """ Class used to create and control vrpn devices """
 """ Class used to create and control vrpn devices """
 
 
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.vrpn import *
 
 
 ANALOG_MIN = -0.95
 ANALOG_MIN = -0.95
 ANALOG_MAX = 0.95
 ANALOG_MAX = 0.95
@@ -294,18 +295,3 @@ class DirectTimecodeReader(AnalogNode, DirectObject):
     def __repr__(self):
     def __repr__(self):
         str = ('%s: %d:%d:%d:%d' % ((self.name,) + self.getTime()[:-1]))
         str = ('%s: %d:%d:%d:%d' % ((self.name,) + self.getTime()[:-1]))
         return str
         return str
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

+ 0 - 1
direct/src/directnotify/Logger.py

@@ -1,7 +1,6 @@
 """Logger module: contains the logger class which creates and writes
 """Logger module: contains the logger class which creates and writes
    data to log files on disk"""
    data to log files on disk"""
 
 
-import sys
 import time
 import time
 import math
 import math
 
 

+ 0 - 1
direct/src/directnotify/Notifier.py

@@ -6,7 +6,6 @@ from LoggerGlobal import defaultLogger
 from direct.showbase import PythonUtil
 from direct.showbase import PythonUtil
 from panda3d.core import ConfigVariableBool, NotifyCategory, StreamWriter, Notify
 from panda3d.core import ConfigVariableBool, NotifyCategory, StreamWriter, Notify
 import time
 import time
-import types
 import sys
 import sys
 
 
 class Notifier:
 class Notifier:

+ 1 - 1
direct/src/directscripts/doxygen_filter.py

@@ -2,7 +2,7 @@
 doxygen can understand and process.  It can be used
 doxygen can understand and process.  It can be used
 as an INPUT_FILTER in doxygen. """
 as an INPUT_FILTER in doxygen. """
 
 
-import sys, re, os
+import sys, os
 
 
 # Explicitly include these files.  Besides these, all
 # Explicitly include these files.  Besides these, all
 # files ending in _src will be explicitly included too.
 # files ending in _src will be explicitly included too.

+ 1 - 1
direct/src/directscripts/extract_docs.py

@@ -7,7 +7,7 @@ files in the lib/pandac/input directory. """
 
 
 __all__ = []
 __all__ = []
 
 
-import os, re
+import os
 import panda3d, pandac
 import panda3d, pandac
 from panda3d.dtoolconfig import *
 from panda3d.dtoolconfig import *
 
 

+ 1 - 1
direct/src/directtools/DirectCameraControl.py

@@ -222,7 +222,7 @@ class DirectCameraControl(DirectObject):
             skipFlags |= SKIP_CAMERA * (1 - base.getControl())
             skipFlags |= SKIP_CAMERA * (1 - base.getControl())
             self.computeCOA(base.direct.iRay.pickGeom(skipFlags = skipFlags))
             self.computeCOA(base.direct.iRay.pickGeom(skipFlags = skipFlags))
             # Record reference point
             # Record reference point
-            self.coaMarkerRef.iPosHprScale(base.cam)
+            self.coaMarkerRef.setPosHprScale(base.cam, 0, 0, 0, 0, 0, 0, 1, 1, 1)
             # Record entries
             # Record entries
             self.cqEntries = []
             self.cqEntries = []
             for i in range(base.direct.iRay.getNumEntries()):
             for i in range(base.direct.iRay.getNumEntries()):

+ 1 - 1
direct/src/directtools/DirectGeometry.py

@@ -1,5 +1,5 @@
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 from DirectGlobals import *
 from DirectGlobals import *
 from DirectUtil import *
 from DirectUtil import *
 import math
 import math

+ 1 - 1
direct/src/directtools/DirectGlobals.py

@@ -1,4 +1,4 @@
-from pandac.PandaModules import Vec3, Point3, BitMask32
+from panda3d.core import Vec3, Point3, BitMask32
 
 
 UNPICKABLE = ['x-disc-visible', 'y-disc-visible', 'z-disc-visible',
 UNPICKABLE = ['x-disc-visible', 'y-disc-visible', 'z-disc-visible',
               'GridBack', 'unpickable']
               'GridBack', 'unpickable']

+ 1 - 1
direct/src/directtools/DirectGrid.py

@@ -1,5 +1,5 @@
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
 from DirectUtil import *
 from DirectUtil import *
 from DirectGeometry import *
 from DirectGeometry import *

+ 1 - 1
direct/src/directtools/DirectLights.py

@@ -1,5 +1,5 @@
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 from string import lower
 from string import lower
 
 
 class DirectLight(NodePath):
 class DirectLight(NodePath):

+ 7 - 9
direct/src/directtools/DirectSession.py

@@ -2,7 +2,7 @@ import math
 import types
 import types
 import string
 import string
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 from DirectUtil import *
 from DirectUtil import *
 
 
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
@@ -304,6 +304,7 @@ class DirectSession(DirectObject):
         except NameError:
         except NameError:
             # Has the clusterMode been set via a config variable?
             # Has the clusterMode been set via a config variable?
             self.clusterMode = base.config.GetString("cluster-mode", '')
             self.clusterMode = base.config.GetString("cluster-mode", '')
+
         if self.clusterMode == 'client':
         if self.clusterMode == 'client':
             self.cluster = createClusterClient()
             self.cluster = createClusterClient()
         elif self.clusterMode == 'server':
         elif self.clusterMode == 'server':
@@ -400,7 +401,7 @@ class DirectSession(DirectObject):
 
 
         if self.oobeMode:
         if self.oobeMode:
             # Position a target point to lerp the oobe camera to
             # Position a target point to lerp the oobe camera to
-            base.direct.cameraControl.camManipRef.iPosHpr(self.trueCamera)
+            base.direct.cameraControl.camManipRef.setPosHpr(self.trueCamera, 0, 0, 0, 0, 0, 0)
             ival = self.oobeCamera.posHprInterval(
             ival = self.oobeCamera.posHprInterval(
                 2.0, pos = Point3(0), hpr = Vec3(0), 
                 2.0, pos = Point3(0), hpr = Vec3(0), 
                 other = base.direct.cameraControl.camManipRef,
                 other = base.direct.cameraControl.camManipRef,
@@ -416,7 +417,7 @@ class DirectSession(DirectObject):
             cameraParent = self.camera.getParent()
             cameraParent = self.camera.getParent()
             # Prepare oobe camera
             # Prepare oobe camera
             self.oobeCamera.reparentTo(cameraParent)
             self.oobeCamera.reparentTo(cameraParent)
-            self.oobeCamera.iPosHpr(self.trueCamera)
+            self.oobeCamera.setPosHpr(self.trueCamera, 0, 0, 0, 0, 0, 0)
             # Put camera under new oobe camera
             # Put camera under new oobe camera
             self.cam.reparentTo(self.oobeCamera)
             self.cam.reparentTo(self.oobeCamera)
             # Position a target point to lerp the oobe camera to
             # Position a target point to lerp the oobe camera to
@@ -432,13 +433,13 @@ class DirectSession(DirectObject):
 
 
     def beginOOBE(self):
     def beginOOBE(self):
         # Make sure we've reached our final destination
         # Make sure we've reached our final destination
-        self.oobeCamera.iPosHpr(base.direct.cameraControl.camManipRef)
+        self.oobeCamera.setPosHpr(base.direct.cameraControl.camManipRef, 0, 0, 0, 0, 0, 0)
         base.direct.camera = self.oobeCamera
         base.direct.camera = self.oobeCamera
         self.oobeMode = 1
         self.oobeMode = 1
 
 
     def endOOBE(self):
     def endOOBE(self):
         # Make sure we've reached our final destination
         # Make sure we've reached our final destination
-        self.oobeCamera.iPosHpr(self.trueCamera)
+        self.oobeCamera.setPosHpr(self.trueCamera, 0, 0, 0, 0, 0, 0)
         # Disable OOBE mode.
         # Disable OOBE mode.
         self.cam.reparentTo(self.trueCamera)
         self.cam.reparentTo(self.trueCamera)
         base.direct.camera = self.trueCamera
         base.direct.camera = self.trueCamera
@@ -806,7 +807,7 @@ class DirectSession(DirectObject):
                            [nodePath, oldParent, self.activeParent, fWrt])
                            [nodePath, oldParent, self.activeParent, fWrt])
 
 
     def isNotCycle(self, nodePath, parent):
     def isNotCycle(self, nodePath, parent):
-        if nodePath.id() == parent.id():
+        if nodePath == parent:
             print 'DIRECT.reparent: Invalid parent'
             print 'DIRECT.reparent: Invalid parent'
             return 0
             return 0
         elif parent.hasParent():
         elif parent.hasParent():
@@ -1308,6 +1309,3 @@ class DisplayRegionList(DirectObject):
             if drc.cam == cam:
             if drc.cam == cam:
                 self.displayRegionList.remove(drc)
                 self.displayRegionList.remove(drc)
                 break
                 break
-
-# Create one
-__builtins__['direct'] = base.direct = DirectSession()

+ 2 - 1
direct/src/distributed/PyDatagram.py

@@ -3,7 +3,8 @@
 # class variable FuncDict and so we can import DCSubatomicType at the top
 # class variable FuncDict and so we can import DCSubatomicType at the top
 # of the file rather than every time we call the putArg function.
 # of the file rather than every time we call the putArg function.
 
 
-from pandac.PandaModules import *
+from panda3d.core import Datagram
+from panda3d.direct import *
 # Import the type numbers
 # Import the type numbers
 
 
 #from otp.ai.AIMsgTypes import *
 #from otp.ai.AIMsgTypes import *

+ 2 - 1
direct/src/distributed/PyDatagramIterator.py

@@ -3,7 +3,8 @@
 # class variable FuncDict and so we can import DCSubatomicType at the top
 # class variable FuncDict and so we can import DCSubatomicType at the top
 # of the file rather than every time we call the putArg function.
 # of the file rather than every time we call the putArg function.
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 # Import the type numbers
 # Import the type numbers
 
 
 class PyDatagramIterator(DatagramIterator):
 class PyDatagramIterator(DatagramIterator):

+ 5 - 4
direct/src/extensions_native/CInterval_extensions.py

@@ -1,7 +1,8 @@
+from .core import Dtool_funcToMethod
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
-notify = directNotify.newCategory("Interval")
-Dtool_ObjectToDict(CInterval,"notify", notify)
-del notify
+
+CInterval.DtoolClassDict["notify"] = directNotify.newCategory("Interval")
+
 #####################################################################
 #####################################################################
 def setT(self, t):
 def setT(self, t):
     # Overridden from the C++ function to call privPostEvent
     # Overridden from the C++ function to call privPostEvent
@@ -10,7 +11,7 @@ def setT(self, t):
     self.setT_Old(t)
     self.setT_Old(t)
     self.privPostEvent()
     self.privPostEvent()
 
 
-Dtool_ObjectToDict(CInterval, "setT_Old", CInterval.setT)
+CInterval.DtoolClassDict["setT_Old"] = CInterval.setT
 Dtool_funcToMethod(setT, CInterval)
 Dtool_funcToMethod(setT, CInterval)
 del setT
 del setT
 #####################################################################
 #####################################################################

+ 47 - 742
direct/src/extensions_native/NodePath_extensions.py

@@ -10,22 +10,16 @@ of the NodePath class
 
 
 ####################################################################
 ####################################################################
 def id(self):
 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."
+        """Deprecated.  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)
 del id
 del id
 #####################################################################
 #####################################################################
-
-##    def __hash__(self):  // inside c code
-##        return self.getKey()
-#####################################################################
-
-    # For iterating over children
 def getChildrenAsList(self):
 def getChildrenAsList(self):
-        """Converts a node path's child NodePathCollection into a list"""
-        print "Warning: NodePath.getChildrenAsList() is deprecated.  Use get_children() instead."
+        """Deprecated.  Converts a node path's child NodePathCollection into a list"""
+        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)
@@ -35,7 +29,7 @@ del getChildrenAsList
 def printChildren(self):
 def printChildren(self):
         """Prints out the children of the bottom node of a node path"""
         """Prints out the children of the bottom node of a node path"""
         for child in self.getChildren():
         for child in self.getChildren():
-            print child.getName()
+            print(child.getName())
 Dtool_funcToMethod(printChildren, NodePath)
 Dtool_funcToMethod(printChildren, NodePath)
 del printChildren
 del printChildren
 #####################################################################
 #####################################################################
@@ -95,8 +89,8 @@ del isolate
 #####################################################################
 #####################################################################
 
 
 def remove(self):
 def remove(self):
-        """Remove a node path from the scene graph"""
-        print "Warning: NodePath.remove() is deprecated.  Use remove_node() instead."
+        """Deprecated.  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])
@@ -109,11 +103,11 @@ del remove
 def lsNames(self):
 def lsNames(self):
         """Walk down a tree and print out the path"""
         """Walk down a tree and print out the path"""
         if self.isEmpty():
         if self.isEmpty():
-            print "(empty)"
+            print("(empty)")
         else:
         else:
             type = self.node().getType().getName()
             type = self.node().getType().getName()
             name = self.getName()
             name = self.getName()
-            print type + "  " + name
+            print(type + "  " + name)
             self.lsNamesRecurse()
             self.lsNamesRecurse()
 
 
 Dtool_funcToMethod(lsNames, NodePath)
 Dtool_funcToMethod(lsNames, NodePath)
@@ -124,7 +118,7 @@ def lsNamesRecurse(self, indentString=' '):
         for nodePath in self.getChildren():
         for nodePath in self.getChildren():
             type = nodePath.node().getType().getName()
             type = nodePath.node().getType().getName()
             name = nodePath.getName()
             name = nodePath.getName()
-            print indentString + type + "  " + name
+            print(indentString + type + "  " + name)
             nodePath.lsNamesRecurse(indentString + " ")
             nodePath.lsNamesRecurse(indentString + " ")
 
 
 Dtool_funcToMethod(lsNamesRecurse, NodePath)
 Dtool_funcToMethod(lsNamesRecurse, NodePath)
@@ -138,7 +132,7 @@ def reverseLsNames(self):
         for nodePath in ancestry:
         for nodePath in ancestry:
             type = nodePath.node().getType().getName()
             type = nodePath.node().getType().getName()
             name = nodePath.getName()
             name = nodePath.getName()
-            print indentString + type + "  " + name
+            print(indentString + type + "  " + name)
             indentString = indentString + " "
             indentString = indentString + " "
 
 
 Dtool_funcToMethod(reverseLsNames, NodePath)
 Dtool_funcToMethod(reverseLsNames, NodePath)
@@ -146,7 +140,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 get_ancestors() 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
@@ -197,11 +191,11 @@ def printPos(self, other = None, sd = 2):
         else:
         else:
             pos = self.getPos()
             pos = self.getPos()
             otherString = ''
             otherString = ''
-        print (self.getName() + '.setPos(' + otherString +
+        print((self.getName() + '.setPos(' + otherString +
                formatString % pos[0] + ', ' +
                formatString % pos[0] + ', ' +
                formatString % pos[1] + ', ' +
                formatString % pos[1] + ', ' +
                formatString % pos[2] +
                formatString % pos[2] +
-               ')\n')
+               ')\n'))
 Dtool_funcToMethod(printPos, NodePath)
 Dtool_funcToMethod(printPos, NodePath)
 del printPos
 del printPos
 #####################################################################
 #####################################################################
@@ -215,11 +209,11 @@ def printHpr(self, other = None, sd = 2):
         else:
         else:
             hpr = self.getHpr()
             hpr = self.getHpr()
             otherString = ''
             otherString = ''
-        print (self.getName() + '.setHpr(' + otherString +
+        print((self.getName() + '.setHpr(' + otherString +
                formatString % hpr[0] + ', ' +
                formatString % hpr[0] + ', ' +
                formatString % hpr[1] + ', ' +
                formatString % hpr[1] + ', ' +
                formatString % hpr[2] +
                formatString % hpr[2] +
-               ')\n')
+               ')\n'))
 Dtool_funcToMethod(printHpr, NodePath)
 Dtool_funcToMethod(printHpr, NodePath)
 del printHpr
 del printHpr
 #####################################################################
 #####################################################################
@@ -233,11 +227,11 @@ def printScale(self, other = None, sd = 2):
         else:
         else:
             scale = self.getScale()
             scale = self.getScale()
             otherString = ''
             otherString = ''
-        print (self.getName() + '.setScale(' + otherString +
+        print((self.getName() + '.setScale(' + otherString +
                formatString % scale[0] + ', ' +
                formatString % scale[0] + ', ' +
                formatString % scale[1] + ', ' +
                formatString % scale[1] + ', ' +
                formatString % scale[2] +
                formatString % scale[2] +
-               ')\n')
+               ')\n'))
 
 
 Dtool_funcToMethod(printScale, NodePath)
 Dtool_funcToMethod(printScale, NodePath)
 del printScale
 del printScale
@@ -253,14 +247,14 @@ def printPosHpr(self, other = None, sd = 2):
             pos = self.getPos()
             pos = self.getPos()
             hpr = self.getHpr()
             hpr = self.getHpr()
             otherString = ''
             otherString = ''
-        print (self.getName() + '.setPosHpr(' + otherString +
+        print((self.getName() + '.setPosHpr(' + otherString +
                formatString % pos[0] + ', ' +
                formatString % pos[0] + ', ' +
                formatString % pos[1] + ', ' +
                formatString % pos[1] + ', ' +
                formatString % pos[2] + ', ' +
                formatString % pos[2] + ', ' +
                formatString % hpr[0] + ', ' +
                formatString % hpr[0] + ', ' +
                formatString % hpr[1] + ', ' +
                formatString % hpr[1] + ', ' +
                formatString % hpr[2] +
                formatString % hpr[2] +
-               ')\n')
+               ')\n'))
 
 
 Dtool_funcToMethod(printPosHpr, NodePath)
 Dtool_funcToMethod(printPosHpr, NodePath)
 del printPosHpr
 del printPosHpr
@@ -278,7 +272,7 @@ def printPosHprScale(self, other = None, sd = 2):
             hpr = self.getHpr()
             hpr = self.getHpr()
             scale = self.getScale()
             scale = self.getScale()
             otherString = ''
             otherString = ''
-        print (self.getName() + '.setPosHprScale(' + otherString +
+        print((self.getName() + '.setPosHprScale(' + otherString +
                formatString % pos[0] + ', ' +
                formatString % pos[0] + ', ' +
                formatString % pos[1] + ', ' +
                formatString % pos[1] + ', ' +
                formatString % pos[2] + ', ' +
                formatString % pos[2] + ', ' +
@@ -288,14 +282,14 @@ def printPosHprScale(self, other = None, sd = 2):
                formatString % scale[0] + ', ' +
                formatString % scale[0] + ', ' +
                formatString % scale[1] + ', ' +
                formatString % scale[1] + ', ' +
                formatString % scale[2] +
                formatString % scale[2] +
-               ')\n')
+               ')\n'))
 
 
 Dtool_funcToMethod(printPosHprScale, NodePath)
 Dtool_funcToMethod(printPosHprScale, NodePath)
 del printPosHprScale
 del printPosHprScale
 #####################################################################
 #####################################################################
 
 
 def printTransform(self, other = None, sd = 2, fRecursive = 0):
 def printTransform(self, other = None, sd = 2, fRecursive = 0):
-    from pandac.PandaModules import Vec3
+    from panda3d.core import Vec3
     fmtStr = '%%0.%df' % sd
     fmtStr = '%%0.%df' % sd
     name = self.getName()
     name = self.getName()
     if other == None:
     if other == None:
@@ -306,23 +300,23 @@ def printTransform(self, other = None, sd = 2, fRecursive = 0):
         pos = transform.getPos()
         pos = transform.getPos()
         if not pos.almostEqual(Vec3(0)):
         if not pos.almostEqual(Vec3(0)):
             outputString = '%s.setPos(%s, %s, %s)' % (name, fmtStr, fmtStr, fmtStr)
             outputString = '%s.setPos(%s, %s, %s)' % (name, fmtStr, fmtStr, fmtStr)
-            print outputString % (pos[0], pos[1], pos[2])
+            print(outputString % (pos[0], pos[1], pos[2]))
     if transform.hasHpr():
     if transform.hasHpr():
         hpr = transform.getHpr()
         hpr = transform.getHpr()
         if not hpr.almostEqual(Vec3(0)):
         if not hpr.almostEqual(Vec3(0)):
             outputString = '%s.setHpr(%s, %s, %s)' % (name, fmtStr, fmtStr, fmtStr)
             outputString = '%s.setHpr(%s, %s, %s)' % (name, fmtStr, fmtStr, fmtStr)
-            print outputString % (hpr[0], hpr[1], hpr[2])
+            print(outputString % (hpr[0], hpr[1], hpr[2]))
     if transform.hasScale():
     if transform.hasScale():
         if transform.hasUniformScale():
         if transform.hasUniformScale():
             scale = transform.getUniformScale()
             scale = transform.getUniformScale()
             if scale != 1.0:
             if scale != 1.0:
                 outputString = '%s.setScale(%s)' % (name, fmtStr)
                 outputString = '%s.setScale(%s)' % (name, fmtStr)
-                print outputString % scale
+                print(outputString % scale)
         else:
         else:
             scale = transform.getScale()
             scale = transform.getScale()
             if not scale.almostEqual(Vec3(1)):
             if not scale.almostEqual(Vec3(1)):
                 outputString = '%s.setScale(%s, %s, %s)' % (name, fmtStr, fmtStr, fmtStr)
                 outputString = '%s.setScale(%s, %s, %s)' % (name, fmtStr, fmtStr, fmtStr)
-                print outputString % (scale[0], scale[1], scale[2])
+                print(outputString % (scale[0], scale[1], scale[2]))
     if fRecursive:
     if fRecursive:
         for child in self.getChildren():
         for child in self.getChildren():
             child.printTransform(other, sd, fRecursive)
             child.printTransform(other, sd, fRecursive)
@@ -383,700 +377,6 @@ def iPosHprScale(self, other = None):
 Dtool_funcToMethod(iPosHprScale, NodePath)
 Dtool_funcToMethod(iPosHprScale, NodePath)
 del iPosHprScale
 del iPosHprScale
 #####################################################################
 #####################################################################
-
-def __lerp(self, functorFunc, duration, blendType, taskName=None):
-        """
-        __lerp(self, functorFunc, float, string, string)
-        Basic lerp functionality used by other lerps.
-        Fire off a lerp. Make it a task if taskName given.
-        """
-        # functorFunc is a function which can be called to create a functor.
-        # functor creation is defered so initial state (sampled in functorFunc)
-        # will be appropriate for the time the lerp is spawned
-        from direct.task import Task
-        from direct.interval import LerpBlendHelpers
-        from direct.task.TaskManagerGlobal import taskMgr
-
-        # make the task function
-        def lerpTaskFunc(task):
-            from pandac.PandaModules import Lerp
-            from pandac.PandaModules import ClockObject
-            from direct.task.Task import Task, cont, done
-            if task.init == 1:
-                # make the lerp
-                functor = task.functorFunc()
-                task.lerp = Lerp(functor, task.duration, task.blendType)
-                task.init = 0
-            dt = globalClock.getDt()
-            task.lerp.setStepSize(dt)
-            task.lerp.step()
-            if (task.lerp.isDone()):
-                # Reset the init flag, in case the task gets re-used
-                task.init = 1
-                return(done)
-            else:
-                return(cont)
-
-        # make the lerp task
-        lerpTask = Task.Task(lerpTaskFunc)
-        lerpTask.init = 1
-        lerpTask.functorFunc = functorFunc
-        lerpTask.duration = duration
-        lerpTask.blendType = LerpBlendHelpers.getBlend(blendType)
-
-        if (taskName == None):
-            # don't spawn a task, return one instead
-            return lerpTask
-        else:
-            # spawn the lerp task
-            taskMgr.add(lerpTask, taskName)
-            return lerpTask
-
-Dtool_funcToMethod(__lerp, NodePath)
-del __lerp
-#####################################################################
-def __autoLerp(self, functorFunc, time, blendType, taskName):
-        """_autoLerp(self, functor, float, string, string)
-        This lerp uses C++ to handle the stepping. Bonus is
-        its more efficient, trade-off is there is less control"""
-        from pandac.PandaModules import AutonomousLerp
-        from direct.interval import LerpBlendHelpers
-        # make a lerp that lives in C++ land
-        functor = functorFunc()
-        lerp = AutonomousLerp(functor, time,
-                              LerpBlendHelpers.getBlend(blendType),
-                              base.eventHandler)
-        lerp.start()
-        return lerp
-
-Dtool_funcToMethod(__autoLerp, NodePath)
-del __autoLerp
-#####################################################################
-
-# user callable lerp methods
-def lerpColor(self, *posArgs, **keyArgs):
-        """lerpColor(self, *positionArgs, **keywordArgs)
-        determine which lerpColor* to call based on arguments
-        """
-        if (len(posArgs) == 2):
-            return apply(self.lerpColorVBase4, posArgs, keyArgs)
-        elif (len(posArgs) == 3):
-            return apply(self.lerpColorVBase4VBase4, posArgs, keyArgs)
-        elif (len(posArgs) == 5):
-            return apply(self.lerpColorRGBA, posArgs, keyArgs)
-        elif (len(posArgs) == 9):
-            return apply(self.lerpColorRGBARGBA, posArgs, keyArgs)
-        else:
-            # bad args
-            raise Exception("Error: NodePath.lerpColor: bad number of args")
-
-Dtool_funcToMethod(lerpColor, NodePath)
-del lerpColor
-#####################################################################
-
-def lerpColorRGBA(self, r, g, b, a, time,
-                      blendType="noBlend", auto=None, task=None):
-        """lerpColorRGBA(self, float, float, float, float, float,
-        string="noBlend", string=none, string=none)
-        """
-        def functorFunc(self = self, r = r, g = g, b = b, a = a):
-            from pandac.PandaModules import ColorLerpFunctor
-            # just end rgba values, use current color rgba values for start
-            startColor = self.getColor()
-            functor = ColorLerpFunctor(
-                self,
-                startColor[0], startColor[1],
-                startColor[2], startColor[3],
-                r, g, b, a)
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-Dtool_funcToMethod(lerpColorRGBA, NodePath)
-del lerpColorRGBA
-#####################################################################
-def lerpColorRGBARGBA(self, sr, sg, sb, sa, er, eg, eb, ea, time,
-                          blendType="noBlend", auto=None, task=None):
-        """lerpColorRGBARGBA(self, float, float, float, float, float,
-        float, float, float, float, string="noBlend", string=none, string=none)
-        """
-        def functorFunc(self = self, sr = sr, sg = sg, sb = sb, sa = sa,
-                        er = er, eg = eg, eb = eb, ea = ea):
-            from pandac.PandaModules import ColorLerpFunctor
-            # start and end rgba values
-            functor = ColorLerpFunctor(self, sr, sg, sb, sa,
-                                                        er, eg, eb, ea)
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-Dtool_funcToMethod(lerpColorRGBARGBA, NodePath)
-del lerpColorRGBARGBA
-#####################################################################
-def lerpColorVBase4(self, endColor, time,
-                        blendType="noBlend", auto=None, task=None):
-        """lerpColorVBase4(self, VBase4, float, string="noBlend", string=none,
-        string=none)
-        """
-        def functorFunc(self = self, endColor = endColor):
-            from pandac.PandaModules import ColorLerpFunctor
-            # just end vec4, use current color for start
-            startColor = self.getColor()
-            functor = ColorLerpFunctor(
-                self, startColor, endColor)
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-Dtool_funcToMethod(lerpColorVBase4, NodePath)
-del lerpColorVBase4
-#####################################################################
-def lerpColorVBase4VBase4(self, startColor, endColor, time,
-                          blendType="noBlend", auto=None, task=None):
-        """lerpColorVBase4VBase4(self, VBase4, VBase4, float, string="noBlend",
-        string=none, string=none)
-        """
-        def functorFunc(self = self, startColor = startColor,
-                        endColor = endColor):
-            from pandac.PandaModules import ColorLerpFunctor
-            # start color and end vec
-            functor = ColorLerpFunctor(
-                self, startColor, endColor)
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-
-
-Dtool_funcToMethod(lerpColorVBase4VBase4, NodePath)
-del lerpColorVBase4VBase4
-#####################################################################
-    # user callable lerp methods
-def lerpColorScale(self, *posArgs, **keyArgs):
-        """lerpColorScale(self, *positionArgs, **keywordArgs)
-        determine which lerpColorScale* to call based on arguments
-        """
-        if (len(posArgs) == 2):
-            return apply(self.lerpColorScaleVBase4, posArgs, keyArgs)
-        elif (len(posArgs) == 3):
-            return apply(self.lerpColorScaleVBase4VBase4, posArgs, keyArgs)
-        elif (len(posArgs) == 5):
-            return apply(self.lerpColorScaleRGBA, posArgs, keyArgs)
-        elif (len(posArgs) == 9):
-            return apply(self.lerpColorScaleRGBARGBA, posArgs, keyArgs)
-        else:
-            # bad args
-            raise Exception("Error: NodePath.lerpColorScale: bad number of args")
-
-
-Dtool_funcToMethod(lerpColorScale, NodePath)
-del lerpColorScale
-#####################################################################
-def lerpColorScaleRGBA(self, r, g, b, a, time,
-                      blendType="noBlend", auto=None, task=None):
-        """lerpColorScaleRGBA(self, float, float, float, float, float,
-        string="noBlend", string=none, string=none)
-        """
-        def functorFunc(self = self, r = r, g = g, b = b, a = a):
-            from pandac.PandaModules import ColorScaleLerpFunctor
-            # just end rgba values, use current color rgba values for start
-            startColor = self.getColor()
-            functor = ColorScaleLerpFunctor(
-                self,
-                startColor[0], startColor[1],
-                startColor[2], startColor[3],
-                r, g, b, a)
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-Dtool_funcToMethod(lerpColorScaleRGBA, NodePath)
-del lerpColorScaleRGBA
-#####################################################################
-def lerpColorScaleRGBARGBA(self, sr, sg, sb, sa, er, eg, eb, ea, time,
-                          blendType="noBlend", auto=None, task=None):
-        """lerpColorScaleRGBARGBA(self, float, float, float, float, float,
-        float, float, float, float, string="noBlend", string=none, string=none)
-        """
-        def functorFunc(self = self, sr = sr, sg = sg, sb = sb, sa = sa,
-                        er = er, eg = eg, eb = eb, ea = ea):
-            from pandac.PandaModules import ColorScaleLerpFunctor
-            # start and end rgba values
-            functor = ColorScaleLerpFunctor(self, sr, sg, sb, sa,
-                                                        er, eg, eb, ea)
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-Dtool_funcToMethod(lerpColorScaleRGBARGBA, NodePath)
-del lerpColorScaleRGBARGBA
-#####################################################################
-def lerpColorScaleVBase4(self, endColor, time,
-                        blendType="noBlend", auto=None, task=None):
-        """lerpColorScaleVBase4(self, VBase4, float, string="noBlend", string=none,
-        string=none)
-        """
-        def functorFunc(self = self, endColor = endColor):
-            from pandac.PandaModules import ColorScaleLerpFunctor
-            # just end vec4, use current color for start
-            startColor = self.getColor()
-            functor = ColorScaleLerpFunctor(
-                self, startColor, endColor)
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-Dtool_funcToMethod(lerpColorScaleVBase4, NodePath)
-del lerpColorScaleVBase4
-#####################################################################
-def lerpColorScaleVBase4VBase4(self, startColor, endColor, time,
-                          blendType="noBlend", auto=None, task=None):
-        """lerpColorScaleVBase4VBase4(self, VBase4, VBase4, float, string="noBlend",
-        string=none, string=none)
-        """
-        def functorFunc(self = self, startColor = startColor,
-                        endColor = endColor):
-            from pandac.PandaModules import ColorScaleLerpFunctor
-            # start color and end vec
-            functor = ColorScaleLerpFunctor(
-                self, startColor, endColor)
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-
-
-Dtool_funcToMethod(lerpColorScaleVBase4VBase4, NodePath)
-del lerpColorScaleVBase4VBase4
-#####################################################################
-def lerpHpr(self, *posArgs, **keyArgs):
-        """lerpHpr(self, *positionArgs, **keywordArgs)
-        Determine whether to call lerpHprHPR or lerpHprVBase3
-        based on first argument
-        """
-        # check to see if lerping with
-        # three floats or a VBase3
-        if (len(posArgs) == 4):
-            return apply(self.lerpHprHPR, posArgs, keyArgs)
-        elif(len(posArgs) == 2):
-            return apply(self.lerpHprVBase3, posArgs, keyArgs)
-        else:
-            # bad args
-            raise Exception("Error: NodePath.lerpHpr: bad number of args")
-
-Dtool_funcToMethod(lerpHpr, NodePath)
-del lerpHpr
-#####################################################################
-def lerpHprHPR(self, h, p, r, time, other=None,
-                   blendType="noBlend", auto=None, task=None, shortest=1):
-        """lerpHprHPR(self, float, float, float, float, string="noBlend",
-        string=none, string=none, NodePath=none)
-        Perform a hpr lerp with three floats as the end point
-        """
-        def functorFunc(self = self, h = h, p = p, r = r,
-                        other = other, shortest=shortest):
-            from pandac.PandaModules import HprLerpFunctor
-            # it's individual hpr components
-            if (other != None):
-                # lerp wrt other
-                startHpr = self.getHpr(other)
-                functor = HprLerpFunctor(
-                    self,
-                    startHpr[0], startHpr[1], startHpr[2],
-                    h, p, r, other)
-                if shortest:
-                    functor.takeShortest()
-            else:
-                startHpr = self.getHpr()
-                functor = HprLerpFunctor(
-                    self,
-                    startHpr[0], startHpr[1], startHpr[2],
-                    h, p, r)
-                if shortest:
-                    functor.takeShortest()
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-Dtool_funcToMethod(lerpHprHPR, NodePath)
-del lerpHprHPR
-#####################################################################
-def lerpHprVBase3(self, hpr, time, other=None,
-                      blendType="noBlend", auto=None, task=None, shortest=1):
-        """lerpHprVBase3(self, VBase3, float, string="noBlend", string=none,
-        string=none, NodePath=None)
-        Perform a hpr lerp with a VBase3 as the end point
-        """
-        def functorFunc(self = self, hpr = hpr,
-                        other = other, shortest=shortest):
-            from pandac.PandaModules import HprLerpFunctor
-            # it's a vbase3 hpr
-            if (other != None):
-                # lerp wrt other
-                functor = HprLerpFunctor(
-                    self, (self.getHpr(other)), hpr, other)
-                if shortest:
-                    functor.takeShortest()
-            else:
-                functor = HprLerpFunctor(
-                    self, (self.getHpr()), hpr)
-                if shortest:
-                    functor.takeShortest()
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-
-Dtool_funcToMethod(lerpHprVBase3, NodePath)
-del lerpHprVBase3
-#####################################################################
-def lerpPos(self, *posArgs, **keyArgs):
-        """lerpPos(self, *positionArgs, **keywordArgs)
-        Determine whether to call lerpPosXYZ or lerpPosPoint3
-        based on the first argument
-        """
-        # check to see if lerping with three
-        # floats or a Point3
-        if (len(posArgs) == 4):
-            return apply(self.lerpPosXYZ, posArgs, keyArgs)
-        elif(len(posArgs) == 2):
-            return apply(self.lerpPosPoint3, posArgs, keyArgs)
-        else:
-            # bad number off args
-            raise Exception("Error: NodePath.lerpPos: bad number of args")
-
-Dtool_funcToMethod(lerpPos, NodePath)
-del lerpPos
-#####################################################################
-def lerpPosXYZ(self, x, y, z, time, other=None,
-                   blendType="noBlend", auto=None, task=None):
-        """lerpPosXYZ(self, float, float, float, float, string="noBlend",
-        string=None, NodePath=None)
-        Perform a pos lerp with three floats as the end point
-        """
-        def functorFunc(self = self, x = x, y = y, z = z, other = other):
-            from pandac.PandaModules import PosLerpFunctor
-            if (other != None):
-                # lerp wrt other
-                startPos = self.getPos(other)
-                functor = PosLerpFunctor(self,
-                                         startPos[0], startPos[1], startPos[2],
-                                         x, y, z, other)
-            else:
-                startPos = self.getPos()
-                functor = PosLerpFunctor(self, startPos[0],
-                                         startPos[1], startPos[2], x, y, z)
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return  self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-Dtool_funcToMethod(lerpPosXYZ, NodePath)
-del lerpPosXYZ
-#####################################################################
-def lerpPosPoint3(self, pos, time, other=None,
-                      blendType="noBlend", auto=None, task=None):
-        """lerpPosPoint3(self, Point3, float, string="noBlend", string=None,
-        string=None, NodePath=None)
-        Perform a pos lerp with a Point3 as the end point
-        """
-        def functorFunc(self = self, pos = pos, other = other):
-            from pandac.PandaModules import PosLerpFunctor
-            if (other != None):
-                #lerp wrt other
-                functor = PosLerpFunctor(
-                    self, (self.getPos(other)), pos, other)
-            else:
-                functor = PosLerpFunctor(
-                    self, (self.getPos()), pos)
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-
-Dtool_funcToMethod(lerpPosPoint3, NodePath)
-del lerpPosPoint3
-#####################################################################
-def lerpPosHpr(self, *posArgs, **keyArgs):
-        """lerpPosHpr(self, *positionArgs, **keywordArgs)
-        Determine whether to call lerpPosHprXYZHPR or lerpHprPoint3VBase3
-        based on first argument
-        """
-        # check to see if lerping with
-        # six floats or a Point3 and a VBase3
-        if (len(posArgs) == 7):
-            return apply(self.lerpPosHprXYZHPR, posArgs, keyArgs)
-        elif(len(posArgs) == 3):
-            return apply(self.lerpPosHprPoint3VBase3, posArgs, keyArgs)
-        else:
-            # bad number off args
-            raise Exception("Error: NodePath.lerpPosHpr: bad number of args")
-
-Dtool_funcToMethod(lerpPosHpr, NodePath)
-del lerpPosHpr
-#####################################################################
-def lerpPosHprPoint3VBase3(self, pos, hpr, time, other=None,
-                               blendType="noBlend", auto=None, task=None, shortest=1):
-        """lerpPosHprPoint3VBase3(self, Point3, VBase3, string="noBlend",
-        string=none, string=none, NodePath=None)
-        """
-        def functorFunc(self = self, pos = pos, hpr = hpr,
-                        other = other, shortest=shortest):
-            from pandac.PandaModules import PosHprLerpFunctor
-            if (other != None):
-                # lerp wrt other
-                startPos = self.getPos(other)
-                startHpr = self.getHpr(other)
-                functor = PosHprLerpFunctor(
-                    self, startPos, pos,
-                    startHpr, hpr, other)
-                if shortest:
-                    functor.takeShortest()
-            else:
-                startPos = self.getPos()
-                startHpr = self.getHpr()
-                functor = PosHprLerpFunctor(
-                    self, startPos, pos,
-                    startHpr, hpr)
-                if shortest:
-                    functor.takeShortest()
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-Dtool_funcToMethod(lerpPosHprPoint3VBase3, NodePath)
-del lerpPosHprPoint3VBase3
-#####################################################################
-def lerpPosHprXYZHPR(self, x, y, z, h, p, r, time, other=None,
-                         blendType="noBlend", auto=None, task=None, shortest=1):
-        """lerpPosHpr(self, float, string="noBlend", string=none,
-        string=none, NodePath=None)
-        """
-        def functorFunc(self = self, x = x, y = y, z = z,
-                        h = h, p = p, r = r, other = other, shortest=shortest):
-            from pandac.PandaModules import PosHprLerpFunctor
-            if (other != None):
-                # lerp wrt other
-                startPos = self.getPos(other)
-                startHpr = self.getHpr(other)
-                functor = PosHprLerpFunctor(self,
-                                            startPos[0], startPos[1],
-                                            startPos[2], x, y, z,
-                                            startHpr[0], startHpr[1],
-                                            startHpr[2], h, p, r,
-                                            other)
-                if shortest:
-                    functor.takeShortest()
-            else:
-                startPos = self.getPos()
-                startHpr = self.getHpr()
-                functor = PosHprLerpFunctor(self,
-                                            startPos[0], startPos[1],
-                                            startPos[2], x, y, z,
-                                            startHpr[0], startHpr[1],
-                                            startHpr[2], h, p, r)
-                if shortest:
-                    functor.takeShortest()
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-
-Dtool_funcToMethod(lerpPosHprXYZHPR, NodePath)
-del lerpPosHprXYZHPR
-#####################################################################
-def lerpPosHprScale(self, pos, hpr, scale, time, other=None,
-                        blendType="noBlend", auto=None, task=None, shortest=1):
-        """lerpPosHpr(self, Point3, VBase3, float, float, string="noBlend",
-        string=none, string=none, NodePath=None)
-        Only one case, no need for extra args. Call the appropriate lerp
-        (auto, spawned, or blocking) based on how(if) a task name is given
-        """
-        def functorFunc(self = self, pos = pos, hpr = hpr,
-                        scale = scale, other = other, shortest=shortest):
-            from pandac.PandaModules import PosHprScaleLerpFunctor
-            if (other != None):
-                # lerp wrt other
-                startPos = self.getPos(other)
-                startHpr = self.getHpr(other)
-                startScale = self.getScale(other)
-                functor = PosHprScaleLerpFunctor(self,
-                                                 startPos, pos,
-                                                 startHpr, hpr,
-                                                 startScale, scale, other)
-                if shortest:
-                    functor.takeShortest()
-            else:
-                startPos = self.getPos()
-                startHpr = self.getHpr()
-                startScale = self.getScale()
-                functor = PosHprScaleLerpFunctor(self,
-                                                 startPos, pos,
-                                                 startHpr, hpr,
-                                                 startScale, scale)
-                if shortest:
-                    functor.takeShortest()
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-
-Dtool_funcToMethod(lerpPosHprScale, NodePath)
-del lerpPosHprScale
-#####################################################################
-def lerpScale(self, *posArgs, **keyArgs):
-        """lerpSclae(self, *positionArgs, **keywordArgs)
-        Determine whether to call lerpScaleXYZ or lerpScaleaseV3
-        based on the first argument
-        """
-        # check to see if lerping with three
-        # floats or a Point3
-        if (len(posArgs) == 4):
-            return apply(self.lerpScaleXYZ, posArgs, keyArgs)
-        elif(len(posArgs) == 2):
-            return apply(self.lerpScaleVBase3, posArgs, keyArgs)
-        else:
-            # bad number off args
-            raise Exception("Error: NodePath.lerpScale: bad number of args")
-
-Dtool_funcToMethod(lerpScale, NodePath)
-del lerpScale
-#####################################################################
-def lerpScaleVBase3(self, scale, time, other=None,
-                        blendType="noBlend", auto=None, task=None):
-        """lerpPos(self, VBase3, float, string="noBlend", string=none,
-        string=none, NodePath=None)
-        """
-        def functorFunc(self = self, scale = scale, other = other):
-            from pandac.PandaModules import ScaleLerpFunctor
-            if (other != None):
-                # lerp wrt other
-                functor = ScaleLerpFunctor(self,
-                                           (self.getScale(other)),
-                                           scale, other)
-            else:
-                functor = ScaleLerpFunctor(self,
-                                           (self.getScale()), scale)
-
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-Dtool_funcToMethod(lerpScaleVBase3, NodePath)
-del lerpScaleVBase3
-#####################################################################
-def lerpScaleXYZ(self, sx, sy, sz, time, other=None,
-                     blendType="noBlend", auto=None, task=None):
-        """lerpPos(self, float, float, float, float, string="noBlend",
-        string=none, string=none, NodePath=None)
-        """
-        def functorFunc(self = self, sx = sx, sy = sy, sz = sz, other = other):
-            from pandac.PandaModules import ScaleLerpFunctor
-            if (other != None):
-                # lerp wrt other
-                startScale = self.getScale(other)
-                functor = ScaleLerpFunctor(self,
-                                           startScale[0], startScale[1],
-                                           startScale[2], sx, sy, sz, other)
-            else:
-                startScale = self.getScale()
-                functor = ScaleLerpFunctor(self,
-                                           startScale[0], startScale[1],
-                                           startScale[2], sx, sy, sz)
-            return functor
-        #determine whether to use auto, spawned, or blocking lerp
-        if (auto != None):
-            return self.__autoLerp(functorFunc, time, blendType, auto)
-        elif (task != None):
-            return self.__lerp(functorFunc, time, blendType, task)
-        else:
-            return self.__lerp(functorFunc, time, blendType)
-
-
-
-
-Dtool_funcToMethod(lerpScaleXYZ, NodePath)
-del lerpScaleXYZ
-#####################################################################
 def place(self):
 def place(self):
         base.startDirect(fWantTk = 1)
         base.startDirect(fWantTk = 1)
         from direct.tkpanels import Placer
         from direct.tkpanels import Placer
@@ -1253,8 +553,8 @@ Dtool_funcToMethod(colorScaleInterval, NodePath)
 del colorScaleInterval
 del colorScaleInterval
 #####################################################################
 #####################################################################
 def attachCollisionSphere(self, name, cx, cy, cz, r, fromCollide, intoCollide):
 def attachCollisionSphere(self, name, cx, cy, cz, r, fromCollide, intoCollide):
-        from pandac.PandaModules import CollisionSphere
-        from pandac.PandaModules import CollisionNode
+        from panda3d.core import CollisionSphere
+        from panda3d.core import CollisionNode
         coll = CollisionSphere(cx, cy, cz, r)
         coll = CollisionSphere(cx, cy, cz, r)
         collNode = CollisionNode(name)
         collNode = CollisionNode(name)
         collNode.addSolid(coll)
         collNode.addSolid(coll)
@@ -1267,8 +567,8 @@ Dtool_funcToMethod(attachCollisionSphere, NodePath)
 del attachCollisionSphere
 del attachCollisionSphere
 #####################################################################
 #####################################################################
 def attachCollisionSegment(self, name, ax, ay, az, bx, by, bz, fromCollide, intoCollide):
 def attachCollisionSegment(self, name, ax, ay, az, bx, by, bz, fromCollide, intoCollide):
-        from pandac.PandaModules import CollisionSegment
-        from pandac.PandaModules import CollisionNode
+        from panda3d.core import CollisionSegment
+        from panda3d.core import CollisionNode
         coll = CollisionSegment(ax, ay, az, bx, by, bz)
         coll = CollisionSegment(ax, ay, az, bx, by, bz)
         collNode = CollisionNode(name)
         collNode = CollisionNode(name)
         collNode.addSolid(coll)
         collNode.addSolid(coll)
@@ -1281,8 +581,8 @@ Dtool_funcToMethod(attachCollisionSegment, NodePath)
 del attachCollisionSegment
 del attachCollisionSegment
 #####################################################################
 #####################################################################
 def attachCollisionRay(self, name, ox, oy, oz, dx, dy, dz, fromCollide, intoCollide):
 def attachCollisionRay(self, name, ox, oy, oz, dx, dy, dz, fromCollide, intoCollide):
-        from pandac.PandaModules import CollisionRay
-        from pandac.PandaModules import CollisionNode
+        from panda3d.core import CollisionRay
+        from panda3d.core import CollisionNode
         coll = CollisionRay(ox, oy, oz, dx, dy, dz)
         coll = CollisionRay(ox, oy, oz, dx, dy, dz)
         collNode = CollisionNode(name)
         collNode = CollisionNode(name)
         collNode.addSolid(coll)
         collNode.addSolid(coll)
@@ -1296,7 +596,7 @@ del attachCollisionRay
 #####################################################################
 #####################################################################
 def flattenMultitex(self, stateFrom = None, target = None,
 def flattenMultitex(self, stateFrom = None, target = None,
                         useGeom = 0, allowTexMat = 0, win = None):
                         useGeom = 0, allowTexMat = 0, win = None):
-        from pandac.PandaModules import MultitexReducer
+        from panda3d.core import MultitexReducer
         mr = MultitexReducer()
         mr = MultitexReducer()
         if target != None:
         if target != None:
             mr.setTarget(target)
             mr.setTarget(target)
@@ -1466,26 +766,31 @@ del r_constructCollisionTree
 
 
 #####################################################################
 #####################################################################
 def analyze(self):
 def analyze(self):
-        from pandac.PandaModules import SceneGraphAnalyzer
+        """
+        Analyzes the geometry below this node and reports the
+        number of vertices, triangles, etc.  This is the same
+        information reported by the bam-info program.
+        """
+        from panda3d.core import SceneGraphAnalyzer
         sga = SceneGraphAnalyzer()
         sga = SceneGraphAnalyzer()
         sga.addNode(self.node())
         sga.addNode(self.node())
         if sga.getNumLodNodes() == 0:
         if sga.getNumLodNodes() == 0:
-                print sga
+                print(sga)
         else:
         else:
-                print "At highest LOD:"
+                print("At highest LOD:")
                 sga2 = SceneGraphAnalyzer()
                 sga2 = SceneGraphAnalyzer()
                 sga2.setLodMode(sga2.LMHighest)
                 sga2.setLodMode(sga2.LMHighest)
                 sga2.addNode(self.node())
                 sga2.addNode(self.node())
-                print sga2
+                print(sga2)
 
 
-                print "\nAt lowest LOD:"
+                print("\nAt lowest LOD:")
                 sga2.clear()
                 sga2.clear()
                 sga2.setLodMode(sga2.LMLowest)
                 sga2.setLodMode(sga2.LMLowest)
                 sga2.addNode(self.node())
                 sga2.addNode(self.node())
-                print sga2
+                print(sga2)
 
 
-                print "\nAll nodes:"
-                print sga
+                print("\nAll nodes:")
+                print(sga)
 
 
 Dtool_funcToMethod(analyze, NodePath)
 Dtool_funcToMethod(analyze, NodePath)
 del analyze
 del analyze

+ 1 - 1
direct/src/extensions_native/VBase3_extensions.py

@@ -14,7 +14,7 @@ def asTuple(self):
     """
     """
     Returns the vector as a tuple.
     Returns the vector as a tuple.
     """
     """
-    print "Warning: VBase3.asTuple() is no longer needed and deprecated.  Use the vector directly instead."
+    print("Warning: VBase3.asTuple() is no longer needed and deprecated.  Use the vector directly instead.")
     return tuple(self)
     return tuple(self)
 Dtool_funcToMethod(asTuple, VBase3)
 Dtool_funcToMethod(asTuple, VBase3)
 del asTuple
 del asTuple

+ 1 - 1
direct/src/extensions_native/VBase4_extensions.py

@@ -14,7 +14,7 @@ def asTuple(self):
     """
     """
     Returns the vector as a tuple.
     Returns the vector as a tuple.
     """
     """
-    print "Warning: VBase4.asTuple() is no longer needed and deprecated.  Use the vector directly instead."
+    print("Warning: VBase4.asTuple() is no longer needed and deprecated.  Use the vector directly instead.")
     return tuple(self)
     return tuple(self)
 
 
 Dtool_funcToMethod(asTuple, VBase4)
 Dtool_funcToMethod(asTuple, VBase4)

+ 2 - 4
direct/src/ffi/DoGenPyCode.py

@@ -5,8 +5,6 @@ the user to specify alternate parameters on the command line. """
 import getopt
 import getopt
 import sys
 import sys
 import os
 import os
-import glob
-import types
 import time
 import time
 from direct.ffi import FFIConstants
 from direct.ffi import FFIConstants
 
 
@@ -224,7 +222,7 @@ def doErrorCheck():
         FFIConstants.CodeModuleNameList = codeLibs
         FFIConstants.CodeModuleNameList = codeLibs
 
 
 def generateNativeWrappers():
 def generateNativeWrappers():
-    from direct.extensions_native.extension_native_helpers import Dtool_FindModule, Dtool_PreloadDLL
+    from direct.extensions_native.extension_native_helpers import Dtool_PreloadDLL
 
 
     # Empty out the output directories of unnecessary crud from
     # Empty out the output directories of unnecessary crud from
     # previous runs before we begin.
     # previous runs before we begin.
@@ -337,7 +335,7 @@ def run():
 
 
     if doHTML:
     if doHTML:
         from direct.directscripts import gendocs
         from direct.directscripts import gendocs
-        from pandac.PandaModules import PandaSystem
+        from panda3d.core import PandaSystem
         versionString = '%s %s' % (
         versionString = '%s %s' % (
             PandaSystem.getDistributor(), PandaSystem.getVersionString())
             PandaSystem.getDistributor(), PandaSystem.getVersionString())
 
 

+ 0 - 1
direct/src/ffi/FFITypes.py

@@ -8,7 +8,6 @@ They get constructed by and stored in FFIInterrogateDatabase.
 
 
 """
 """
 
 
-import sys
 import os
 import os
 import string
 import string
 import FFIConstants
 import FFIConstants

+ 0 - 1
direct/src/ffi/jGenPyCode.py

@@ -72,7 +72,6 @@ if (EXTENSIONS is None):
 ##############################################################
 ##############################################################
 
 
 from direct.ffi import DoGenPyCode
 from direct.ffi import DoGenPyCode
-from direct.ffi import FFIConstants
 DoGenPyCode.outputCodeDir = PANDAC
 DoGenPyCode.outputCodeDir = PANDAC
 DoGenPyCode.outputHTMLDir = os.path.join(PANDAC,"..","doc")
 DoGenPyCode.outputHTMLDir = os.path.join(PANDAC,"..","doc")
 DoGenPyCode.directDir = DIRECT
 DoGenPyCode.directDir = DIRECT

+ 2 - 2
direct/src/filter/CommonFilters.py

@@ -19,8 +19,8 @@ from FilterManager import FilterManager
 from panda3d.core import LVecBase4, LPoint2
 from panda3d.core import LVecBase4, LPoint2
 from panda3d.core import Filename
 from panda3d.core import Filename
 from panda3d.core import AuxBitplaneAttrib
 from panda3d.core import AuxBitplaneAttrib
-from panda3d.core import RenderState, Texture, Shader, ATSNone
-import sys,os
+from panda3d.core import Texture, Shader, ATSNone
+import os
 
 
 CARTOON_BODY="""
 CARTOON_BODY="""
 float4 cartoondelta = k_cartoonseparation * texpix_txaux.xwyw;
 float4 cartoondelta = k_cartoonseparation * texpix_txaux.xwyw;

+ 3 - 4
direct/src/filter/FilterManager.py

@@ -14,13 +14,12 @@ Still need to implement:
 
 
 """
 """
 
 
-from panda3d.core import NodePath, PandaNode
-from panda3d.core import RenderState, Texture, Shader
+from panda3d.core import NodePath
+from panda3d.core import Texture
 from panda3d.core import CardMaker
 from panda3d.core import CardMaker
-from panda3d.core import TextureStage
 from panda3d.core import GraphicsPipe, GraphicsOutput
 from panda3d.core import GraphicsPipe, GraphicsOutput
 from panda3d.core import WindowProperties, FrameBufferProperties
 from panda3d.core import WindowProperties, FrameBufferProperties
-from panda3d.core import Camera, DisplayRegion
+from panda3d.core import Camera
 from panda3d.core import OrthographicLens
 from panda3d.core import OrthographicLens
 from panda3d.core import AuxBitplaneAttrib
 from panda3d.core import AuxBitplaneAttrib
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *

+ 0 - 1
direct/src/fsm/FourState.py

@@ -8,7 +8,6 @@ from direct.directnotify import DirectNotifyGlobal
 #import DistributedObject
 #import DistributedObject
 import ClassicFSM
 import ClassicFSM
 import State
 import State
-from direct.task import Task
 
 
 
 
 class FourState:
 class FourState:

+ 0 - 1
direct/src/fsm/SampleFSM.py

@@ -3,7 +3,6 @@
 __all__ = ['ClassicStyle', 'NewStyle', 'ToonEyes']
 __all__ = ['ClassicStyle', 'NewStyle', 'ToonEyes']
 
 
 import FSM
 import FSM
-from pandac.PandaModules import *
 from direct.task import Task
 from direct.task import Task
 import string
 import string
 
 

+ 0 - 1
direct/src/fsm/State.py

@@ -4,7 +4,6 @@ __all__ = ['State']
 
 
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
-import types
 
 
 
 
 class State(DirectObject):
 class State(DirectObject):

+ 1 - 1
direct/src/fsm/StatePush.py

@@ -5,7 +5,7 @@ __all__ = ['StateVar', 'FunctionCall', 'EnterExit', 'Pulse', 'EventPulse',
            'EventArgument', ]
            'EventArgument', ]
 
 
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
-import types
+
 
 
 class PushesStateChanges:
 class PushesStateChanges:
     # base class for objects that broadcast state changes to a set of subscriber objects
     # base class for objects that broadcast state changes to a set of subscriber objects

+ 1 - 1
direct/src/gui/DirectButton.py

@@ -2,7 +2,7 @@
 
 
 __all__ = ['DirectButton']
 __all__ = ['DirectButton']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from DirectFrame import *
 from DirectFrame import *
 
 

+ 1 - 1
direct/src/gui/DirectCheckBox.py

@@ -1,5 +1,5 @@
 from direct.gui.DirectGui import *
 from direct.gui.DirectGui import *
-from pandac.PandaModules import *
+from panda3d.core import *
 
 
 
 
 class DirectCheckBox(DirectButton):
 class DirectCheckBox(DirectButton):

+ 1 - 2
direct/src/gui/DirectCheckButton.py

@@ -2,8 +2,7 @@
 
 
 __all__ = ['DirectCheckButton']
 __all__ = ['DirectCheckButton']
 
 
-from pandac.PandaModules import *
-import DirectGuiGlobals as DGG
+from panda3d.core import *
 from DirectButton import *
 from DirectButton import *
 from DirectLabel import *
 from DirectLabel import *
 
 

+ 1 - 1
direct/src/gui/DirectDialog.py

@@ -2,7 +2,7 @@
 
 
 __all__ = ['findDialog', 'cleanupDialog', 'DirectDialog', 'OkDialog', 'OkCancelDialog', 'YesNoDialog', 'YesNoCancelDialog', 'RetryCancelDialog']
 __all__ = ['findDialog', 'cleanupDialog', 'DirectDialog', 'OkDialog', 'OkCancelDialog', 'YesNoDialog', 'YesNoCancelDialog', 'RetryCancelDialog']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from DirectFrame import *
 from DirectFrame import *
 from DirectButton import *
 from DirectButton import *

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

@@ -2,7 +2,7 @@
 
 
 __all__ = ['DirectEntry']
 __all__ = ['DirectEntry']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from DirectFrame import *
 from DirectFrame import *
 from OnscreenText import OnscreenText
 from OnscreenText import OnscreenText

+ 2 - 4
direct/src/gui/DirectEntryScroll.py

@@ -1,6 +1,6 @@
 __all__ = ['DirectEntryScroll']
 __all__ = ['DirectEntryScroll']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from DirectScrolledFrame import *
 from DirectScrolledFrame import *
 from DirectFrame import *
 from DirectFrame import *
@@ -114,6 +114,4 @@ class DirectEntryScroll(DirectFrame):
         
         
     def resetCanvas(self):
     def resetCanvas(self):
         self.canvas.setPos(0,0,0)
         self.canvas.setPos(0,0,0)
-        
-        
-        
+

+ 2 - 2
direct/src/gui/DirectFrame.py

@@ -2,12 +2,12 @@
 
 
 __all__ = ['DirectFrame']
 __all__ = ['DirectFrame']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from DirectGuiBase import *
 from DirectGuiBase import *
 from OnscreenImage import OnscreenImage
 from OnscreenImage import OnscreenImage
 from OnscreenGeom import OnscreenGeom
 from OnscreenGeom import OnscreenGeom
-import string, types
+import types
 
 
 class DirectFrame(DirectGuiWidget):
 class DirectFrame(DirectGuiWidget):
     DefDynGroups = ('text', 'geom', 'image')
     DefDynGroups = ('text', 'geom', 'image')

+ 3 - 5
direct/src/gui/DirectGuiBase.py

@@ -3,7 +3,7 @@
 __all__ = ['DirectGuiBase', 'DirectGuiWidget']
 __all__ = ['DirectGuiBase', 'DirectGuiWidget']
 
 
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from OnscreenText import *
 from OnscreenText import *
 from OnscreenGeom import *
 from OnscreenGeom import *
@@ -11,9 +11,7 @@ from OnscreenImage import *
 from direct.directtools.DirectUtil import ROUND_TO
 from direct.directtools.DirectUtil import ROUND_TO
 from direct.showbase import DirectObject
 from direct.showbase import DirectObject
 from direct.task import Task
 from direct.task import Task
-from direct.showbase import ShowBase
 from direct.showbase.PythonUtil import recordCreationStackStr
 from direct.showbase.PythonUtil import recordCreationStackStr
-from pandac.PandaModules import PStatCollector
 import types
 import types
 
 
 guiObjectCollector = PStatCollector("Client::GuiObjects")
 guiObjectCollector = PStatCollector("Client::GuiObjects")
@@ -1069,8 +1067,8 @@ class DirectGuiWidget(DirectGuiBase, NodePath):
     def printConfig(self, indent = 0):
     def printConfig(self, indent = 0):
         space = ' ' * indent
         space = ' ' * indent
         print space + self.guiId, '-', self.__class__.__name__
         print space + self.guiId, '-', self.__class__.__name__
-        print space + 'Pos:   ' + self.getPos().pPrintValues()
-        print space + 'Scale: ' + self.getScale().pPrintValues()
+        print space + 'Pos:   %s' % tuple(self.getPos())
+        print space + 'Scale: %s' % tuple(self.getScale())
         # Print out children info
         # Print out children info
         for child in self.getChildren():
         for child in self.getChildren():
             messenger.send(DGG.PRINT + child.getName(), [indent + 2])
             messenger.send(DGG.PRINT + child.getName(), [indent + 2])

+ 1 - 1
direct/src/gui/DirectGuiGlobals.py

@@ -7,7 +7,7 @@ __all__ = []
 Global definitions used by Direct Gui Classes and handy constants
 Global definitions used by Direct Gui Classes and handy constants
 that can be used during widget construction
 that can be used during widget construction
 """
 """
-from pandac.PandaModules import *
+from panda3d.core import *
 
 
 defaultFont = None
 defaultFont = None
 defaultFontFunc = TextNode.getDefaultFont
 defaultFontFunc = TextNode.getDefaultFont

+ 3 - 1
direct/src/gui/DirectGuiTest.py

@@ -4,11 +4,13 @@ __all__ = []
 
 
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
-    from direct.directbase import DirectStart
+    from direct.showbase.ShowBase import ShowBase
     from DirectGui import *
     from DirectGui import *
     #from whrandom import *
     #from whrandom import *
     from random import *
     from random import *
 
 
+    base = ShowBase()
+
     # EXAMPLE CODE
     # EXAMPLE CODE
     # Load a model
     # Load a model
     smiley = loader.loadModel('models/misc/smiley')
     smiley = loader.loadModel('models/misc/smiley')

+ 1 - 2
direct/src/gui/DirectLabel.py

@@ -2,8 +2,7 @@
 
 
 __all__ = ['DirectLabel']
 __all__ = ['DirectLabel']
 
 
-from pandac.PandaModules import *
-import DirectGuiGlobals as DGG
+from panda3d.core import *
 from DirectFrame import *
 from DirectFrame import *
 
 
 class DirectLabel(DirectFrame):
 class DirectLabel(DirectFrame):

+ 1 - 1
direct/src/gui/DirectOptionMenu.py

@@ -4,7 +4,7 @@ __all__ = ['DirectOptionMenu']
 
 
 import types
 import types
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from DirectButton import *
 from DirectButton import *
 from DirectLabel import *
 from DirectLabel import *

+ 1 - 1
direct/src/gui/DirectRadioButton.py

@@ -2,7 +2,7 @@
 
 
 __all__ = ['DirectRadioButton']
 __all__ = ['DirectRadioButton']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from DirectButton import *
 from DirectButton import *
 from DirectLabel import *
 from DirectLabel import *

+ 1 - 1
direct/src/gui/DirectScrollBar.py

@@ -2,7 +2,7 @@
 
 
 __all__ = ['DirectScrollBar']
 __all__ = ['DirectScrollBar']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from DirectFrame import *
 from DirectFrame import *
 from DirectButton import *
 from DirectButton import *

+ 1 - 1
direct/src/gui/DirectScrolledFrame.py

@@ -2,7 +2,7 @@
 
 
 __all__ = ['DirectScrolledFrame']
 __all__ = ['DirectScrolledFrame']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from DirectFrame import *
 from DirectFrame import *
 from DirectScrollBar import *
 from DirectScrollBar import *

+ 2 - 2
direct/src/gui/DirectScrolledList.py

@@ -2,13 +2,13 @@
 
 
 __all__ = ['DirectScrolledListItem', 'DirectScrolledList']
 __all__ = ['DirectScrolledListItem', 'DirectScrolledList']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from direct.directnotify import DirectNotifyGlobal
 from direct.directnotify import DirectNotifyGlobal
 from direct.task.Task import Task
 from direct.task.Task import Task
 from DirectFrame import *
 from DirectFrame import *
 from DirectButton import *
 from DirectButton import *
-import string, types
+import types
 
 
 
 
 class DirectScrolledListItem(DirectButton):
 class DirectScrolledListItem(DirectButton):

+ 1 - 1
direct/src/gui/DirectSlider.py

@@ -2,7 +2,7 @@
 
 
 __all__ = ['DirectSlider']
 __all__ = ['DirectSlider']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from DirectFrame import *
 from DirectFrame import *
 from DirectButton import *
 from DirectButton import *

+ 1 - 1
direct/src/gui/DirectWaitBar.py

@@ -2,7 +2,7 @@
 
 
 __all__ = ['DirectWaitBar']
 __all__ = ['DirectWaitBar']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from DirectFrame import *
 from DirectFrame import *
 import types
 import types

+ 2 - 3
direct/src/gui/OnscreenGeom.py

@@ -2,10 +2,9 @@
 
 
 __all__ = ['OnscreenGeom']
 __all__ = ['OnscreenGeom']
 
 
-from pandac.PandaModules import *
-import DirectGuiGlobals as DGG
+from panda3d.core import *
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
-import string,types
+import types
 
 
 class OnscreenGeom(DirectObject, NodePath):
 class OnscreenGeom(DirectObject, NodePath):
     def __init__(self, geom = None,
     def __init__(self, geom = None,

+ 2 - 3
direct/src/gui/OnscreenImage.py

@@ -2,10 +2,9 @@
 
 
 __all__ = ['OnscreenImage']
 __all__ = ['OnscreenImage']
 
 
-from pandac.PandaModules import *
-import DirectGuiGlobals as DGG
+from panda3d.core import *
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
-import string,types
+import types
 
 
 class OnscreenImage(DirectObject, NodePath):
 class OnscreenImage(DirectObject, NodePath):
     def __init__(self, image = None,
     def __init__(self, image = None,

+ 2 - 2
direct/src/gui/OnscreenText.py

@@ -2,10 +2,10 @@
 
 
 __all__ = ['OnscreenText', 'Plain', 'ScreenTitle', 'ScreenPrompt', 'NameConfirm', 'BlackOnWhite']
 __all__ = ['OnscreenText', 'Plain', 'ScreenTitle', 'ScreenPrompt', 'NameConfirm', 'BlackOnWhite']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
 import DirectGuiGlobals as DGG
 import DirectGuiGlobals as DGG
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
-import string,types
+import types
 
 
 ## These are the styles of text we might commonly see.  They set the
 ## These are the styles of text we might commonly see.  They set the
 ## overall appearance of the text according to one of a number of
 ## overall appearance of the text according to one of a number of

+ 2 - 1
direct/src/interval/ActorInterval.py

@@ -2,7 +2,8 @@
 
 
 __all__ = ['ActorInterval', 'LerpAnimInterval']
 __all__ = ['ActorInterval', 'LerpAnimInterval']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 import Interval
 import Interval
 import math
 import math

+ 2 - 1
direct/src/interval/AnimControlInterval.py

@@ -2,7 +2,8 @@
 
 
 __all__ = ['AnimControlInterval']
 __all__ = ['AnimControlInterval']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 import Interval
 import Interval
 import math
 import math

+ 2 - 2
direct/src/interval/FunctionInterval.py

@@ -2,11 +2,11 @@
 
 
 __all__ = ['FunctionInterval', 'EventInterval', 'AcceptInterval', 'IgnoreInterval', 'ParentInterval', 'WrtParentInterval', 'PosInterval', 'HprInterval', 'ScaleInterval', 'PosHprInterval', 'HprScaleInterval', 'PosHprScaleInterval', 'Func', 'Wait']
 __all__ = ['FunctionInterval', 'EventInterval', 'AcceptInterval', 'IgnoreInterval', 'ParentInterval', 'WrtParentInterval', 'PosInterval', 'HprInterval', 'ScaleInterval', 'PosHprInterval', 'HprScaleInterval', 'PosHprScaleInterval', 'Func', 'Wait']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.showbase.MessengerGlobal import *
 from direct.showbase.MessengerGlobal import *
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
 import Interval
 import Interval
-import types
 
 
 
 
 #############################################################
 #############################################################

+ 2 - 1
direct/src/interval/IndirectInterval.py

@@ -2,7 +2,8 @@
 
 
 __all__ = ['IndirectInterval']
 __all__ = ['IndirectInterval']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 import Interval
 import Interval
 import LerpBlendHelpers
 import LerpBlendHelpers

+ 2 - 3
direct/src/interval/Interval.py

@@ -4,10 +4,9 @@ __all__ = ['Interval']
 
 
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
-from pandac.PandaModules import *
 from direct.task.Task import Task, TaskManager
 from direct.task.Task import Task, TaskManager
-from direct.showbase import PythonUtil
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 import math
 import math
 
 
 class Interval(DirectObject):
 class Interval(DirectObject):

+ 10 - 8
direct/src/interval/IntervalGlobal.py

@@ -10,15 +10,17 @@ from FunctionInterval import *
 from LerpInterval import *
 from LerpInterval import *
 from IndirectInterval import *
 from IndirectInterval import *
 from MopathInterval import *
 from MopathInterval import *
-import pandac.PandaModules
-##Some people may have the particle system compiled out
-if hasattr( pandac.PandaModules, 'ParticleSystem' ):
-    from ParticleInterval import *
+try:
+    import panda3d.physics
+    ##Some people may have the particle system compiled out
+    if hasattr( panda3d.physics, 'ParticleSystem' ):
+        from ParticleInterval import *
+        if __debug__:
+            from TestInterval import *
+except ImportError:
+    pass
 from SoundInterval import *
 from SoundInterval import *
 from ProjectileInterval import *
 from ProjectileInterval import *
 from MetaInterval import *
 from MetaInterval import *
 from IntervalManager import *
 from IntervalManager import *
-if __debug__:
-    if hasattr( pandac.PandaModules, 'ParticleSystem' ):
-        from TestInterval import *
-from pandac.PandaModules import WaitInterval
+from panda3d.direct import WaitInterval

+ 2 - 4
direct/src/interval/IntervalManager.py

@@ -2,12 +2,10 @@
 
 
 __all__ = ['IntervalManager', 'ivalMgr']
 __all__ = ['IntervalManager', 'ivalMgr']
 
 
-from pandac.PandaModules import *
-from pandac import PandaModules
+from panda3d.core import *
+from panda3d.direct import *
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.showbase import EventManager
 from direct.showbase import EventManager
-import Interval
-import types
 import fnmatch
 import fnmatch
 
 
 class IntervalManager(CIntervalManager):
 class IntervalManager(CIntervalManager):

+ 5 - 3
direct/src/interval/IntervalTest.py

@@ -4,13 +4,15 @@ __all__ = []
 
 
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
-    from direct.directbase import DirectStart
-    from pandac.PandaModules import *
+    from direct.showbase.ShowBase import ShowBase
+    from panda3d.core import *
     from IntervalGlobal import *
     from IntervalGlobal import *
     from direct.actor.Actor import *
     from direct.actor.Actor import *
 
 
     from direct.directutil import Mopath
     from direct.directutil import Mopath
 
 
+    base = ShowBase()
+
     boat = loader.loadModel('models/misc/smiley')
     boat = loader.loadModel('models/misc/smiley')
     boat.reparentTo(render)
     boat.reparentTo(render)
 
 
@@ -205,4 +207,4 @@ if __name__ == "__main__":
         # return mt
         # return mt
 
 
     test(5)
     test(5)
-    run()
+    base.run()

+ 2 - 1
direct/src/interval/LerpInterval.py

@@ -12,7 +12,8 @@ __all__ = [
     'LerpFunctionInterval', 'LerpFunc','LerpFunctionNoStateInterval','LerpFuncNS'
     'LerpFunctionInterval', 'LerpFunc','LerpFunctionNoStateInterval','LerpFuncNS'
     ]
     ]
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 import Interval
 import Interval
 import LerpBlendHelpers
 import LerpBlendHelpers

+ 5 - 4
direct/src/interval/MetaInterval.py

@@ -2,14 +2,15 @@
 
 
 __all__ = ['MetaInterval', 'Sequence', 'Parallel', 'ParallelEndTogether', 'Track']
 __all__ = ['MetaInterval', 'Sequence', 'Parallel', 'ParallelEndTogether', 'Track']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 from IntervalManager import ivalMgr
 from IntervalManager import ivalMgr
 import Interval
 import Interval
-from direct.task.Task import Task, TaskManager
+from direct.task.Task import TaskManager
 import types
 import types
-if __debug__:
-    import direct.showbase.PythonUtil as PythonUtil
+#if __debug__:
+#    import direct.showbase.PythonUtil as PythonUtil
 
 
 PREVIOUS_END = CMetaInterval.RSPreviousEnd
 PREVIOUS_END = CMetaInterval.RSPreviousEnd
 PREVIOUS_START = CMetaInterval.RSPreviousBegin
 PREVIOUS_START = CMetaInterval.RSPreviousBegin

+ 2 - 1
direct/src/interval/MopathInterval.py

@@ -3,7 +3,8 @@
 __all__ = ['MopathInterval']
 __all__ = ['MopathInterval']
 
 
 import LerpInterval
 import LerpInterval
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 
 
 # import Mopath
 # import Mopath

+ 2 - 2
direct/src/interval/ParticleInterval.py

@@ -6,11 +6,11 @@ __all__ = ['ParticleInterval']
 Contains the ParticleInterval class
 Contains the ParticleInterval class
 """
 """
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from Interval import Interval
 from Interval import Interval
 
 
-from direct.particles import ParticleEffect
 
 
 class ParticleInterval(Interval):
 class ParticleInterval(Interval):
     """
     """

+ 2 - 2
direct/src/interval/ProjectileInterval.py

@@ -2,10 +2,10 @@
 
 
 __all__ = ['ProjectileInterval']
 __all__ = ['ProjectileInterval']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 from Interval import Interval
 from Interval import Interval
-from direct.showbase.PythonUtil import lerp
 from direct.showbase import PythonUtil
 from direct.showbase import PythonUtil
 
 
 class ProjectileInterval(Interval):
 class ProjectileInterval(Interval):

+ 2 - 2
direct/src/interval/ProjectileIntervalTest.py

@@ -2,8 +2,8 @@
 
 
 __all__ = ['doTest']
 __all__ = ['doTest']
 
 
-from pandac.PandaModules import *
-from direct.directbase.DirectStart import *
+from panda3d.core import *
+from panda3d.direct import *
 from IntervalGlobal import *
 from IntervalGlobal import *
 
 
 def doTest():
 def doTest():

+ 2 - 1
direct/src/interval/SoundInterval.py

@@ -2,7 +2,8 @@
 
 
 __all__ = ['SoundInterval']
 __all__ = ['SoundInterval']
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 import Interval
 import Interval
 import random
 import random

+ 2 - 2
direct/src/interval/TestInterval.py

@@ -6,11 +6,11 @@ __all__ = ['TestInterval']
 Contains the ParticleInterval class
 Contains the ParticleInterval class
 """
 """
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from Interval import Interval
 from Interval import Interval
 
 
-from direct.particles import ParticleEffect
 
 
 class TestInterval(Interval):
 class TestInterval(Interval):
     # Name counter
     # Name counter

+ 2 - 1
direct/src/motiontrail/MotionTrail.py

@@ -1,6 +1,7 @@
 
 
 
 
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.direct import *
 from direct.task import Task
 from direct.task import Task
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
 
 

+ 4 - 3
direct/src/p3d/AppRunner.py

@@ -9,9 +9,10 @@ runp3d.py for a command-line tool to invoke this module.
 
 
 """
 """
 
 
+__all__ = ["AppRunner", "dummyAppRunner", "ArgumentError"]
+
 import sys
 import sys
 import os
 import os
-import types
 import __builtin__
 import __builtin__
 
 
 if 'VFSImporter' in sys.modules:
 if 'VFSImporter' in sys.modules:
@@ -29,7 +30,7 @@ else:
     from direct.showbase import VFSImporter
     from direct.showbase import VFSImporter
 
 
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
-from panda3d.core import VirtualFileSystem, Filename, Multifile, loadPrcFileData, unloadPrcFile, getModelPath, Thread, WindowProperties, ExecutionEnvironment, PandaSystem, Notify, StreamWriter, ConfigVariableString, ConfigPageManager
+from panda3d.core import VirtualFileSystem, Filename, Multifile, loadPrcFileData, unloadPrcFile, getModelPath, WindowProperties, ExecutionEnvironment, PandaSystem, Notify, StreamWriter, ConfigVariableString, ConfigPageManager
 from panda3d.direct import init_app_for_gui
 from panda3d.direct import init_app_for_gui
 from panda3d import core
 from panda3d import core
 from direct.stdpy import file, glob
 from direct.stdpy import file, glob
@@ -43,7 +44,7 @@ from direct.p3d.InstalledHostData import InstalledHostData
 from direct.p3d.InstalledPackageData import InstalledPackageData
 from direct.p3d.InstalledPackageData import InstalledPackageData
 
 
 # These imports are read by the C++ wrapper in p3dPythonRun.cxx.
 # These imports are read by the C++ wrapper in p3dPythonRun.cxx.
-from direct.p3d.JavaScript import UndefinedObject, Undefined, ConcreteStruct, BrowserObject
+from direct.p3d.JavaScript import Undefined, ConcreteStruct
 
 
 class ArgumentError(AttributeError):
 class ArgumentError(AttributeError):
     pass
     pass

+ 2 - 0
direct/src/p3d/DWBPackageInstaller.py

@@ -1,3 +1,5 @@
+__all__ = ["DWBPackageInstaller"]
+
 from direct.p3d.PackageInstaller import PackageInstaller
 from direct.p3d.PackageInstaller import PackageInstaller
 from direct.gui.DirectWaitBar import DirectWaitBar
 from direct.gui.DirectWaitBar import DirectWaitBar
 from direct.gui import DirectGuiGlobals as DGG
 from direct.gui import DirectGuiGlobals as DGG

+ 1 - 1
direct/src/p3d/DeploymentTools.py

@@ -4,7 +4,7 @@ to build for as many platforms as possible. """
 
 
 __all__ = ["Standalone", "Installer"]
 __all__ = ["Standalone", "Installer"]
 
 
-import os, sys, subprocess, tarfile, shutil, time, zipfile, glob, socket, getpass, struct
+import os, sys, subprocess, tarfile, shutil, time, zipfile, socket, getpass, struct
 from cStringIO import StringIO
 from cStringIO import StringIO
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.showbase.AppRunnerGlobal import appRunner
 from direct.showbase.AppRunnerGlobal import appRunner

+ 2 - 0
direct/src/p3d/FileSpec.py

@@ -1,3 +1,5 @@
+__all__ = ["FileSpec"]
+
 import os
 import os
 import time
 import time
 from panda3d.core import Filename, HashVal, VirtualFileSystem
 from panda3d.core import Filename, HashVal, VirtualFileSystem

+ 2 - 0
direct/src/p3d/HostInfo.py

@@ -1,3 +1,5 @@
+__all__ = ["HostInfo"]
+
 from panda3d.core import HashVal, Filename, PandaSystem, DocumentSpec, Ramfile
 from panda3d.core import HashVal, Filename, PandaSystem, DocumentSpec, Ramfile
 from panda3d.core import HTTPChannel, ConfigVariableInt
 from panda3d.core import HTTPChannel, ConfigVariableInt
 from panda3d import core
 from panda3d import core

+ 2 - 0
direct/src/p3d/InstalledHostData.py

@@ -1,3 +1,5 @@
+__all__ = ["InstalledHostData"]
+
 from panda3d.core import URLSpec
 from panda3d.core import URLSpec
 
 
 class InstalledHostData:
 class InstalledHostData:

+ 2 - 0
direct/src/p3d/InstalledPackageData.py

@@ -1,3 +1,5 @@
+__all__ = ["InstalledPackageData"]
+
 class InstalledPackageData:
 class InstalledPackageData:
     """ A list of instances of this class is maintained by
     """ A list of instances of this class is maintained by
     InstalledHostData (which is in turn returned by
     InstalledHostData (which is in turn returned by

+ 2 - 0
direct/src/p3d/JavaScript.py

@@ -2,6 +2,8 @@
 useful when writing code that integrates with JavaScript, especially
 useful when writing code that integrates with JavaScript, especially
 code that runs in a browser via the web plugin. """
 code that runs in a browser via the web plugin. """
 
 
+__all__ = ["UndefinedObject", "Undefined", "ConcreteStruct", "BrowserObject", "MethodWrapper"]
+
 import types
 import types
 
 
 class UndefinedObject:
 class UndefinedObject:

+ 3 - 1
direct/src/p3d/PackageInfo.py

@@ -1,4 +1,6 @@
-from panda3d.core import Filename, URLSpec, DocumentSpec, Ramfile, Multifile, Decompressor, EUOk, EUSuccess, VirtualFileSystem, Thread, getModelPath, ExecutionEnvironment, PStatCollector, TiXmlDocument, TiXmlDeclaration, TiXmlElement
+__all__ = ["PackageInfo"]
+
+from panda3d.core import Filename, DocumentSpec, Multifile, Decompressor, EUOk, EUSuccess, VirtualFileSystem, Thread, getModelPath, ExecutionEnvironment, PStatCollector, TiXmlDocument, TiXmlDeclaration, TiXmlElement
 import panda3d.core as core
 import panda3d.core as core
 from direct.p3d.FileSpec import FileSpec
 from direct.p3d.FileSpec import FileSpec
 from direct.p3d.ScanDirectoryNode import ScanDirectoryNode
 from direct.p3d.ScanDirectoryNode import ScanDirectoryNode

+ 2 - 0
direct/src/p3d/PackageInstaller.py

@@ -1,3 +1,5 @@
+__all__ = ["PackageInstaller"]
+
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
 from direct.stdpy.threading import Lock, RLock
 from direct.stdpy.threading import Lock, RLock
 from direct.showbase.MessengerGlobal import messenger
 from direct.showbase.MessengerGlobal import messenger

+ 2 - 1
direct/src/p3d/PackageMerger.py

@@ -1,8 +1,9 @@
+__all__ = ["PackageMerger", "PackageMergerError"]
+
 from direct.p3d.FileSpec import FileSpec
 from direct.p3d.FileSpec import FileSpec
 from direct.p3d.SeqValue import SeqValue
 from direct.p3d.SeqValue import SeqValue
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 from panda3d.core import *
 from panda3d.core import *
-import copy
 import shutil
 import shutil
 import os
 import os
 
 

+ 2 - 2
direct/src/p3d/Packager.py

@@ -3,17 +3,17 @@ within a Panda3D Multifile, which can be easily be downloaded and/or
 patched onto a client machine, for the purpose of running a large
 patched onto a client machine, for the purpose of running a large
 application. """
 application. """
 
 
+__all__ = ["Packager", "PackagerError", "OutsideOfPackageError", "ArgumentError"]
+
 # Important to import panda3d first, to avoid naming conflicts with
 # Important to import panda3d first, to avoid naming conflicts with
 # Python's "string" and "Loader" names that are imported later.
 # Python's "string" and "Loader" names that are imported later.
 from panda3d.core import *
 from panda3d.core import *
 import sys
 import sys
 import os
 import os
 import glob
 import glob
-import marshal
 import string
 import string
 import types
 import types
 import getpass
 import getpass
-import platform
 import struct
 import struct
 import subprocess
 import subprocess
 from direct.p3d.FileSpec import FileSpec
 from direct.p3d.FileSpec import FileSpec

+ 2 - 0
direct/src/p3d/PatchMaker.py

@@ -1,3 +1,5 @@
+__all__ = ["PatchMaker"]
+
 from direct.p3d.FileSpec import FileSpec
 from direct.p3d.FileSpec import FileSpec
 from direct.p3d.SeqValue import SeqValue
 from direct.p3d.SeqValue import SeqValue
 from panda3d.core import *
 from panda3d.core import *

+ 2 - 0
direct/src/p3d/ScanDirectoryNode.py

@@ -1,3 +1,5 @@
+__all__ = ["ScanDirectoryNode"]
+
 from panda3d.core import VirtualFileSystem, VirtualFileMountSystem, Filename, TiXmlDocument
 from panda3d.core import VirtualFileSystem, VirtualFileMountSystem, Filename, TiXmlDocument
 vfs = VirtualFileSystem.getGlobalPtr()
 vfs = VirtualFileSystem.getGlobalPtr()
 
 

+ 2 - 0
direct/src/p3d/SeqValue.py

@@ -1,3 +1,5 @@
+__all__ = ["SeqValue"]
+
 import types
 import types
 
 
 class SeqValue:
 class SeqValue:

+ 2 - 1
direct/src/particles/ForceGroup.py

@@ -1,4 +1,5 @@
-from pandac.PandaModules import *
+from panda3d.core import *
+from panda3d.physics import *
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.PhysicsManagerGlobal import *
 from direct.showbase.PhysicsManagerGlobal import *
 
 

+ 7 - 3
direct/src/particles/ParticleEffect.py

@@ -1,7 +1,11 @@
 
 
-from pandac.PandaModules import *
-import Particles
-import ForceGroup
+from panda3d.core import *
+
+# Leave these imports in, they may be used by ptf files.
+from panda3d.physics import *
+from . import Particles
+from . import ForceGroup
+
 from direct.directnotify import DirectNotifyGlobal
 from direct.directnotify import DirectNotifyGlobal
 
 
 class ParticleEffect(NodePath):
 class ParticleEffect(NodePath):

+ 5 - 4
direct/src/particles/ParticleFloorTest.py

@@ -1,5 +1,6 @@
 
 
-from pandac.PandaModules import *
+from panda3d.core import NodePath
+from panda3d.physics import LinearVectorForce
 from direct.particles import ParticleEffect
 from direct.particles import ParticleEffect
 from direct.particles import Particles
 from direct.particles import Particles
 from direct.particles import ForceGroup
 from direct.particles import ForceGroup
@@ -48,8 +49,8 @@ class ParticleFloorTest(NodePath):
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
     from direct.directbase.TestStart import *
     from direct.directbase.TestStart import *
-    pt=ParticleFloorTest()
+    pt = ParticleFloorTest()
     pt.reparentTo(render)
     pt.reparentTo(render)
     pt.start()
     pt.start()
-    camera.setY(-10.0)
-    run()
+    base.camera.setY(-10.0)
+    base.run()

+ 2 - 4
direct/src/particles/Particles.py

@@ -1,7 +1,7 @@
-from pandac.PandaModules import *
+from panda3d.core import *
 
 
+from panda3d.physics import PhysicalNode
 from panda3d.physics import ParticleSystem
 from panda3d.physics import ParticleSystem
-from panda3d.physics import BaseParticleFactory
 from panda3d.physics import PointParticleFactory
 from panda3d.physics import PointParticleFactory
 from panda3d.physics import ZSpinParticleFactory
 from panda3d.physics import ZSpinParticleFactory
 #from panda3d.physics import OrientedParticleFactory
 #from panda3d.physics import OrientedParticleFactory
@@ -25,8 +25,6 @@ from panda3d.physics import TangentRingEmitter
 
 
 import SpriteParticleRendererExt
 import SpriteParticleRendererExt
 
 
-import string
-import os
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
 import sys
 import sys
 
 

+ 1 - 1
direct/src/showbase/Audio3DManager.py

@@ -2,7 +2,7 @@
 
 
 __all__ = ['Audio3DManager']
 __all__ = ['Audio3DManager']
 
 
-from pandac.PandaModules import Vec3, VBase3
+from panda3d.core import Vec3, VBase3
 from direct.task import Task
 from direct.task import Task
 #
 #
 class Audio3DManager:
 class Audio3DManager:

+ 1 - 2
direct/src/showbase/ContainerLeakDetector.py

@@ -1,6 +1,5 @@
-from pandac.PandaModules import PStatCollector
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
-from direct.showbase.PythonUtil import Queue, invertDictLossless, makeFlywheelGen
+from direct.showbase.PythonUtil import makeFlywheelGen
 from direct.showbase.PythonUtil import itype, serialNum, safeRepr, fastRepr
 from direct.showbase.PythonUtil import itype, serialNum, safeRepr, fastRepr
 from direct.showbase.Job import Job
 from direct.showbase.Job import Job
 import types, weakref, random, __builtin__
 import types, weakref, random, __builtin__

+ 2 - 2
direct/src/showbase/ContainerReport.py

@@ -1,6 +1,6 @@
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
-from direct.showbase.PythonUtil import Queue, fastRepr, invertDictLossless
-from direct.showbase.PythonUtil import itype, safeRepr
+from direct.showbase.PythonUtil import Queue, invertDictLossless
+from direct.showbase.PythonUtil import safeRepr
 from direct.showbase.Job import Job
 from direct.showbase.Job import Job
 import types
 import types
 
 

+ 1 - 2
direct/src/showbase/DistancePhasedNode.py

@@ -1,6 +1,5 @@
 from direct.showbase.DirectObject import DirectObject
 from direct.showbase.DirectObject import DirectObject
-from direct.directnotify import DirectNotifyGlobal
-from pandac.PandaModules import *
+from panda3d.core import *
 from PhasedObject import PhasedObject
 from PhasedObject import PhasedObject
 
 
 class DistancePhasedNode(PhasedObject, DirectObject, NodePath):
 class DistancePhasedNode(PhasedObject, DirectObject, NodePath):

+ 0 - 1
direct/src/showbase/ExcelHandler.py

@@ -13,7 +13,6 @@ print e.tables
 """
 """
 
 
 from xml.sax import saxutils
 from xml.sax import saxutils
-from xml.sax import parse
 
 
 class ExcelHandler(saxutils.DefaultHandler):
 class ExcelHandler(saxutils.DefaultHandler):
     def __init__(self):
     def __init__(self):

+ 0 - 1
direct/src/showbase/Finder.py

@@ -2,7 +2,6 @@
 
 
 __all__ = ['findClass', 'rebindClass', 'copyFuncs', 'replaceMessengerFunc', 'replaceTaskMgrFunc', 'replaceStateFunc', 'replaceCRFunc', 'replaceAIRFunc', 'replaceIvalFunc']
 __all__ = ['findClass', 'rebindClass', 'copyFuncs', 'replaceMessengerFunc', 'replaceTaskMgrFunc', 'replaceStateFunc', 'replaceCRFunc', 'replaceAIRFunc', 'replaceIvalFunc']
 
 
-import time
 import types
 import types
 import os
 import os
 import sys
 import sys

+ 1 - 1
direct/src/showbase/GarbageReport.py

@@ -3,7 +3,7 @@
 __all__ = ['FakeObject', '_createGarbage', 'GarbageReport', 'GarbageLogger']
 __all__ = ['FakeObject', '_createGarbage', 'GarbageReport', 'GarbageLogger']
 
 
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
-from direct.showbase.PythonUtil import safeRepr, fastRepr, printListEnumGen, printNumberedTypesGen
+from direct.showbase.PythonUtil import fastRepr
 from direct.showbase.PythonUtil import AlphabetCounter
 from direct.showbase.PythonUtil import AlphabetCounter
 from direct.showbase.Job import Job
 from direct.showbase.Job import Job
 import gc
 import gc

+ 0 - 1
direct/src/showbase/LazySort.py

@@ -109,7 +109,6 @@ if __debug__:
             print x
             print x
 
 
     def test():
     def test():
-        import random
         from itertools import islice
         from itertools import islice
 
 
         control = sorted(data, key = lambda x: x[0])
         control = sorted(data, key = lambda x: x[0])

+ 0 - 1
direct/src/showbase/Messenger.py

@@ -7,7 +7,6 @@ from PythonUtil import *
 from direct.directnotify import DirectNotifyGlobal
 from direct.directnotify import DirectNotifyGlobal
 import types
 import types
 
 
-from panda3d.core import ConfigVariableBool, Thread, Mutex
 from direct.stdpy.threading import Lock
 from direct.stdpy.threading import Lock
 
 
 class Messenger:
 class Messenger:

+ 0 - 1
direct/src/showbase/ObjectPool.py

@@ -6,7 +6,6 @@ from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.showbase.PythonUtil import invertDictLossless, makeList, safeRepr
 from direct.showbase.PythonUtil import invertDictLossless, makeList, safeRepr
 from direct.showbase.PythonUtil import getNumberedTypedString, getNumberedTypedSortedString
 from direct.showbase.PythonUtil import getNumberedTypedString, getNumberedTypedSortedString
 from direct.showbase.PythonUtil import getNumberedTypedSortedStringWithReferrersGen
 from direct.showbase.PythonUtil import getNumberedTypedSortedStringWithReferrersGen
-import types
 import gc
 import gc
 
 
 class Diff:
 class Diff:

+ 1 - 3
direct/src/showbase/OnScreenDebug.py

@@ -2,9 +2,7 @@
 
 
 __all__ = ['OnScreenDebug']
 __all__ = ['OnScreenDebug']
 
 
-
-
-from pandac.PandaModules import *
+from panda3d.core import *
 
 
 import types
 import types
 from direct.gui import OnscreenText
 from direct.gui import OnscreenText

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно