mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
general: Stop using several deprecated pandac.PandaModules imports.
This commit is contained in:
parent
365e1d53ef
commit
0846a89677
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
from direct.showbase.InputStateGlobal import inputState
|
from direct.showbase.InputStateGlobal import inputState
|
||||||
from direct.task.Task import Task
|
from direct.task.Task import Task
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
from . import GravityWalker
|
from . import GravityWalker
|
||||||
|
|
||||||
BattleStrafe = 0
|
BattleStrafe = 0
|
||||||
|
@ -19,7 +19,7 @@ from direct.showbase import DirectObject
|
|||||||
from direct.controls.ControlManager import CollisionHandlerRayStart
|
from direct.controls.ControlManager import CollisionHandlerRayStart
|
||||||
from direct.showbase.InputStateGlobal import inputState
|
from direct.showbase.InputStateGlobal import inputState
|
||||||
from direct.task.Task import Task
|
from direct.task.Task import Task
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
|
|
||||||
class NonPhysicsWalker(DirectObject.DirectObject):
|
class NonPhysicsWalker(DirectObject.DirectObject):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory("NonPhysicsWalker")
|
notify = DirectNotifyGlobal.directNotify.newCategory("NonPhysicsWalker")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from pandac.PandaModules import Vec3
|
from panda3d.core import Vec3
|
||||||
# Utility functions that are useful to both AI and client CartesianGrid code
|
# Utility functions that are useful to both AI and client CartesianGrid code
|
||||||
|
|
||||||
class CartesianGridBase:
|
class CartesianGridBase:
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
|
from panda3d.direct import *
|
||||||
from .MsgTypes import *
|
from .MsgTypes import *
|
||||||
from direct.task import Task
|
from direct.task import Task
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
|
from panda3d.direct import *
|
||||||
from direct.task import Task
|
from direct.task import Task
|
||||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||||
from direct.distributed.DoInterestManager import DoInterestManager
|
from direct.distributed.DoInterestManager import DoInterestManager
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
|
from panda3d.direct import *
|
||||||
from direct.fsm.FSM import FSM
|
from direct.fsm.FSM import FSM
|
||||||
from direct.interval.IntervalGlobal import *
|
from direct.interval.IntervalGlobal import *
|
||||||
from direct.distributed.DistributedObject import DistributedObject
|
from direct.distributed.DistributedObject import DistributedObject
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
|
from panda3d.direct import *
|
||||||
from direct.distributed.DistributedObjectOV import DistributedObjectOV
|
from direct.distributed.DistributedObjectOV import DistributedObjectOV
|
||||||
|
|
||||||
class DistributedCameraOV(DistributedObjectOV):
|
class DistributedCameraOV(DistributedObjectOV):
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
|
from panda3d.direct import *
|
||||||
from direct.interval.IntervalGlobal import *
|
from direct.interval.IntervalGlobal import *
|
||||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
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 direct.task import Task
|
from direct.task import Task
|
||||||
from .DistributedNodeAI import DistributedNodeAI
|
from .DistributedNodeAI import DistributedNodeAI
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from pandac.PandaModules import NodePath
|
from panda3d.core import NodePath
|
||||||
from . import DistributedObjectAI
|
from . import DistributedObjectAI
|
||||||
from . import GridParent
|
from . import GridParent
|
||||||
|
|
||||||
|
@ -35,9 +35,9 @@ class DistributedObjectGlobalUD(DistributedObjectUD):
|
|||||||
def __execMessage(self, message):
|
def __execMessage(self, message):
|
||||||
if not self.ExecNamespace:
|
if not self.ExecNamespace:
|
||||||
# Import some useful variables into the ExecNamespace initially.
|
# Import some useful variables into the ExecNamespace initially.
|
||||||
import pandac.PandaModules
|
import panda3d.core
|
||||||
|
|
||||||
for key, value in pandac.PandaModules.__dict__.items():
|
for key, value in panda3d.core.__dict__.items():
|
||||||
if not key.startswith('__'):
|
if not key.startswith('__'):
|
||||||
self.ExecNamespace[key] = value
|
self.ExecNamespace[key] = value
|
||||||
#self.importExecNamespace()
|
#self.importExecNamespace()
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||||
from direct.distributed.DistributedObjectBase import DistributedObjectBase
|
from direct.distributed.DistributedObjectBase import DistributedObjectBase
|
||||||
from direct.showbase import PythonUtil
|
from direct.showbase import PythonUtil
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
|
from panda3d.direct import *
|
||||||
#from PyDatagram import PyDatagram
|
#from PyDatagram import PyDatagram
|
||||||
#from PyDatagramIterator import PyDatagramIterator
|
#from PyDatagramIterator import PyDatagramIterator
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
"""DistributedSmoothNode module: contains the DistributedSmoothNode class"""
|
"""DistributedSmoothNode module: contains the DistributedSmoothNode class"""
|
||||||
|
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
|
from panda3d.direct import *
|
||||||
from .ClockDelta import *
|
from .ClockDelta import *
|
||||||
from . import DistributedNode
|
from . import DistributedNode
|
||||||
from . import DistributedSmoothNodeBase
|
from . import DistributedSmoothNodeBase
|
||||||
|
@ -7,7 +7,8 @@ zone, remove interest in that zone.
|
|||||||
p.s. A great deal of this code is just code moved from ClientRepository.py.
|
p.s. A great deal of this code is just code moved from ClientRepository.py.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
|
from panda3d.direct import *
|
||||||
from .MsgTypes import *
|
from .MsgTypes import *
|
||||||
from direct.showbase.PythonUtil import *
|
from direct.showbase.PythonUtil import *
|
||||||
from direct.showbase import DirectObject
|
from direct.showbase import DirectObject
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
|
from panda3d.direct import *
|
||||||
|
|
||||||
#
|
#
|
||||||
# GridParent.py
|
# GridParent.py
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
"""ServerRepository module: contains the ServerRepository class"""
|
"""ServerRepository module: contains the ServerRepository class"""
|
||||||
|
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
|
from panda3d.direct import *
|
||||||
from direct.distributed.MsgTypesCMU import *
|
from direct.distributed.MsgTypesCMU import *
|
||||||
from direct.task import Task
|
from direct.task import Task
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from direct.showbase.DirectObject import *
|
from direct.showbase.DirectObject import *
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
from direct.task import Task
|
from direct.task import Task
|
||||||
from direct.distributed import DistributedObject
|
from direct.distributed import DistributedObject
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from direct.distributed.ClockDelta import *
|
from direct.distributed.ClockDelta import *
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
from direct.distributed import DistributedObjectAI
|
from direct.distributed import DistributedObjectAI
|
||||||
|
|
||||||
class TimeManagerAI(DistributedObjectAI.DistributedObjectAI):
|
class TimeManagerAI(DistributedObjectAI.DistributedObjectAI):
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
__all__ = ["install"]
|
__all__ = ["install"]
|
||||||
|
|
||||||
|
from panda3d.core import *
|
||||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||||
from direct.showbase.PythonUtil import fastRepr
|
from direct.showbase.PythonUtil import fastRepr
|
||||||
import sys
|
import sys
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# objects that report different types of leaks to the ContainerLeakDetector
|
# objects that report different types of leaks to the ContainerLeakDetector
|
||||||
|
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
from direct.showbase.DirectObject import DirectObject
|
from direct.showbase.DirectObject import DirectObject
|
||||||
from direct.showbase.Job import Job
|
from direct.showbase.Job import Job
|
||||||
import gc, sys
|
import gc, sys
|
||||||
|
@ -23,7 +23,7 @@ surface are possible, like a funhouse mirror. However, the reflection
|
|||||||
itself is always basically planar; for more accurate convex
|
itself is always basically planar; for more accurate convex
|
||||||
reflections, you will need to use a sphere map or a cube map."""
|
reflections, you will need to use a sphere map or a cube map."""
|
||||||
|
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
from direct.task import Task
|
from direct.task import Task
|
||||||
|
|
||||||
def setupMirror(name, width, height, rootCamera = None):
|
def setupMirror(name, width, height, rootCamera = None):
|
||||||
|
@ -14,7 +14,7 @@ multitexture rendering techniques. It's not a particularly great
|
|||||||
way to do shadows.
|
way to do shadows.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
from direct.task import Task
|
from direct.task import Task
|
||||||
|
|
||||||
sc = None
|
sc = None
|
||||||
|
@ -12,7 +12,7 @@ the its parent node.
|
|||||||
|
|
||||||
from direct.controls.ControlManager import CollisionHandlerRayStart
|
from direct.controls.ControlManager import CollisionHandlerRayStart
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
from pandac.PandaModules import *
|
from panda3d.core import *
|
||||||
from . import DirectObject
|
from . import DirectObject
|
||||||
|
|
||||||
class ShadowPlacer(DirectObject.DirectObject):
|
class ShadowPlacer(DirectObject.DirectObject):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user