Merge branch 'master' into cmake

# Conflicts:
#	direct/src/actor/Actor.py
This commit is contained in:
Sam Edwards 2015-07-12 19:27:56 -07:00
commit 5ee04074c2
391 changed files with 9005 additions and 7433 deletions

View File

@ -4,7 +4,7 @@ compiler:
- clang
before_script:
- sudo apt-get install python-dev libpng-dev zlib1g-dev libssl-dev libx11-dev libgl1-mesa-dev libxrandr-dev libxxf86dga-dev libxcursor-dev bison flex libfreetype6-dev libvorbis-dev libjpeg-dev libopenal-dev libode-dev nvidia-cg-toolkit
script: python makepanda/makepanda.py --everything --git-commit $TRAVIS_COMMIT --installer
script: python makepanda/makepanda.py --everything --verbose --git-commit $TRAVIS_COMMIT --installer --threads 2
notifications:
irc:
channels:

View File

@ -38,12 +38,17 @@ After acquiring these dependencies, you may simply build Panda3D from the
command prompt using the following command:
```bash
makepanda\makepanda.bat --everything --installer
makepanda\makepanda.bat --everything --installer --no-eigen
```
When the build succeeds, it will produce an .exe file that you can use to
install Panda3D on your system.
Note: you may choose to remove --no-eigen and build with Eigen support in
order to improve runtime performance. However, this will cause the build to
take hours to complete, as Eigen is a heavily template-based library, and the
the MSVC compiler does not perform well under these circumstances.
Linux
-----

7
contrib/.gitignore vendored
View File

@ -1,4 +1,9 @@
*.pyc
*.pyo
/__init__.py
/built/
# These are files that are generated within the source tree by the
# ppremake system.
Makefile
pp.dep
/built/
Opt?-*

View File

@ -22,21 +22,12 @@
C++-style comments, since this file is occasionally included by a C
file. */
#if defined(WIN32_VC) && !defined(CPPPARSER) && !defined(LINK_ALL_STATIC)
#ifdef BUILDING_PANDAAI
#define EXPCL_PANDAAI __declspec(dllexport)
#define EXPTP_PANDAAI
#define EXPCL_PANDAAI EXPORT_CLASS
#define EXPTP_PANDAAI EXPORT_TEMPL
#else
#define EXPCL_PANDAAI __declspec(dllimport)
#define EXPTP_PANDAAI extern
#define EXPCL_PANDAAI IMPORT_CLASS
#define EXPTP_PANDAAI IMPORT_TEMPL
#endif
#else /* !WIN32_VC */
#define EXPCL_PANDAAI
#define EXPTP_PANDAAI
#endif /* WIN32_VC */
#endif

1
direct/.gitignore vendored
View File

@ -1,4 +1,5 @@
*.pyc
*.pyo
/__init__.py
# These are files that are generated within the source tree by the
# ppremake system.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 import ShowBase
ShowBase.ShowBase()
base = ShowBase.ShowBase()
# Put an axis in the world:
loader.loadModel("models/misc/xyzAxis").reparentTo(render)

View File

@ -17,21 +17,12 @@
/* See dtoolsymbols.h for a rant on the purpose of this file. */
#if defined(WIN32_VC) && !defined(CPPPARSER) && !defined(LINK_ALL_STATIC)
#ifdef BUILDING_DIRECT
#define EXPCL_DIRECT __declspec(dllexport)
#define EXPTP_DIRECT
#define EXPCL_DIRECT EXPORT_CLASS
#define EXPTP_DIRECT EXPORT_TEMPL
#else
#define EXPCL_DIRECT __declspec(dllimport)
#define EXPTP_DIRECT extern
#define EXPCL_DIRECT IMPORT_CLASS
#define EXPTP_DIRECT IMPORT_TEMPL
#endif
#else /* !WIN32_VC */
#define EXPCL_DIRECT
#define EXPTP_DIRECT
#endif /* WIN32_VC */
#endif

View File

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

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@ files in the lib/pandac/input directory. """
__all__ = []
import os, re
import os
import panda3d, pandac
from panda3d.dtoolconfig import *
@ -135,6 +135,8 @@ def translated_type_name(type, scoped=True):
typename = interrogate_type_name(type)
if typename in ("PyObject", "_object"):
return "object"
elif typename == "PN_stdfloat":
return "float"
if interrogate_type_is_atomic(type):
token = interrogate_type_atomic_token(type)
@ -143,7 +145,9 @@ def translated_type_name(type, scoped=True):
else:
return typename
typename = translateTypeName(typename)
if not typename.endswith('_t'):
# Hack: don't mangle size_t etc.
typename = translateTypeName(typename)
if scoped and interrogate_type_is_nested(type):
return translated_type_name(interrogate_type_outer_class(type)) + '::' + typename

View File

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

View File

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

View File

@ -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',
'GridBack', 'unpickable']

View File

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

View File

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

View File

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

View File

@ -3,7 +3,8 @@
# class variable FuncDict and so we can import DCSubatomicType at the top
# 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
#from otp.ai.AIMsgTypes import *

View File

@ -3,7 +3,8 @@
# class variable FuncDict and so we can import DCSubatomicType at the top
# 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
class PyDatagramIterator(DatagramIterator):

View File

@ -1,7 +1,8 @@
from .core import Dtool_funcToMethod
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):
# Overridden from the C++ function to call privPostEvent
@ -10,7 +11,7 @@ def setT(self, t):
self.setT_Old(t)
self.privPostEvent()
Dtool_ObjectToDict(CInterval, "setT_Old", CInterval.setT)
CInterval.DtoolClassDict["setT_Old"] = CInterval.setT
Dtool_funcToMethod(setT, CInterval)
del setT
#####################################################################

View File

@ -10,22 +10,16 @@ of the NodePath class
####################################################################
def id(self):
"""Returns a unique id identifying the NodePath instance"""
print "Warning: NodePath.id() is deprecated. Use hash(NodePath) or NodePath.get_key() instead."
"""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()
Dtool_funcToMethod(id, NodePath)
del id
#####################################################################
## def __hash__(self): // inside c code
## return self.getKey()
#####################################################################
# For iterating over children
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())
Dtool_funcToMethod(getChildrenAsList, NodePath)
@ -35,7 +29,7 @@ del getChildrenAsList
def printChildren(self):
"""Prints out the children of the bottom node of a node path"""
for child in self.getChildren():
print child.getName()
print(child.getName())
Dtool_funcToMethod(printChildren, NodePath)
del printChildren
#####################################################################
@ -95,8 +89,8 @@ del isolate
#####################################################################
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
# before node is deleted
messenger.send('preRemoveNodePath', [self])
@ -109,11 +103,11 @@ del remove
def lsNames(self):
"""Walk down a tree and print out the path"""
if self.isEmpty():
print "(empty)"
print("(empty)")
else:
type = self.node().getType().getName()
name = self.getName()
print type + " " + name
print(type + " " + name)
self.lsNamesRecurse()
Dtool_funcToMethod(lsNames, NodePath)
@ -124,7 +118,7 @@ def lsNamesRecurse(self, indentString=' '):
for nodePath in self.getChildren():
type = nodePath.node().getType().getName()
name = nodePath.getName()
print indentString + type + " " + name
print(indentString + type + " " + name)
nodePath.lsNamesRecurse(indentString + " ")
Dtool_funcToMethod(lsNamesRecurse, NodePath)
@ -138,7 +132,7 @@ def reverseLsNames(self):
for nodePath in ancestry:
type = nodePath.node().getType().getName()
name = nodePath.getName()
print indentString + type + " " + name
print(indentString + type + " " + name)
indentString = indentString + " "
Dtool_funcToMethod(reverseLsNames, NodePath)
@ -146,7 +140,7 @@ del reverseLsNames
#####################################################################
def getAncestry(self):
"""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.reverse()
return ancestors
@ -197,11 +191,11 @@ def printPos(self, other = None, sd = 2):
else:
pos = self.getPos()
otherString = ''
print (self.getName() + '.setPos(' + otherString +
print((self.getName() + '.setPos(' + otherString +
formatString % pos[0] + ', ' +
formatString % pos[1] + ', ' +
formatString % pos[2] +
')\n')
')\n'))
Dtool_funcToMethod(printPos, NodePath)
del printPos
#####################################################################
@ -215,11 +209,11 @@ def printHpr(self, other = None, sd = 2):
else:
hpr = self.getHpr()
otherString = ''
print (self.getName() + '.setHpr(' + otherString +
print((self.getName() + '.setHpr(' + otherString +
formatString % hpr[0] + ', ' +
formatString % hpr[1] + ', ' +
formatString % hpr[2] +
')\n')
')\n'))
Dtool_funcToMethod(printHpr, NodePath)
del printHpr
#####################################################################
@ -233,11 +227,11 @@ def printScale(self, other = None, sd = 2):
else:
scale = self.getScale()
otherString = ''
print (self.getName() + '.setScale(' + otherString +
print((self.getName() + '.setScale(' + otherString +
formatString % scale[0] + ', ' +
formatString % scale[1] + ', ' +
formatString % scale[2] +
')\n')
')\n'))
Dtool_funcToMethod(printScale, NodePath)
del printScale
@ -253,14 +247,14 @@ def printPosHpr(self, other = None, sd = 2):
pos = self.getPos()
hpr = self.getHpr()
otherString = ''
print (self.getName() + '.setPosHpr(' + otherString +
print((self.getName() + '.setPosHpr(' + otherString +
formatString % pos[0] + ', ' +
formatString % pos[1] + ', ' +
formatString % pos[2] + ', ' +
formatString % hpr[0] + ', ' +
formatString % hpr[1] + ', ' +
formatString % hpr[2] +
')\n')
')\n'))
Dtool_funcToMethod(printPosHpr, NodePath)
del printPosHpr
@ -278,7 +272,7 @@ def printPosHprScale(self, other = None, sd = 2):
hpr = self.getHpr()
scale = self.getScale()
otherString = ''
print (self.getName() + '.setPosHprScale(' + otherString +
print((self.getName() + '.setPosHprScale(' + otherString +
formatString % pos[0] + ', ' +
formatString % pos[1] + ', ' +
formatString % pos[2] + ', ' +
@ -288,14 +282,14 @@ def printPosHprScale(self, other = None, sd = 2):
formatString % scale[0] + ', ' +
formatString % scale[1] + ', ' +
formatString % scale[2] +
')\n')
')\n'))
Dtool_funcToMethod(printPosHprScale, NodePath)
del printPosHprScale
#####################################################################
def printTransform(self, other = None, sd = 2, fRecursive = 0):
from pandac.PandaModules import Vec3
from panda3d.core import Vec3
fmtStr = '%%0.%df' % sd
name = self.getName()
if other == None:
@ -306,23 +300,23 @@ def printTransform(self, other = None, sd = 2, fRecursive = 0):
pos = transform.getPos()
if not pos.almostEqual(Vec3(0)):
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():
hpr = transform.getHpr()
if not hpr.almostEqual(Vec3(0)):
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.hasUniformScale():
scale = transform.getUniformScale()
if scale != 1.0:
outputString = '%s.setScale(%s)' % (name, fmtStr)
print outputString % scale
print(outputString % scale)
else:
scale = transform.getScale()
if not scale.almostEqual(Vec3(1)):
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:
for child in self.getChildren():
child.printTransform(other, sd, fRecursive)
@ -383,700 +377,6 @@ def iPosHprScale(self, other = None):
Dtool_funcToMethod(iPosHprScale, NodePath)
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):
base.startDirect(fWantTk = 1)
from direct.tkpanels import Placer
@ -1253,8 +553,8 @@ Dtool_funcToMethod(colorScaleInterval, NodePath)
del colorScaleInterval
#####################################################################
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)
collNode = CollisionNode(name)
collNode.addSolid(coll)
@ -1267,8 +567,8 @@ Dtool_funcToMethod(attachCollisionSphere, NodePath)
del attachCollisionSphere
#####################################################################
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)
collNode = CollisionNode(name)
collNode.addSolid(coll)
@ -1281,8 +581,8 @@ Dtool_funcToMethod(attachCollisionSegment, NodePath)
del attachCollisionSegment
#####################################################################
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)
collNode = CollisionNode(name)
collNode.addSolid(coll)
@ -1296,7 +596,7 @@ del attachCollisionRay
#####################################################################
def flattenMultitex(self, stateFrom = None, target = None,
useGeom = 0, allowTexMat = 0, win = None):
from pandac.PandaModules import MultitexReducer
from panda3d.core import MultitexReducer
mr = MultitexReducer()
if target != None:
mr.setTarget(target)
@ -1466,26 +766,31 @@ del r_constructCollisionTree
#####################################################################
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.addNode(self.node())
if sga.getNumLodNodes() == 0:
print sga
print(sga)
else:
print "At highest LOD:"
print("At highest LOD:")
sga2 = SceneGraphAnalyzer()
sga2.setLodMode(sga2.LMHighest)
sga2.addNode(self.node())
print sga2
print(sga2)
print "\nAt lowest LOD:"
print("\nAt lowest LOD:")
sga2.clear()
sga2.setLodMode(sga2.LMLowest)
sga2.addNode(self.node())
print sga2
print(sga2)
print "\nAll nodes:"
print sga
print("\nAll nodes:")
print(sga)
Dtool_funcToMethod(analyze, NodePath)
del analyze

View File

@ -14,7 +14,7 @@ def asTuple(self):
"""
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)
Dtool_funcToMethod(asTuple, VBase3)
del asTuple

View File

@ -14,7 +14,7 @@ def asTuple(self):
"""
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)
Dtool_funcToMethod(asTuple, VBase4)

View File

@ -0,0 +1,28 @@
import sys
main_dir = Filename()
if sys.argv and sys.argv[0]:
main_dir = Filename.from_os_specific(sys.argv[0])
if main_dir.empty():
# We must be running in the Python interpreter directly, so return the CWD.
main_dir = ExecutionEnvironment.get_cwd()
else:
main_dir.make_absolute()
main_dir = Filename(main_dir.get_dirname())
ExecutionEnvironment.shadow_environment_variable('MAIN_DIR', main_dir.to_os_specific())
del sys, main_dir
def Dtool_funcToMethod(func, cls, 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."""
#if sys.version_info < (3, 0):
# func.im_class = cls
func.im_func = func
func.im_self = None
if not method_name:
method_name = func.__name__
cls.DtoolClassDict[method_name] = func;

View File

@ -5,8 +5,6 @@ the user to specify alternate parameters on the command line. """
import getopt
import sys
import os
import glob
import types
import time
from direct.ffi import FFIConstants
@ -224,7 +222,7 @@ def doErrorCheck():
FFIConstants.CodeModuleNameList = codeLibs
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
# previous runs before we begin.
@ -337,7 +335,7 @@ def run():
if doHTML:
from direct.directscripts import gendocs
from pandac.PandaModules import PandaSystem
from panda3d.core import PandaSystem
versionString = '%s %s' % (
PandaSystem.getDistributor(), PandaSystem.getVersionString())

View File

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

View File

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

View File

@ -19,8 +19,8 @@ from FilterManager import FilterManager
from panda3d.core import LVecBase4, LPoint2
from panda3d.core import Filename
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="""
float4 cartoondelta = k_cartoonseparation * texpix_txaux.xwyw;

View File

@ -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 TextureStage
from panda3d.core import GraphicsPipe, GraphicsOutput
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 AuxBitplaneAttrib
from direct.directnotify.DirectNotifyGlobal import *

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,8 @@
__all__ = ['DirectGuiBase', 'DirectGuiWidget']
from pandac.PandaModules import *
from panda3d.core import *
from panda3d.direct import get_config_showbase
import DirectGuiGlobals as DGG
from OnscreenText import *
from OnscreenGeom import *
@ -11,9 +12,7 @@ from OnscreenImage import *
from direct.directtools.DirectUtil import ROUND_TO
from direct.showbase import DirectObject
from direct.task import Task
from direct.showbase import ShowBase
from direct.showbase.PythonUtil import recordCreationStackStr
from pandac.PandaModules import PStatCollector
import types
guiObjectCollector = PStatCollector("Client::GuiObjects")
@ -632,7 +631,7 @@ class DirectGuiBase(DirectObject.DirectObject):
"""
# Need to tack on gui item specific id
gEvent = event + self.guiId
if base.config.GetBool('debug-directgui-msgs', False):
if get_config_showbase().GetBool('debug-directgui-msgs', False):
from direct.showbase.PythonUtil import StackTrace
print gEvent
print StackTrace()
@ -655,7 +654,7 @@ def setGuiGridSpacing(spacing):
# this should trigger off of __dev__, but it's not available at this point.
# __debug__ works because the production client is not __debug__ and the
# production AI doesn't create any GUI.
if config.GetBool('record-gui-creation-stack', __debug__):
if get_config_showbase().GetBool('record-gui-creation-stack', __debug__):
# this will help track down the code that created DirectGui objects
# call obj.printCreationStackTrace() to figure out what code created it
DirectGuiBase = recordCreationStackStr(DirectGuiBase)
@ -668,8 +667,7 @@ class DirectGuiWidget(DirectGuiBase, NodePath):
# Determine the default initial state for inactive (or
# unclickable) components. If we are in edit mode, these are
# actually clickable by default.
#guiEdit = base.config.GetBool('direct-gui-edit', 0)
guiEdit = config.GetBool('direct-gui-edit', 0)
guiEdit = get_config_showbase().GetBool('direct-gui-edit', 0)
if guiEdit:
inactiveInitState = DGG.NORMAL
else:
@ -1069,8 +1067,8 @@ class DirectGuiWidget(DirectGuiBase, NodePath):
def printConfig(self, indent = 0):
space = ' ' * indent
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
for child in self.getChildren():
messenger.send(DGG.PRINT + child.getName(), [indent + 2])

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,10 +2,10 @@
__all__ = ['OnscreenText', 'Plain', 'ScreenTitle', 'ScreenPrompt', 'NameConfirm', 'BlackOnWhite']
from pandac.PandaModules import *
from panda3d.core import *
import DirectGuiGlobals as DGG
from direct.showbase.DirectObject import DirectObject
import string,types
import types
## 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

View File

@ -70,7 +70,7 @@ inline int BaseIncomingSet<_INCLASS1,_IN_LISTEN,MESSAGE_READER_BUF,MESSAGE_READE
template <class _INCLASS1,class _IN_LISTEN,typename MESSAGE_READER_BUF, typename MESSAGE_READER_UPPASS>
inline void BaseIncomingSet<_INCLASS1,_IN_LISTEN,MESSAGE_READER_BUF,MESSAGE_READER_UPPASS>::AddAConection(_INCLASS1 * newt)
{
push_back(newt);
this->push_back(newt);
}
////////////////////////////////////////////////////////////////////
// Function name : BaseIncomingSet<_INCLASS1,_IN_LISTEN,MESSAGE_READER_BUF,MESSAGE_READER_UPPASS>::BaseIncomingSet

View File

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

View File

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

View File

@ -2,11 +2,11 @@
__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.directnotify.DirectNotifyGlobal import directNotify
import Interval
import types
#############################################################

View File

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

View File

@ -4,10 +4,9 @@ __all__ = ['Interval']
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.showbase.DirectObject import DirectObject
from pandac.PandaModules import *
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
class Interval(DirectObject):

View File

@ -10,15 +10,17 @@ from FunctionInterval import *
from LerpInterval import *
from IndirectInterval 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 ProjectileInterval import *
from MetaInterval import *
from IntervalManager import *
if __debug__:
if hasattr( pandac.PandaModules, 'ParticleSystem' ):
from TestInterval import *
from pandac.PandaModules import WaitInterval
from panda3d.direct import WaitInterval

View File

@ -2,12 +2,10 @@
__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.showbase import EventManager
import Interval
import types
import fnmatch
class IntervalManager(CIntervalManager):

View File

@ -4,13 +4,15 @@ __all__ = []
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 direct.actor.Actor import *
from direct.directutil import Mopath
base = ShowBase()
boat = loader.loadModel('models/misc/smiley')
boat.reparentTo(render)
@ -205,4 +207,4 @@ if __name__ == "__main__":
# return mt
test(5)
run()
base.run()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,9 +9,10 @@ runp3d.py for a command-line tool to invoke this module.
"""
__all__ = ["AppRunner", "dummyAppRunner", "ArgumentError"]
import sys
import os
import types
import __builtin__
if 'VFSImporter' in sys.modules:
@ -29,7 +30,7 @@ else:
from direct.showbase import VFSImporter
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 import core
from direct.stdpy import file, glob
@ -43,7 +44,7 @@ from direct.p3d.InstalledHostData import InstalledHostData
from direct.p3d.InstalledPackageData import InstalledPackageData
# 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):
pass

View File

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

View File

@ -4,7 +4,7 @@ to build for as many platforms as possible. """
__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 direct.directnotify.DirectNotifyGlobal import *
from direct.showbase.AppRunnerGlobal import appRunner
@ -73,7 +73,7 @@ class Standalone:
self.tempDir = Filename.temporary("", self.basename, "") + "/"
self.tempDir.makeDir()
self.host = HostInfo(PandaSystem.getPackageHostUrl(), appRunner = appRunner, hostDir = self.tempDir, asMirror = False, perPlatform = True)
self.host = HostInfo(PandaSystem.getPackageHostUrl(), appRunner = appRunner, hostDir = self.tempDir, asMirror = False)
self.http = HTTPClient.getGlobalPtr()
if not self.host.hasContentsFile:
@ -233,7 +233,7 @@ class PackageTree:
if hostUrl in self.hosts:
return self.hosts[hostUrl]
host = HostInfo(hostUrl, appRunner = appRunner, hostDir = self.hostDir, asMirror = False, perPlatform = False)
host = HostInfo(hostUrl, appRunner = appRunner, hostDir = self.hostDir, asMirror = False)
if not host.hasContentsFile:
if not host.readContentsFile():
if not host.downloadContentsFile(self.http):
@ -587,15 +587,22 @@ class Installer:
for package in pkgTree.packages.values():
xpackage = TiXmlElement('package')
xpackage.SetAttribute('name', package.packageName)
filename = package.packageName + "/"
if package.packageVersion:
xpackage.SetAttribute('version', package.packageVersion)
filename += package.packageVersion + "/"
if package.platform:
xpackage.SetAttribute('platform', package.platform)
filename += package.platform + "/"
assert package.platform == platform
xpackage.SetAttribute('per_platform', '0')
if package.packageVersion:
xpackage.SetAttribute('version', version)
xpackage.SetAttribute('filename', package.packageName + "/" + package.packageVersion + "/" + package.descFileBasename)
else:
xpackage.SetAttribute('filename', package.packageName + "/" + package.descFileBasename)
xpackage.SetAttribute('per_platform', '1')
filename += package.descFileBasename
xpackage.SetAttribute('filename', filename)
xcontents.InsertEndChild(xpackage)
doc.InsertEndChild(xcontents)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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
from direct.p3d.FileSpec import FileSpec
from direct.p3d.ScanDirectoryNode import ScanDirectoryNode

View File

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

View File

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

View File

@ -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
application. """
__all__ = ["Packager", "PackagerError", "OutsideOfPackageError", "ArgumentError"]
# Important to import panda3d first, to avoid naming conflicts with
# Python's "string" and "Loader" names that are imported later.
from panda3d.core import *
import sys
import os
import glob
import marshal
import string
import types
import getpass
import platform
import struct
import subprocess
from direct.p3d.FileSpec import FileSpec

View File

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

View File

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

View File

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

View File

@ -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.PhysicsManagerGlobal import *

View File

@ -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
class ParticleEffect(NodePath):

View File

@ -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 Particles
from direct.particles import ForceGroup
@ -48,8 +49,8 @@ class ParticleFloorTest(NodePath):
if __name__ == "__main__":
from direct.directbase.TestStart import *
pt=ParticleFloorTest()
pt = ParticleFloorTest()
pt.reparentTo(render)
pt.start()
camera.setY(-10.0)
run()
base.camera.setY(-10.0)
base.run()

View File

@ -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 BaseParticleFactory
from panda3d.physics import PointParticleFactory
from panda3d.physics import ZSpinParticleFactory
#from panda3d.physics import OrientedParticleFactory
@ -25,8 +25,6 @@ from panda3d.physics import TangentRingEmitter
import SpriteParticleRendererExt
import string
import os
from direct.directnotify.DirectNotifyGlobal import directNotify
import sys

View File

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

View File

@ -1,6 +1,5 @@
from pandac.PandaModules import PStatCollector
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.Job import Job
import types, weakref, random, __builtin__

View File

@ -1,6 +1,6 @@
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
import types

Some files were not shown because too many files have changed in this diff Show More