Skip to content
Permalink
Browse files

Merge branch 'master' into vulkan

  • Loading branch information
rdb committed Nov 9, 2019
2 parents 6c4cefc + f1b235e commit d564ef5dbca35026f1b52cee7cff0844f280b6cb
Showing 608 changed files with 12,909 additions and 81,249 deletions.
@@ -0,0 +1,2 @@
open_collective: panda3d

@@ -0,0 +1,57 @@
name: Continuous Integration

Check failure on line 1 in .github/workflows/ci.yml

GitHub Actions / makepanda (ubuntu-16.04)

.github/workflows/ci.yml#L1

The job was canceled because "windows-2016" failed.

Check failure on line 1 in .github/workflows/ci.yml

GitHub Actions / makepanda (ubuntu-16.04)

.github/workflows/ci.yml#L1

The operation was canceled.

Check failure on line 1 in .github/workflows/ci.yml

GitHub Actions / makepanda (windows-2016)

.github/workflows/ci.yml#L1

Process completed with exit code 1.

Check failure on line 1 in .github/workflows/ci.yml

GitHub Actions / makepanda (macOS-10.14)

.github/workflows/ci.yml#L1

The job was canceled because "windows-2016" failed.

Check failure on line 1 in .github/workflows/ci.yml

GitHub Actions / makepanda (macOS-10.14)

.github/workflows/ci.yml#L1

The operation was canceled.
on: [push, pull_request]
jobs:
makepanda:
strategy:
matrix:
os: [ubuntu-16.04, windows-2016, macOS-10.14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-16.04'
run: |
sudo apt-get install build-essential bison flex libfreetype6-dev libgl1-mesa-dev libjpeg-dev libode-dev libopenal-dev libpng-dev libssl-dev libvorbis-dev libx11-dev libxcursor-dev libxrandr-dev nvidia-cg-toolkit zlib1g-dev
- name: Get thirdparty packages (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
$wc = New-Object System.Net.WebClient
$wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.4.1/panda3d-1.10.4.1-tools-win64.zip", "thirdparty-tools.zip")
Expand-Archive -Path thirdparty-tools.zip
Move-Item -Path thirdparty-tools/panda3d-1.10.4.1/thirdparty -Destination .
- name: Get thirdparty packages (macOS)
if: runner.os == 'macOS'
run: |
curl -O https://www.panda3d.org/download/panda3d-1.10.4.1/panda3d-1.10.4.1-tools-mac.tar.gz
tar -xf panda3d-1.10.4.1-tools-mac.tar.gz
mv panda3d-1.10.4.1/thirdparty thirdparty
rmdir panda3d-1.10.4.1
(cd thirdparty/darwin-libs-a && rm -rf ode openal vrpn openexr assimp rocket)
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Build Python 3.7
run: |
python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir=$pythonLocation/include --python-libdir=$pythonLocation/lib --verbose --threads=4
- name: Test Python 3.7
shell: bash
run: |
python -m pip install pytest
PYTHONPATH=built LD_LIBRARY_PATH=built/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
- name: Set up Python 2.7
uses: actions/setup-python@v1
with:
python-version: 2.7
- name: Build Python 2.7
run: |
python makepanda/makepanda.py --no-copy-python --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir=$pythonLocation/include --python-libdir=$pythonLocation/lib --verbose --threads=4
- name: Test Python 2.7
shell: bash
run: |
python -m pip install pytest
PYTHONPATH=built LD_LIBRARY_PATH=built/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
- name: Make installer
run: |
python makepanda/makepackage.py --verbose --lzma
@@ -44,7 +44,6 @@ install:
- $PYTHONV -m pip install pytest
script:
- $PYTHONV makepanda/makepanda.py --everything --git-commit $TRAVIS_COMMIT $FLAGS --threads 4
- test -n "$SKIP_TESTS" || LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV makepanda/test_imports.py
- test -n "$SKIP_TESTS" || LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV -m pytest -v tests
notifications:
irc:
@@ -24,6 +24,12 @@ This is a list of all the people who are contributing financially to Panda3D. I
* Sam Edwards
* Max Voss

## Enthusiasts

![Benefactors](https://opencollective.com/panda3d/tiers/enthusiast.svg?avatarHeight=48&width=600)

* Eric Thomson

## Backers

![Backers](https://opencollective.com/panda3d/tiers/backer.svg?avatarHeight=48&width=600)
@@ -24,7 +24,7 @@ Installing Panda3D
==================

The latest Panda3D SDK can be downloaded from
[this page](https://www.panda3d.org/download/sdk-1-10-3/).
[this page](https://www.panda3d.org/download/sdk-1-10-4-1/).
If you are familiar with installing Python packages, you can use
the following comand:

@@ -64,8 +64,8 @@ depending on whether you are on a 32-bit or 64-bit system, or you can
[click here](https://github.com/rdb/panda3d-thirdparty) for instructions on
building them from source.

https://www.panda3d.org/download/panda3d-1.10.3/panda3d-1.10.3-tools-win64.zip
https://www.panda3d.org/download/panda3d-1.10.3/panda3d-1.10.3-tools-win32.zip
https://www.panda3d.org/download/panda3d-1.10.4.1/panda3d-1.10.4.1-tools-win64.zip
https://www.panda3d.org/download/panda3d-1.10.4.1/panda3d-1.10.4.1-tools-win32.zip

After acquiring these dependencies, you may simply build Panda3D from the
command prompt using the following command. (Change `14.1` to `14` if you are
@@ -135,7 +135,7 @@ macOS
-----

On macOS, you will need to download a set of precompiled thirdparty packages in order to
compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.10.3/panda3d-1.10.3-tools-mac.tar.gz).
compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.10.4.1/panda3d-1.10.4.1-tools-mac.tar.gz).

After placing the thirdparty directory inside the panda3d source directory,
you may build Panda3D using a command like the following:
@@ -28,6 +28,9 @@ class PathFollow;
class PathFind;
class ObstacleAvoidance;

#include "flee.h"
#include "evade.h"

typedef std::list<Flee, std::allocator<Flee> > ListFlee;
typedef std::list<Evade, std::allocator<Evade> > ListEvade;

@@ -67,7 +67,7 @@ class AnimDef:

def __init__(self, filename = None, animBundle = None):
self.filename = filename
self.animBundle = None
self.animBundle = animBundle
self.animControl = None

def makeCopy(self):
@@ -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)
@@ -1947,6 +1945,7 @@ def loadModel(self, modelPath, partName="modelRoot", lodName="lodRoot",
animName = acc.getAnimName(i)

animDef = Actor.AnimDef()
animDef.animBundle = animControl.getAnim()
animDef.animControl = animControl
self.__animControlDict[lodName][partName][animName] = animDef

@@ -2438,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.
"""

0 comments on commit d564ef5

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