diff --git a/direct/src/actor/Actor.py b/direct/src/actor/Actor.py index cc11cef54e..46b8f76d07 100644 --- a/direct/src/actor/Actor.py +++ b/direct/src/actor/Actor.py @@ -1,10 +1,10 @@ """Actor module: contains the Actor class""" -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from pandac.PandaModules import LODNode import types -class Actor(PandaObject, NodePath): +class Actor(DirectObject, NodePath): """ Actor class: Contains methods for creating, manipulating and playing animations on characters diff --git a/direct/src/cluster/ClusterConfig.py b/direct/src/cluster/ClusterConfig.py index 54d24d9136..f266bb3856 100644 --- a/direct/src/cluster/ClusterConfig.py +++ b/direct/src/cluster/ClusterConfig.py @@ -1,4 +1,4 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from ClusterClient import * import string diff --git a/direct/src/directdevices/DirectFastrak.py b/direct/src/directdevices/DirectFastrak.py index 72ebc44063..b354b9878b 100644 --- a/direct/src/directdevices/DirectFastrak.py +++ b/direct/src/directdevices/DirectFastrak.py @@ -1,6 +1,6 @@ """ Class used to create and control radamec device """ from math import * -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from DirectDeviceManager import * from direct.directnotify import DirectNotifyGlobal @@ -16,7 +16,7 @@ FAST_X = 0 FAST_Y = 1 FAST_Z = 2 -class DirectFastrak(PandaObject): +class DirectFastrak(DirectObject): fastrakCount = 0 notify = DirectNotifyGlobal.directNotify.newCategory('DirectFastrak') diff --git a/direct/src/directdevices/DirectJoybox.py b/direct/src/directdevices/DirectJoybox.py index 1f0ab42068..133cdfdc1b 100644 --- a/direct/src/directdevices/DirectJoybox.py +++ b/direct/src/directdevices/DirectJoybox.py @@ -1,5 +1,5 @@ """ Class used to create and control joybox device """ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from DirectDeviceManager import * from direct.directtools.DirectUtil import * from direct.gui import OnscreenText @@ -32,7 +32,7 @@ JOYBOX_MIN = ANALOG_MIN + ANALOG_DEADBAND JOYBOX_MAX = ANALOG_MAX - ANALOG_DEADBAND JOYBOX_RANGE = JOYBOX_MAX - JOYBOX_MIN -class DirectJoybox(PandaObject): +class DirectJoybox(DirectObject): joyboxCount = 0 xyzMultiplier = 1.0 hprMultiplier = 1.0 diff --git a/direct/src/directdevices/DirectRadamec.py b/direct/src/directdevices/DirectRadamec.py index 7fc58438cc..6ec53698e3 100644 --- a/direct/src/directdevices/DirectRadamec.py +++ b/direct/src/directdevices/DirectRadamec.py @@ -1,6 +1,6 @@ """ Class used to create and control radamec device """ from math import * -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from DirectDeviceManager import * from direct.directnotify import DirectNotifyGlobal @@ -17,7 +17,7 @@ RAD_TILT = 1 RAD_ZOOM = 2 RAD_FOCUS = 3 -class DirectRadamec(PandaObject): +class DirectRadamec(DirectObject): radamecCount = 0 notify = DirectNotifyGlobal.directNotify.newCategory('DirectRadamec') diff --git a/direct/src/directtools/DirectCameraControl.py b/direct/src/directtools/DirectCameraControl.py index 1610a7d17a..7c5551ba48 100644 --- a/direct/src/directtools/DirectCameraControl.py +++ b/direct/src/directtools/DirectCameraControl.py @@ -1,4 +1,4 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from DirectUtil import * from DirectGeometry import * from DirectGlobals import * @@ -9,7 +9,7 @@ CAM_MOVE_DURATION = 1.2 COA_MARKER_SF = 0.0075 Y_AXIS = Vec3(0,1,0) -class DirectCameraControl(PandaObject): +class DirectCameraControl(DirectObject): def __init__(self): # Create the grid self.startT = 0.0 diff --git a/direct/src/directtools/DirectGeometry.py b/direct/src/directtools/DirectGeometry.py index 1362b0a054..f3bf540ec1 100644 --- a/direct/src/directtools/DirectGeometry.py +++ b/direct/src/directtools/DirectGeometry.py @@ -1,5 +1,5 @@ from pandac.PandaModules import * -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from DirectGlobals import * from DirectUtil import * import math diff --git a/direct/src/directtools/DirectGrid.py b/direct/src/directtools/DirectGrid.py index e807c6b647..4d7d11d39c 100644 --- a/direct/src/directtools/DirectGrid.py +++ b/direct/src/directtools/DirectGrid.py @@ -1,8 +1,8 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from DirectUtil import * from DirectGeometry import * -class DirectGrid(NodePath,PandaObject): +class DirectGrid(NodePath,DirectObject): def __init__(self): # Initialize superclass NodePath.__init__(self) diff --git a/direct/src/directtools/DirectLights.py b/direct/src/directtools/DirectLights.py index 62bc214cee..eea892a380 100644 --- a/direct/src/directtools/DirectLights.py +++ b/direct/src/directtools/DirectLights.py @@ -1,4 +1,4 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from string import lower class DirectLight(NodePath): diff --git a/direct/src/directtools/DirectManipulation.py b/direct/src/directtools/DirectManipulation.py index ac0736ddd6..af8a5c710f 100644 --- a/direct/src/directtools/DirectManipulation.py +++ b/direct/src/directtools/DirectManipulation.py @@ -1,10 +1,10 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from DirectGlobals import * from DirectUtil import * from DirectGeometry import * from direct.task import Task -class DirectManipulationControl(PandaObject): +class DirectManipulationControl(DirectObject): def __init__(self): # Create the grid self.objectHandles = ObjectHandles() @@ -537,7 +537,7 @@ class DirectManipulationControl(PandaObject): messenger.send('DIRECT_manipulateObjectCleanup', [direct.selected.getSelectedAsList()]) -class ObjectHandles(NodePath,PandaObject): +class ObjectHandles(NodePath,DirectObject): def __init__(self): # Initialize the superclass NodePath.__init__(self) diff --git a/direct/src/directtools/DirectSelection.py b/direct/src/directtools/DirectSelection.py index 3fc17fdced..4dac6b181b 100644 --- a/direct/src/directtools/DirectSelection.py +++ b/direct/src/directtools/DirectSelection.py @@ -1,4 +1,4 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from DirectGlobals import * from DirectUtil import * from DirectGeometry import * @@ -46,7 +46,7 @@ class DirectNodePath(NodePath): def getMax(self): return self.bbox.getMax() -class SelectedNodePaths(PandaObject): +class SelectedNodePaths(DirectObject): def __init__(self): self.reset() self.tagList = [] diff --git a/direct/src/directtools/DirectSession.py b/direct/src/directtools/DirectSession.py index 3275d973ed..a845b17d3d 100644 --- a/direct/src/directtools/DirectSession.py +++ b/direct/src/directtools/DirectSession.py @@ -1,4 +1,4 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from DirectGlobals import * from DirectUtil import* from DirectCameraControl import * @@ -17,7 +17,7 @@ import types import string from direct.showbase import Loader -class DirectSession(PandaObject): +class DirectSession(DirectObject): # post this to the bboard to make sure DIRECT doesn't turn on DIRECTdisablePost = 'disableDIRECT' @@ -801,7 +801,7 @@ class DirectSession(PandaObject): for iRay in self.iRayList: iRay.removeUnpickable(item) -class DisplayRegionContext(PandaObject): +class DisplayRegionContext(DirectObject): regionCount = 0 def __init__(self, cam): self.cam = cam @@ -926,7 +926,7 @@ class DisplayRegionContext(PandaObject): self.near, (self.nearHeight*0.5) * self.mouseY) -class DisplayRegionList(PandaObject): +class DisplayRegionList(DirectObject): def __init__(self): self.displayRegionList = [] i = 0 diff --git a/direct/src/directtools/DirectUtil.py b/direct/src/directtools/DirectUtil.py index 0c5b08bf39..f2c94a65e8 100644 --- a/direct/src/directtools/DirectUtil.py +++ b/direct/src/directtools/DirectUtil.py @@ -1,4 +1,4 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from DirectGlobals import * # Routines to adjust values diff --git a/direct/src/directutil/Mopath.py b/direct/src/directutil/Mopath.py index fec9e60e68..b31b1bd774 100644 --- a/direct/src/directutil/Mopath.py +++ b/direct/src/directutil/Mopath.py @@ -1,9 +1,9 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.directtools.DirectGeometry import * from pandac.PandaModules import NodePath -class Mopath(PandaObject): +class Mopath(DirectObject): nameIndex = 1 diff --git a/direct/src/distributed/DistributedObjectBase.py b/direct/src/distributed/DistributedObjectBase.py index d752b133f0..7b222b962d 100755 --- a/direct/src/distributed/DistributedObjectBase.py +++ b/direct/src/distributed/DistributedObjectBase.py @@ -1,8 +1,8 @@ -from direct.showbase.PandaObject import PandaObject +from direct.showbase.DirectObject import DirectObject #from direct.directnotify.DirectNotifyGlobal import directNotify -class DistributedObjectBase(PandaObject): +class DistributedObjectBase(DirectObject): """ The Distributed Object class is the base class for all network based (i.e. distributed) objects. These will usually (always?) have a diff --git a/direct/src/distributed/DistributedObjectGlobal.py b/direct/src/distributed/DistributedObjectGlobal.py index eb50eb7f66..719accf772 100755 --- a/direct/src/distributed/DistributedObjectGlobal.py +++ b/direct/src/distributed/DistributedObjectGlobal.py @@ -1,6 +1,6 @@ """DistributedObjectGlobal module: contains the DistributedObjectGlobal class""" -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObject import DistributedObject diff --git a/direct/src/extensions_native/extension_native_helpers.py b/direct/src/extensions_native/extension_native_helpers.py index 70350bbf4c..43cab0d36b 100644 --- a/direct/src/extensions_native/extension_native_helpers.py +++ b/direct/src/extensions_native/extension_native_helpers.py @@ -1,18 +1,18 @@ -### Tools -from libpandaexpress import * - - -def Dtool_ObjectToDict(clas,name,obj): - clas.DtoolClassDict[name] = obj; - -def Dtool_funcToMethod(func,clas,method_name=None): - """Adds func to class so it is an accessible method; use method_name to specify the name to be used for calling the method. - The new method is accessible to any instance immediately.""" - func.im_class=clas - func.im_func=func - func.im_self=None - if not method_name: - method_name = func.__name__ - clas.DtoolClassDict[method_name] = func; - - +### Tools +from libpandaexpress import * + + +def Dtool_ObjectToDict(clas,name,obj): + clas.DtoolClassDict[name] = obj; + +def Dtool_funcToMethod(func,clas,method_name=None): + """Adds func to class so it is an accessible method; use method_name to specify the name to be used for calling the method. + The new method is accessible to any instance immediately.""" + func.im_class=clas + func.im_func=func + func.im_self=None + if not method_name: + method_name = func.__name__ + clas.DtoolClassDict[method_name] = func; + + diff --git a/direct/src/gui/DirectGuiBase.py b/direct/src/gui/DirectGuiBase.py index 45af7b4f19..9fd094fbc6 100644 --- a/direct/src/gui/DirectGuiBase.py +++ b/direct/src/gui/DirectGuiBase.py @@ -3,7 +3,7 @@ from OnscreenText import * from OnscreenGeom import * from OnscreenImage import * from direct.directtools.DirectUtil import ROUND_TO -from direct.showbase import PandaObject +from direct.showbase import DirectObject from direct.task import Task import string from direct.showbase import ShowBase @@ -93,7 +93,7 @@ Code Overview: are left unused. If so, an error is raised. """ -class DirectGuiBase(PandaObject.PandaObject): +class DirectGuiBase(DirectObject.DirectObject): def __init__(self): # Default id of all gui object, subclasses should override this self.guiId = 'guiObject' diff --git a/direct/src/gui/OnscreenGeom.py b/direct/src/gui/OnscreenGeom.py index f06aa6d365..f774566364 100644 --- a/direct/src/gui/OnscreenGeom.py +++ b/direct/src/gui/OnscreenGeom.py @@ -1,9 +1,9 @@ """OnscreenGeom module: contains the OnscreenGeom class""" -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * import types -class OnscreenGeom(PandaObject, NodePath): +class OnscreenGeom(DirectObject, NodePath): def __init__(self, geom = None, pos = None, hpr = None, diff --git a/direct/src/gui/OnscreenImage.py b/direct/src/gui/OnscreenImage.py index bba5c06351..86a96aabf8 100644 --- a/direct/src/gui/OnscreenImage.py +++ b/direct/src/gui/OnscreenImage.py @@ -1,9 +1,9 @@ """OnscreenImage module: contains the OnscreenImage class""" -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * import types -class OnscreenImage(PandaObject, NodePath): +class OnscreenImage(DirectObject, NodePath): def __init__(self, image = None, pos = None, hpr = None, diff --git a/direct/src/gui/OnscreenText.py b/direct/src/gui/OnscreenText.py index 61b666d878..6f8dcb1e41 100644 --- a/direct/src/gui/OnscreenText.py +++ b/direct/src/gui/OnscreenText.py @@ -1,6 +1,6 @@ """OnscreenText module: contains the OnscreenText class""" -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * import DirectGuiGlobals import types @@ -14,7 +14,7 @@ ScreenPrompt = 3 NameConfirm = 4 BlackOnWhite = 5 -class OnscreenText(PandaObject, NodePath): +class OnscreenText(DirectObject, NodePath): def __init__(self, text = '', style = Plain, diff --git a/direct/src/interval/IntervalManager.py b/direct/src/interval/IntervalManager.py index fb37427849..bd54ff8a22 100644 --- a/direct/src/interval/IntervalManager.py +++ b/direct/src/interval/IntervalManager.py @@ -33,23 +33,23 @@ class IntervalManager(CIntervalManager): self.ivals = [] self.removedIvals = {} else: ## the old interface - def __init__(self, globalPtr = 0): - # Pass globalPtr == 1 to the constructor to trick it into - # "constructing" a Python wrapper around the global - # CIntervalManager object. - if globalPtr: - #CIntervalManager.__init__(self, None) - cObj = CIntervalManager.getGlobalPtr() - self.this = cObj.this - self.userManagesMemory = 0 - else: - CIntervalManager.__init__(self) - # Set up a custom event queue for handling C++ events from - # intervals. - self.eventQueue = EventQueue() - self.MyEventmanager = EventManager.EventManager(self.eventQueue) - self.setEventQueue(self.eventQueue) - self.ivals = [] + def __init__(self, globalPtr = 0): + # Pass globalPtr == 1 to the constructor to trick it into + # "constructing" a Python wrapper around the global + # CIntervalManager object. + if globalPtr: + #CIntervalManager.__init__(self, None) + cObj = CIntervalManager.getGlobalPtr() + self.this = cObj.this + self.userManagesMemory = 0 + else: + CIntervalManager.__init__(self) + # Set up a custom event queue for handling C++ events from + # intervals. + self.eventQueue = EventQueue() + self.MyEventmanager = EventManager.EventManager(self.eventQueue) + self.setEventQueue(self.eventQueue) + self.ivals = [] self.removedIvals = {} diff --git a/direct/src/leveleditor/LevelEditor.py b/direct/src/leveleditor/LevelEditor.py index 4a35d107d1..048c1a486c 100644 --- a/direct/src/leveleditor/LevelEditor.py +++ b/direct/src/leveleditor/LevelEditor.py @@ -1,5 +1,5 @@ from direct.directbase.DirectStart import * -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from PieMenu import * from direct.gui.DirectGuiGlobals import * from direct.showbase.TkGlobal import * @@ -412,7 +412,7 @@ def DNASetBaselineString(baseline, text): baseline.add(text) -class LevelEditor(NodePath, PandaObject): +class LevelEditor(NodePath, DirectObject): """Class used to create a Toontown LevelEditor object""" # Init the list of callbacks: @@ -4927,7 +4927,7 @@ class DNAWallStyle: 'Cornice Color: %s\n' % self.cornice_color ) -class OldLevelEditor(NodePath, PandaObject): +class OldLevelEditor(NodePath, DirectObject): pass class LevelEditorPanel(Pmw.MegaToplevel): diff --git a/direct/src/leveleditor/PieMenu.py b/direct/src/leveleditor/PieMenu.py index b752ba84c3..770a8807e7 100644 --- a/direct/src/leveleditor/PieMenu.py +++ b/direct/src/leveleditor/PieMenu.py @@ -1,8 +1,8 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.directtools.DirectGeometry import * from direct.task import Task -class PieMenu(NodePath, PandaObject): +class PieMenu(NodePath, DirectObject): def __init__(self, visibleMenu, menuItems, action = None, fUpdateOnlyOnChange = 1): NodePath.__init__(self) diff --git a/direct/src/showbase/DirectObject.py b/direct/src/showbase/DirectObject.py index c0888c9d4a..a5d1dd0489 100644 --- a/direct/src/showbase/DirectObject.py +++ b/direct/src/showbase/DirectObject.py @@ -1,7 +1,8 @@ -from MessengerGlobal import * -from direct.directnotify.DirectNotifyGlobal import * +from MessengerGlobal import messenger +#from direct.directnotify.DirectNotifyGlobal import * from PythonUtil import * +from pandac.PandaModules import * class DirectObject: """ diff --git a/direct/src/tkpanels/DirectSessionPanel.py b/direct/src/tkpanels/DirectSessionPanel.py index a5a3a6f2aa..493a6bd8f8 100644 --- a/direct/src/tkpanels/DirectSessionPanel.py +++ b/direct/src/tkpanels/DirectSessionPanel.py @@ -1,7 +1,7 @@ """ DIRECT Session Main panel """ # Import Tkinter, Pmw, and the dial code -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.showbase.TkGlobal import * from direct.tkwidgets.AppShell import * diff --git a/direct/src/tkpanels/FSMInspector.py b/direct/src/tkpanels/FSMInspector.py index ab5ab56e8a..b0a2cf86f0 100644 --- a/direct/src/tkpanels/FSMInspector.py +++ b/direct/src/tkpanels/FSMInspector.py @@ -1,5 +1,5 @@ """ Finite State Machine Inspector module """ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.tkwidgets.AppShell import * from direct.showbase.TkGlobal import * from tkSimpleDialog import askstring diff --git a/direct/src/tkpanels/MopathRecorder.py b/direct/src/tkpanels/MopathRecorder.py index ffa609682d..37aad1debd 100644 --- a/direct/src/tkpanels/MopathRecorder.py +++ b/direct/src/tkpanels/MopathRecorder.py @@ -1,7 +1,7 @@ """ Mopath Recorder Panel Module """ # Import Tkinter, Pmw, and the dial code from this directory tree. -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.showbase.TkGlobal import * from direct.tkwidgets.AppShell import * from direct.directtools.DirectGlobals import * @@ -25,7 +25,7 @@ PRF_UTILITIES = [ 'lambda s = self: s.playbackMarker.setZ(render, 0.0)', 'lambda s = self: s.followTerrain(10.0)'] -class MopathRecorder(AppShell, PandaObject): +class MopathRecorder(AppShell, DirectObject): # Override class variables here appname = 'Mopath Recorder Panel' frameWidth = 450 diff --git a/direct/src/tkpanels/Placer.py b/direct/src/tkpanels/Placer.py index e6d30a580d..f080c8f83d 100644 --- a/direct/src/tkpanels/Placer.py +++ b/direct/src/tkpanels/Placer.py @@ -1,7 +1,7 @@ """ DIRECT Nine DoF Manipulation Panel """ # Import Tkinter, Pmw, and the dial code from this directory tree. -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.showbase.TkGlobal import * from direct.tkwidgets.AppShell import * from direct.tkwidgets import Dial diff --git a/direct/src/tkpanels/TaskManagerPanel.py b/direct/src/tkpanels/TaskManagerPanel.py index 8a6ebd8c32..52035e1b66 100644 --- a/direct/src/tkpanels/TaskManagerPanel.py +++ b/direct/src/tkpanels/TaskManagerPanel.py @@ -34,7 +34,7 @@ class TaskManagerPanel(AppShell): self.ignore('TaskManager-setVerbose') self.taskMgrWidget.onDestroy() -class TaskManagerWidget(PandaObject): +class TaskManagerWidget(DirectObject): """ TaskManagerWidget class: this class contains methods for creating a panel to control taskManager tasks. diff --git a/direct/src/tkwidgets/AppShell.py b/direct/src/tkwidgets/AppShell.py index 18aaa1b66b..5800ff135c 100644 --- a/direct/src/tkwidgets/AppShell.py +++ b/direct/src/tkwidgets/AppShell.py @@ -4,7 +4,7 @@ This is an adaption of AppShell.py found in Python and Tkinter Programming by John E. Grayson which is a streamlined adaptation of GuiAppD.py, originally created by Doug Hellmann (doughellmann@mindspring.com). """ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.showbase.TkGlobal import * from tkFileDialog import * import Dial @@ -38,7 +38,7 @@ def resetVariableDict(): # Inherit from MegaWidget instead of Toplevel so you can pass in a toplevel # to use as a container if you wish. If no toplevel passed in, create one -class AppShell(Pmw.MegaWidget, PandaObject): +class AppShell(Pmw.MegaWidget, DirectObject): appversion = '1.0' appname = 'Generic Application Frame' copyright = ('Copyright 2004 Walt Disney Imagineering.' + diff --git a/direct/src/tkwidgets/EntryScale.py b/direct/src/tkwidgets/EntryScale.py index 82fe39f03e..f3c7ad61fe 100644 --- a/direct/src/tkwidgets/EntryScale.py +++ b/direct/src/tkwidgets/EntryScale.py @@ -1,7 +1,7 @@ """ EntryScale Class: Scale with a label, and a linked and validated entry """ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.showbase.TkGlobal import * import string import tkColorChooser diff --git a/direct/src/tkwidgets/Floater.py b/direct/src/tkwidgets/Floater.py index 1679656898..68aa5c23bd 100644 --- a/direct/src/tkwidgets/Floater.py +++ b/direct/src/tkwidgets/Floater.py @@ -2,7 +2,7 @@ Floater Class: Velocity style controller for floating point values with a label, entry (validated), and scale """ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.showbase.TkGlobal import * from Valuator import * from direct.task import Task diff --git a/direct/src/tkwidgets/SceneGraphExplorer.py b/direct/src/tkwidgets/SceneGraphExplorer.py index 3a96aadc13..a8fe70ade5 100644 --- a/direct/src/tkwidgets/SceneGraphExplorer.py +++ b/direct/src/tkwidgets/SceneGraphExplorer.py @@ -1,4 +1,4 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.showbase.TkGlobal import * from Tree import * @@ -17,7 +17,7 @@ DEFAULT_MENU_ITEMS = [ 'Place', 'Set Name', 'Set Color', 'Explore', 'Separator'] -class SceneGraphExplorer(Pmw.MegaWidget, PandaObject): +class SceneGraphExplorer(Pmw.MegaWidget, DirectObject): "Graphical display of a scene graph" def __init__(self, parent = None, nodePath = render, **kw): # Define the megawidget options. diff --git a/direct/src/tkwidgets/Tree.py b/direct/src/tkwidgets/Tree.py index b55c9005f6..eb70a2fd1b 100644 --- a/direct/src/tkwidgets/Tree.py +++ b/direct/src/tkwidgets/Tree.py @@ -19,7 +19,7 @@ import os import sys import string from direct.showbase.TkGlobal import * -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * # Initialize icon directory ICONDIR = getModelPath().findFile(Filename('icons')).toOsSpecific() diff --git a/direct/src/tkwidgets/Valuator.py b/direct/src/tkwidgets/Valuator.py index f98bfe2d7a..c1ff039fe5 100644 --- a/direct/src/tkwidgets/Valuator.py +++ b/direct/src/tkwidgets/Valuator.py @@ -1,4 +1,4 @@ -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.showbase.TkGlobal import * import tkColorChooser import WidgetPropertiesDialog diff --git a/doc/SceneEditor/seCameraControl.py b/doc/SceneEditor/seCameraControl.py index 878a5239e5..d878aa554f 100644 --- a/doc/SceneEditor/seCameraControl.py +++ b/doc/SceneEditor/seCameraControl.py @@ -11,7 +11,7 @@ # (If we do change original directools, it will force user has to install the latest version of OUR Panda) # ################################################################# -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.directtools.DirectUtil import * from seGeometry import * from direct.directtools.DirectGlobals import * @@ -21,7 +21,7 @@ CAM_MOVE_DURATION = 1.2 COA_MARKER_SF = 0.0075 Y_AXIS = Vec3(0,1,0) -class DirectCameraControl(PandaObject): +class DirectCameraControl(DirectObject): def __init__(self): # Create the grid self.startT = 0.0 diff --git a/doc/SceneEditor/seGeometry.py b/doc/SceneEditor/seGeometry.py index 7b3bce4d5a..84f6bdfe3e 100644 --- a/doc/SceneEditor/seGeometry.py +++ b/doc/SceneEditor/seGeometry.py @@ -13,7 +13,7 @@ ################################################################# from pandac.PandaModules import * -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.directtools.DirectGlobals import * from direct.directtools.DirectUtil import * import math diff --git a/doc/SceneEditor/seGrid.py b/doc/SceneEditor/seGrid.py index a4c58ff745..10107a5732 100644 --- a/doc/SceneEditor/seGrid.py +++ b/doc/SceneEditor/seGrid.py @@ -11,11 +11,11 @@ # (If we do change original directools, it will force user has to install the latest version of OUR Panda) # ################################################################# -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.directtools.DirectUtil import * from seGeometry import * -class DirectGrid(NodePath,PandaObject): +class DirectGrid(NodePath,DirectObject): def __init__(self): # Initialize superclass NodePath.__init__(self) diff --git a/doc/SceneEditor/seLights.py b/doc/SceneEditor/seLights.py index fab1a1d2b5..9f9b87f287 100644 --- a/doc/SceneEditor/seLights.py +++ b/doc/SceneEditor/seLights.py @@ -2,7 +2,7 @@ # seLights.py # Written by Yi-Hong Lin, yihhongl@andrew.cmu.edu, 2004 ################################################################# -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from string import lower from direct.directtools import DirectUtil import string diff --git a/doc/SceneEditor/seManipulation.py b/doc/SceneEditor/seManipulation.py index 5db1ba927f..d3f0b06ce8 100644 --- a/doc/SceneEditor/seManipulation.py +++ b/doc/SceneEditor/seManipulation.py @@ -12,13 +12,13 @@ # ################################################################# -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.directtools.DirectGlobals import * from direct.directtools.DirectUtil import * from seGeometry import * from direct.task import Task -class DirectManipulationControl(PandaObject): +class DirectManipulationControl(DirectObject): def __init__(self): # Create the grid self.objectHandles = ObjectHandles() @@ -506,7 +506,7 @@ class DirectManipulationControl(PandaObject): # Let everyone know that something was moved messenger.send('DIRECT_manipulateObjectCleanup') -class ObjectHandles(NodePath,PandaObject): +class ObjectHandles(NodePath,DirectObject): def __init__(self): # Initialize the superclass NodePath.__init__(self) diff --git a/doc/SceneEditor/seMopathRecorder.py b/doc/SceneEditor/seMopathRecorder.py index 1c549cf6ea..33a707ec3c 100644 --- a/doc/SceneEditor/seMopathRecorder.py +++ b/doc/SceneEditor/seMopathRecorder.py @@ -13,7 +13,7 @@ ################################################################# # Import Tkinter, Pmw, and the dial code from this directory tree. -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.showbase.TkGlobal import * from direct.tkwidgets.AppShell import * from direct.directtools.DirectGlobals import * @@ -37,7 +37,7 @@ PRF_UTILITIES = [ 'lambda s = self: s.playbackMarker.setZ(render, 0.0)', 'lambda s = self: s.followTerrain(10.0)'] -class MopathRecorder(AppShell, PandaObject): +class MopathRecorder(AppShell, DirectObject): # Override class variables here appname = 'Mopath Recorder Panel' frameWidth = 450 diff --git a/doc/SceneEditor/sePlacer.py b/doc/SceneEditor/sePlacer.py index dc79e322aa..60a44bcc3b 100644 --- a/doc/SceneEditor/sePlacer.py +++ b/doc/SceneEditor/sePlacer.py @@ -1,7 +1,7 @@ """ DIRECT Nine DoF Manipulation Panel """ # Import Tkinter, Pmw, and the dial code from this directory tree. -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.directtools.DirectGlobals import * from direct.showbase.TkGlobal import * from direct.tkwidgets.AppShell import * diff --git a/doc/SceneEditor/seSceneGraphExplorer.py b/doc/SceneEditor/seSceneGraphExplorer.py index cf82273ca0..f9b20cfc66 100644 --- a/doc/SceneEditor/seSceneGraphExplorer.py +++ b/doc/SceneEditor/seSceneGraphExplorer.py @@ -8,7 +8,7 @@ # Do forget to check the seTree. # ################################################################# -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.showbase.TkGlobal import * from seTree import * @@ -37,7 +37,7 @@ DEFAULT_MENU_ITEMS = [ 'Align Tool', 'Separator'] -class seSceneGraphExplorer(Pmw.MegaWidget, PandaObject): +class seSceneGraphExplorer(Pmw.MegaWidget, DirectObject): "Graphical display of a scene graph" def __init__(self, parent = None, nodePath = render, **kw): # Define the megawidget options. diff --git a/doc/SceneEditor/seSelection.py b/doc/SceneEditor/seSelection.py index f4d20332aa..212a51906c 100644 --- a/doc/SceneEditor/seSelection.py +++ b/doc/SceneEditor/seSelection.py @@ -11,7 +11,7 @@ # (If we do change original directools, it will force user has to install the latest version of OUR Panda) # ################################################################# -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.directtools.DirectGlobals import * from direct.directtools.DirectUtil import * from seGeometry import * @@ -56,7 +56,7 @@ class DirectNodePath(NodePath): def getMax(self): return self.bbox.getMax() -class SelectedNodePaths(PandaObject): +class SelectedNodePaths(DirectObject): def __init__(self): self.reset() diff --git a/doc/SceneEditor/seSession.py b/doc/SceneEditor/seSession.py index 40a97fdda9..a2357d992a 100644 --- a/doc/SceneEditor/seSession.py +++ b/doc/SceneEditor/seSession.py @@ -8,7 +8,7 @@ # Also, the way of selecting, renaming and some hot-key controls are changed. # ################################################################# -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * from direct.directtools.DirectGlobals import * from direct.directtools.DirectUtil import* from direct.interval.IntervalGlobal import * @@ -24,7 +24,7 @@ import types import string from direct.showbase import Loader -class SeSession(PandaObject): ### Customized DirectSession +class SeSession(DirectObject): ### Customized DirectSession def __init__(self): # Establish a global pointer to the direct object early on @@ -748,7 +748,7 @@ class SeSession(PandaObject): ### Customized DirectSession return -class DisplayRegionContext(PandaObject): +class DisplayRegionContext(DirectObject): regionCount = 0 def __init__(self, cam): self.cam = cam @@ -873,7 +873,7 @@ class DisplayRegionContext(PandaObject): self.near, (self.nearHeight*0.5) * self.mouseY) -class DisplayRegionList(PandaObject): +class DisplayRegionList(DirectObject): def __init__(self): self.displayRegionList = [] i = 0 diff --git a/doc/SceneEditor/seTree.py b/doc/SceneEditor/seTree.py index 40d7364f59..dac61477b9 100644 --- a/doc/SceneEditor/seTree.py +++ b/doc/SceneEditor/seTree.py @@ -16,7 +16,7 @@ import os import sys import string from direct.showbase.TkGlobal import * -from direct.showbase.PandaObject import * +from direct.showbase.DirectObject import * # Initialize icon directory ICONDIR = getModelPath().findFile(Filename('icons')).toOsSpecific()