Skip to content
Permalink
Browse files

Merge branch 'master' into cmake

  • Loading branch information
CFSworks committed Nov 8, 2019
2 parents 0e0b218 + d2bd418 commit 9b7bcf25644cbcb6ea0b0e4d9714100034eaf593
Showing with 1,261 additions and 888 deletions.
  1. +27 −29 direct/src/actor/Actor.py
  2. +2 −1 direct/src/cluster/ClusterClient.py
  3. +20 −17 direct/src/cluster/ClusterConfig.py
  4. +16 −15 direct/src/controls/ControlManager.py
  5. +8 −6 direct/src/controls/DevWalker.py
  6. +8 −6 direct/src/controls/GhostWalker.py
  7. +8 −6 direct/src/controls/GravityWalker.py
  8. +20 −18 direct/src/controls/InputState.py
  9. +8 −6 direct/src/controls/NonPhysicsWalker.py
  10. +8 −6 direct/src/controls/ObserverWalker.py
  11. +0 −2 direct/src/controls/PhysicsRoller.py
  12. +8 −6 direct/src/controls/PhysicsWalker.py
  13. +1 −1 direct/src/controls/TwoDWalker.py
  14. +1 −1 direct/src/directdevices/DirectDeviceManager.py
  15. +2 −2 direct/src/directdevices/DirectFastrak.py
  16. +5 −1 direct/src/directnotify/DirectNotifyGlobal.py
  17. +2 −1 direct/src/directnotify/LoggerGlobal.py
  18. +6 −6 direct/src/directnotify/Notifier.py
  19. +15 −15 direct/src/directnotify/RotatingLog.py
  20. +38 −32 direct/src/directutil/Verify.py
  21. +4 −0 direct/src/dist/__init__.py
  22. +6 −0 direct/src/dist/commands.py
  23. +1 −1 direct/src/distributed/AsyncRequest.py
  24. +2 −1 direct/src/distributed/DistributedObject.py
  25. +2 −1 direct/src/distributed/DistributedObjectBase.py
  26. +9 −8 direct/src/distributed/DoCollectionManager.py
  27. +8 −9 direct/src/distributed/DoHierarchy.py
  28. +1 −4 direct/src/distributed/PyDatagram.py
  29. +1 −0 direct/src/distributed/PyDatagramIterator.py
  30. +1 −1 direct/src/distributed/ServerRepository.py
  31. +13 −12 direct/src/fsm/ClassicFSM.py
  32. +37 −33 direct/src/fsm/FSM.py
  33. +3 −6 direct/src/fsm/FourState.py
  34. +12 −14 direct/src/fsm/FourStateAI.py
  35. +3 −0 direct/src/fsm/__init__.py
  36. +5 −1 direct/src/gui/DirectButton.py
  37. +5 −1 direct/src/gui/DirectCheckButton.py
  38. +48 −44 direct/src/gui/DirectDialog.py
  39. +5 −1 direct/src/gui/DirectEntry.py
  40. +3 −0 direct/src/gui/DirectFrame.py
  41. +1 −1 direct/src/gui/DirectGui.py
  42. +44 −36 direct/src/gui/DirectGuiBase.py
  43. +3 −6 direct/src/gui/DirectGuiGlobals.py
  44. +5 −1 direct/src/gui/DirectLabel.py
  45. +20 −9 direct/src/gui/DirectOptionMenu.py
  46. +5 −1 direct/src/gui/DirectRadioButton.py
  47. +5 −1 direct/src/gui/DirectScrollBar.py
  48. +8 −1 direct/src/gui/DirectScrolledFrame.py
  49. +5 −1 direct/src/gui/DirectScrolledList.py
  50. +5 −1 direct/src/gui/DirectSlider.py
  51. +5 −1 direct/src/gui/DirectWaitBar.py
  52. +11 −6 direct/src/gui/OnscreenImage.py
  53. +6 −2 direct/src/gui/OnscreenText.py
  54. +1 −1 direct/src/gui/__init__.py
  55. +5 −1 direct/src/interval/ActorInterval.py
  56. +16 −20 direct/src/interval/ParticleInterval.py
  57. +2 −0 direct/src/interval/__init__.py
  58. +1 −0 direct/src/leveleditor/ActionMgr.py
  59. +7 −1 direct/src/particles/Particles.py
  60. +3 −0 direct/src/particles/__init__.py
  61. +8 −3 direct/src/showbase/AppRunnerGlobal.py
  62. +26 −11 direct/src/showbase/BufferViewer.py
  63. +2 −1 direct/src/showbase/BulletinBoardGlobal.py
  64. +23 −21 direct/src/showbase/DistancePhasedNode.py
  65. +1 −0 direct/src/showbase/ExceptionVarDump.py
  66. +4 −1 direct/src/showbase/GarbageReportScheduler.py
  67. +2 −1 direct/src/showbase/InputStateGlobal.py
  68. +35 −27 direct/src/showbase/Job.py
  69. +1 −0 direct/src/showbase/JobManagerGlobal.py
  70. +3 −1 direct/src/showbase/LeakDetectors.py
  71. +3 −1 direct/src/showbase/Loader.py
  72. +25 −23 direct/src/showbase/Messenger.py
  73. +2 −1 direct/src/showbase/MessengerGlobal.py
  74. +1 −1 direct/src/showbase/MirrorDemo.py
  75. +2 −1 direct/src/showbase/PhysicsManagerGlobal.py
  76. +7 −4 direct/src/showbase/Pool.py
  77. +79 −77 direct/src/showbase/PythonUtil.py
  78. +57 −33 direct/src/showbase/ShowBase.py
  79. +12 −3 direct/src/showbase/ShowBaseGlobal.py
  80. +1 −0 direct/src/showbase/TkGlobal.py
  81. +25 −14 direct/src/showbase/VFSImporter.py
  82. +2 −0 direct/src/showbase/WxGlobal.py
  83. +5 −0 direct/src/stdpy/file.py
  84. +3 −3 direct/src/stdpy/pickle.py
  85. +64 −58 direct/src/task/Task.py
  86. +1 −1 direct/src/task/TaskManagerGlobal.py
  87. +3 −0 direct/src/task/__init__.py
  88. +104 −102 direct/src/tkpanels/FSMInspector.py
  89. +3 −0 direct/src/tkpanels/__init__.py
  90. +1 −0 direct/src/tkwidgets/__init__.py
  91. +6 −0 dtool/src/dtoolutil/pandaSystem.cxx
  92. +2 −3 dtool/src/interrogate/interfaceMakerPythonNative.cxx
  93. +4 −14 dtool/src/interrogatedb/py_panda.cxx
  94. +5 −5 dtool/src/interrogatedb/py_wrappers.cxx
  95. +8 −2 makepanda/makepanda.bat
  96. +1 −2 makepanda/makepandacore.py
  97. +7 −0 makepanda/makewheel.py
  98. +15 −11 panda/src/audio/audioSound.h
  99. +7 −2 panda/src/audiotraits/openalAudioSound.cxx
  100. +1 −1 panda/src/collide/collisionTraverser.cxx
  101. +1 −1 panda/src/collide/collisionTraverser.h
  102. +1 −1 panda/src/downloader/httpClient.I
  103. +4 −7 panda/src/event/asyncFuture_ext.cxx
  104. +1 −1 panda/src/event/pythonTask.cxx
  105. +5 −1 panda/src/glstuff/glGraphicsBuffer_src.cxx
  106. +3 −0 panda/src/gobj/geomPrimitive.cxx
  107. +2 −0 panda/src/gobj/preparedGraphicsObjects.cxx
  108. +1 −1 panda/src/grutil/geoMipTerrain.h
  109. +1 −1 panda/src/mathutil/perlinNoise2.h
  110. +4 −4 panda/src/physx/physxContactPair.cxx
  111. +5 −4 panda/src/pnmimage/pnm-image-filter-core.cxx
  112. +8 −4 panda/src/pnmimage/pnm-image-filter-sparse-core.cxx
  113. +29 −13 panda/src/pnmimage/pnm-image-filter.cxx
  114. +1 −0 panda/src/pstatclient/pStatClient.cxx
  115. +21 −16 panda/src/putil/bamEnums.h
  116. +1 −1 panda/src/x11display/x11GraphicsWindow.cxx
  117. +9 −0 pandatool/src/deploy-stub/deploy-stub.c
  118. +73 −0 tests/gui/test_DirectOptionMenu.py
  119. +0 −1 tests/test_imports.py
@@ -104,45 +104,43 @@ def __init__(self, models=None, anims=None, other=None, copy=True,
lodNode = None, flattenable = True, setFinal = False,
mergeLODBundles = None, allowAsyncBind = None,
okMissing = None):
"""__init__(self, string | string:string{}, string:string{} |
string:(string:string{}){}, Actor=None)
Actor constructor: can be used to create single or multipart
"""Actor constructor: can be used to create single or multipart
actors. If another Actor is supplied as an argument this
method acts like a copy constructor. Single part actors are
created by calling with a model and animation dictionary
(animName:animPath{}) as follows:
``(animName:animPath{})`` as follows::
a = Actor("panda-3k.egg", {"walk":"panda-walk.egg" \
a = Actor("panda-3k.egg", {"walk":"panda-walk.egg",
"run":"panda-run.egg"})
This could be displayed and animated as such:
This could be displayed and animated as such::
a.reparentTo(render)
a.loop("walk")
a.stop()
Multipart actors expect a dictionary of parts and a dictionary
of animation dictionaries (partName:(animName:animPath{}){}) as
below:
of animation dictionaries ``(partName:(animName:animPath{}){})``
as below::
a = Actor(
# part dictionary
{"head":"char/dogMM/dogMM_Shorts-head-mod", \
"torso":"char/dogMM/dogMM_Shorts-torso-mod", \
"legs":"char/dogMM/dogMM_Shorts-legs-mod"}, \
{"head": "char/dogMM/dogMM_Shorts-head-mod",
"torso": "char/dogMM/dogMM_Shorts-torso-mod",
"legs": "char/dogMM/dogMM_Shorts-legs-mod"},
# dictionary of anim dictionaries
{"head":{"walk":"char/dogMM/dogMM_Shorts-head-walk", \
"run":"char/dogMM/dogMM_Shorts-head-run"}, \
"torso":{"walk":"char/dogMM/dogMM_Shorts-torso-walk", \
"run":"char/dogMM/dogMM_Shorts-torso-run"}, \
"legs":{"walk":"char/dogMM/dogMM_Shorts-legs-walk", \
"run":"char/dogMM/dogMM_Shorts-legs-run"} \
{"head":{"walk": "char/dogMM/dogMM_Shorts-head-walk",
"run": "char/dogMM/dogMM_Shorts-head-run"},
"torso":{"walk": "char/dogMM/dogMM_Shorts-torso-walk",
"run": "char/dogMM/dogMM_Shorts-torso-run"},
"legs":{"walk": "char/dogMM/dogMM_Shorts-legs-walk",
"run": "char/dogMM/dogMM_Shorts-legs-run"}
})
In addition multipart actor parts need to be connected together
in a meaningful fashion:
in a meaningful fashion::
a.attach("head", "torso", "joint-head")
a.attach("torso", "legs", "joint-hips")
@@ -151,7 +149,7 @@ def __init__(self, models=None, anims=None, other=None, copy=True,
# ADD LOD COMMENT HERE!
#
Other useful Actor class functions:
Other useful Actor class functions::
#fix actor eye rendering
a.drawInFront("joint-pupil?", "eyes*")
@@ -1135,7 +1133,7 @@ def stopJoint(self, partName, jointName, lodName="lodRoot"):
def getJoints(self, partName = None, jointName = '*', lodName = None):
""" Returns the list of all joints, from the named part or
from all parts, that match the indicated jointName. The
jointName may include pattern characters like *. """
jointName may include pattern characters like \\*. """

joints=[]
pattern = GlobPattern(jointName)
@@ -2439,15 +2437,15 @@ def actorInterval(self, *args, **kw):
return ActorInterval.ActorInterval(self, *args, **kw)

def getAnimBlends(self, animName=None, partName=None, lodName=None):
""" Returns a list of the form:
[ (lodName, [(animName, [(partName, effect), (partName, effect), ...]),
(animName, [(partName, effect), (partName, effect), ...]),
...]),
(lodName, [(animName, [(partName, effect), (partName, effect), ...]),
(animName, [(partName, effect), (partName, effect), ...]),
...]),
... ]
"""Returns a list of the form::
[ (lodName, [(animName, [(partName, effect), (partName, effect), ...]),
(animName, [(partName, effect), (partName, effect), ...]),
...]),
(lodName, [(animName, [(partName, effect), (partName, effect), ...]),
(animName, [(partName, effect), (partName, effect), ...]),
...]),
... ]
This list reports the non-zero control effects for each
partName within a particular animation and LOD. """
@@ -1,4 +1,4 @@
"""ClusterClient: Master for mutli-piping or PC clusters. """
"""ClusterClient: Master for multi-piping or PC clusters."""

from panda3d.core import *
from .ClusterMsgs import *
@@ -8,6 +8,7 @@
from direct.task import Task
import os


class ClusterClient(DirectObject.DirectObject):
notify = DirectNotifyGlobal.directNotify.newCategory("ClusterClient")
MGR_NUM = 1000000
@@ -1,23 +1,26 @@

from .ClusterClient import *

# A dictionary of information for various cluster configurations.
# Dictionary is keyed on cluster-config string
# Each dictionary contains a list of display configurations, one for
# each display in the cluster
# Information that can be specified for each display:
# display name: Name of display (used in Configrc to specify server)
# display type: Used to flag client vs. server
# pos: positional offset of display's camera from main cluster group
# hpr: orientation offset of display's camera from main cluster group
# focal length: display's focal length (in mm)
# film size: display's film size (in inches)
# film offset: offset of film back (in inches)
# Note: Note, this overrides offsets specified in DirectCamConfig.py
# For now we only specify frustum for first display region of configuration
# TODO: Need to handle multiple display regions per cluster node and to
# generalize to non cluster situations

#: A dictionary of information for various cluster configurations.
#: Dictionary is keyed on cluster-config string
#: Each dictionary contains a list of display configurations, one for
#: each display in the cluster
#:
#: Information that can be specified for each display:
#:
#: - display name: Name of display (used in Configrc to specify server)
#: - display type: Used to flag client vs. server
#: - pos: positional offset of display's camera from main cluster group
#: - hpr: orientation offset of display's camera from main cluster group
#: - focal length: display's focal length (in mm)
#: - film size: display's film size (in inches)
#: - film offset: offset of film back (in inches)
#:
#: Note: this overrides offsets specified in DirectCamConfig.py
#: For now we only specify frustum for first display region of configuration
#:
#: TODO: Need to handle multiple display regions per cluster node and to
#: generalize to non cluster situations
ClientConfigs = {
'single-server': [{'display name': 'display0',
'display mode': 'client',
@@ -15,7 +15,9 @@
from direct.task import Task
from panda3d.core import ConfigVariableBool

CollisionHandlerRayStart = 4000.0 # This is a hack, it may be better to use a line instead of a ray.
# This is a hack, it may be better to use a line instead of a ray.
CollisionHandlerRayStart = 4000.0


class ControlManager:
notify = DirectNotifyGlobal.directNotify.newCategory("ControlManager")
@@ -52,14 +54,14 @@ def __str__(self):
return 'ControlManager: using \'%s\'' % self.currentControlsName

def add(self, controls, name="basic"):
"""
controls is an avatar control system.
name is any key that you want to use to refer to the
the controls later (e.g. using the use(<name>) call).
"""Add a control instance to the list of available control systems.
Add a control instance to the list of available control systems.
Args:
controls: an avatar control system.
name (str): any key that you want to use to refer to the controls
later (e.g. using the use(<name>) call).
See also: use().
See also: :meth:`use()`.
"""
assert self.notify.debugCall(id(self))
assert controls is not None
@@ -77,15 +79,14 @@ def get(self, name):
return self.controls.get(name)

def remove(self, name):
"""
name is any key that was used to refer to the
the controls when they were added (e.g.
using the add(<controls>, <name>) call).
"""Remove a control instance from the list of available control
systems.
Remove a control instance from the list of
available control systems.
Args:
name: any key that was used to refer to the controls when they were
added (e.g. using the add(<controls>, <name>) call).
See also: add().
See also: :meth:`add()`.
"""
assert self.notify.debugCall(id(self))
oldControls = self.controls.pop(name,None)
@@ -108,7 +109,7 @@ def use(self, name, avatar):
Use a previously added control system.
See also: add().
See also: :meth:`add()`.
"""
assert self.notify.debugCall(id(self))
if __debug__ and hasattr(self, "ignoreUse"):
@@ -2,15 +2,17 @@
DevWalker.py is for avatars.
A walker control such as this one provides:
- creation of the collision nodes
- handling the keyboard and mouse input for avatar movement
- moving the avatar
- creation of the collision nodes
- handling the keyboard and mouse input for avatar movement
- moving the avatar
it does not:
- play sounds
- play animations
although it does send messeges that allow a listener to play sounds or
- play sounds
- play animations
although it does send messages that allow a listener to play sounds or
animations based on walker events.
"""

@@ -2,15 +2,17 @@
GhostWalker.py is for avatars.
A walker control such as this one provides:
- creation of the collision nodes
- handling the keyboard and mouse input for avatar movement
- moving the avatar
- creation of the collision nodes
- handling the keyboard and mouse input for avatar movement
- moving the avatar
it does not:
- play sounds
- play animations
although it does send messeges that allow a listener to play sounds or
- play sounds
- play animations
although it does send messages that allow a listener to play sounds or
animations based on walker events.
"""

@@ -2,15 +2,17 @@
GravityWalker.py is for avatars.
A walker control such as this one provides:
- creation of the collision nodes
- handling the keyboard and mouse input for avatar movement
- moving the avatar
- creation of the collision nodes
- handling the keyboard and mouse input for avatar movement
- moving the avatar
it does not:
- play sounds
- play animations
although it does send messeges that allow a listener to play sounds or
- play sounds
- play animations
although it does send messages that allow a listener to play sounds or
animations based on walker events.
"""
from direct.directnotify.DirectNotifyGlobal import directNotify
@@ -1,7 +1,6 @@


from direct.directnotify import DirectNotifyGlobal
from direct.showbase import DirectObject
from direct.showbase.PythonUtil import SerialNumGen

# internal class, don't create these on your own
class InputStateToken:
@@ -136,14 +135,16 @@ def releaseInputs(self, name):

def watch(self, name, eventOn, eventOff, startState=False, inputSource=None):
"""
This returns a token; hold onto the token and call token.release() when you
no longer want to watch for these events.
# set up
token = inputState.watch('forward', 'w', 'w-up', inputSource=inputState.WASD)
...
# tear down
token.release()
This returns a token; hold onto the token and call token.release() when
you no longer want to watch for these events.
Example::
# set up
token = inputState.watch('forward', 'w', 'w-up', inputSource=inputState.WASD)
...
# tear down
token.release()
"""
assert self.debugPrint(
"watch(name=%s, eventOn=%s, eventOff=%s, startState=%s)"%(
@@ -192,15 +193,16 @@ def force(self, name, value, inputSource):
"""
Force isSet(name) to return 'value'.
This returns a token; hold onto the token and call token.release() when you
no longer want to force the state.
This returns a token; hold onto the token and call token.release() when
you no longer want to force the state.
Example::
example:
# set up
token=inputState.force('forward', True, inputSource='myForwardForcer')
...
# tear down
token.release()
# set up
token = inputState.force('forward', True, inputSource='myForwardForcer')
...
# tear down
token.release()
"""
token = InputStateForceToken(self)
self._token2forceInfo[token] = (name, inputSource)
@@ -2,15 +2,17 @@
NonPhysicsWalker.py is for avatars.
A walker control such as this one provides:
- creation of the collision nodes
- handling the keyboard and mouse input for avatar movement
- moving the avatar
- creation of the collision nodes
- handling the keyboard and mouse input for avatar movement
- moving the avatar
it does not:
- play sounds
- play animations
although it does send messeges that allow a listener to play sounds or
- play sounds
- play animations
although it does send messages that allow a listener to play sounds or
animations based on walker events.
"""

0 comments on commit 9b7bcf2

Please sign in to comment.
You can’t perform that action at this time.