Skip to content

Commit

Permalink
Merge branch 'master' into webgl-port
Browse files Browse the repository at this point in the history
  • Loading branch information
rdb committed Sep 6, 2017
2 parents 8d68256 + 82eec03 commit d7f0f82
Show file tree
Hide file tree
Showing 373 changed files with 10,941 additions and 7,421 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -8,6 +8,7 @@
core core
core.* core.*
vgcore.* vgcore.*
*.core


# Editor files/directories # Editor files/directories
*.save *.save
Expand All @@ -22,6 +23,9 @@ vgcore.*
*.o *.o
*.gch *.gch
*.pch *.pch
/+DESC
/+MANIFEST
/pkg-plist


# Produced installer/executables # Produced installer/executables
/*.exe /*.exe
Expand All @@ -31,6 +35,7 @@ vgcore.*
/*.pkg /*.pkg
/*.dmg /*.dmg
/*.whl /*.whl
/*.txz


# CMake # CMake
/build/ /build/
Expand Down
11 changes: 9 additions & 2 deletions .travis.yml
Expand Up @@ -2,15 +2,22 @@ language: cpp
sudo: false sudo: false
matrix: matrix:
include: include:
- compiler: gcc
env: PYTHONV=python2.7 FLAGS=--optimize=4
- compiler: clang - compiler: clang
env: PYTHONV=python3 FLAGS=--installer env: PYTHONV=python3 FLAGS=--installer
- compiler: clang - compiler: clang
env: PYTHONV=python2.7 FLAGS=--override=STDFLOAT_DOUBLE=1 env: PYTHONV=python2.7 FLAGS=--override=STDFLOAT_DOUBLE=1
- compiler: gcc
env: PYTHONV=python2.7 FLAGS=--optimize=4
before_install:
- export CC=gcc-4.7
- export CXX=g++-4.7
addons: addons:
apt: apt:
sources:
- ubuntu-toolchain-r-test
packages: packages:
- gcc-4.7
- g++-4.7
- bison - bison
- flex - flex
- libfreetype6-dev - libfreetype6-dev
Expand Down
22 changes: 22 additions & 0 deletions README.md
Expand Up @@ -134,6 +134,28 @@ If the build was successful, makepanda will have generated a .dmg file in
the source directory containing the installer. Simply open it and run the the source directory containing the installer. Simply open it and run the
package file in order to install the SDK onto your system. package file in order to install the SDK onto your system.


FreeBSD
-------

Building on FreeBSD is very similar to building on Linux. You will need to
install the requisite packages using the system package manager. To install
the recommended set of dependencies, you can use this command:

```bash
pkg install pkgconf png jpeg-turbo tiff freetype2 eigen squish openal opusfile libvorbis libX11 libGL ode bullet assimp openexr
```

You will also need to choose which version of Python you want to use.
Install the appropriate package for it (such as `python2` or `python36`) and
run the makepanda script with your chosen Python version:

```bash
python3.6 makepanda/makepanda.py --everything --installer --no-egl --no-gles --no-gles2
```

If successful, this will produce a .pkg file in the root of the source
directory which you can install using `pkg install`.

Reporting Issues Reporting Issues
================ ================


Expand Down
94 changes: 94 additions & 0 deletions direct/src/actor/Actor.py
Expand Up @@ -50,6 +50,10 @@ def getBundle(self):
def __repr__(self): def __repr__(self):
return 'Actor.PartDef(%s, %s)' % (repr(self.partBundleNP), repr(self.partModel)) return 'Actor.PartDef(%s, %s)' % (repr(self.partBundleNP), repr(self.partModel))



#snake_case alias:
get_bundle = getBundle

class AnimDef: class AnimDef:


"""Instances of this class are stored within the """Instances of this class are stored within the
Expand All @@ -72,6 +76,10 @@ def makeCopy(self):
def __repr__(self): def __repr__(self):
return 'Actor.AnimDef(%s)' % (repr(self.filename)) return 'Actor.AnimDef(%s)' % (repr(self.filename))



#snake_case alias:
make_copy = makeCopy

class SubpartDef: class SubpartDef:


"""Instances of this class are stored within the SubpartDict """Instances of this class are stored within the SubpartDict
Expand Down Expand Up @@ -2549,3 +2557,89 @@ def renamePartBundles(self, partName, newBundleName):
for partBundleDict in self.__partBundleDict.values(): for partBundleDict in self.__partBundleDict.values():
partDef = partBundleDict.get(subpartDef.truePartName) partDef = partBundleDict.get(subpartDef.truePartName)
partDef.getBundle().setName(newBundleName) partDef.getBundle().setName(newBundleName)

#snake_case alias:
control_joint = controlJoint
set_lod_animation = setLODAnimation
get_anim_control_dict = getAnimControlDict
get_actor_info = getActorInfo
clear_lod_animation = clearLODAnimation
reset_lod = resetLOD
fix_bounds = fixBounds
get_anim_filename = getAnimFilename
get_subparts_complete = getSubpartsComplete
verify_subparts_complete = verifySubpartsComplete
get_play_rate = getPlayRate
clear_python_data = clearPythonData
load_anims = loadAnims
set_subparts_complete = setSubpartsComplete
draw_in_front = drawInFront
get_lod_node = getLODNode
hide_part = hidePart
get_joint_transform_state = getJointTransformState
set_control_effect = setControlEffect
get_anim_controls = getAnimControls
release_joint = releaseJoint
print_anim_blends = printAnimBlends
get_lod = getLOD
disable_blend = disableBlend
show_part = showPart
get_joint_transform = getJointTransform
face_away_from_viewer = faceAwayFromViewer
set_lod = setLOD
osd_anim_blends = osdAnimBlends
get_current_frame = getCurrentFrame
set_play_rate = setPlayRate
bind_all_anims = bindAllAnims
unload_anims = unloadAnims
remove_part = removePart
use_lod = useLOD
get_anim_blends = getAnimBlends
get_lod_index = getLODIndex
get_num_frames = getNumFrames
post_flatten = postFlatten
get_lod_names = getLODNames
list_joints = listJoints
make_subpart = makeSubpart
get_anim_control = getAnimControl
get_part_bundle = getPartBundle
get_part_bundle_dict = getPartBundleDict
get_duration = getDuration
has_lod = hasLOD
print_lod = printLOD
fix_bounds_old = fixBounds_old
get_anim_names = getAnimNames
get_part_bundles = getPartBundles
anim_panel = animPanel
stop_joint = stopJoint
actor_interval = actorInterval
hide_all_bounds = hideAllBounds
show_all_bounds = showAllBounds
init_anims_on_all_lods = initAnimsOnAllLODs
get_part = getPart
add_lod = addLOD
show_all_parts = showAllParts
get_joints = getJoints
get_overlapping_joints = getOverlappingJoints
enable_blend = enableBlend
face_towards_viewer = faceTowardsViewer
bind_anim = bindAnim
set_blend = setBlend
get_frame_time = getFrameTime
remove_node = removeNode
wait_pending = waitPending
expose_joint = exposeJoint
set_lod_node = setLODNode
get_frame_rate = getFrameRate
get_current_anim = getCurrentAnim
get_part_names = getPartNames
freeze_joint = freezeJoint
set_center = setCenter
rename_part_bundles = renamePartBundles
get_geom_node = getGeomNode
set_geom_node = setGeomNode
load_model = loadModel
copy_actor = copyActor
get_base_frame_rate = getBaseFrameRate
remove_anim_control_dict = removeAnimControlDict
load_anims_on_all_lods = loadAnimsOnAllLODs
7 changes: 7 additions & 0 deletions direct/src/actor/__init__.py
@@ -0,0 +1,7 @@
"""
This package contains the :class:`.Actor` class as well as a
distributed variant thereof. Actor is a high-level interface around
the lower-level :class:`panda3d.core.Character` implementation.
It loads and controls an animated character and manages the animations
playing on it.
"""
13 changes: 13 additions & 0 deletions direct/src/controls/InputState.py
Expand Up @@ -21,6 +21,9 @@ def invalidate(self):
def __hash__(self): def __hash__(self):
return self._hash return self._hash


#snake_case alias:
is_valid = isValid

class InputStateWatchToken(InputStateToken, DirectObject.DirectObject): class InputStateWatchToken(InputStateToken, DirectObject.DirectObject):
def release(self): def release(self):
self._inputState._ignore(self) self._inputState._ignore(self)
Expand All @@ -39,6 +42,9 @@ def release(self):
token.release() token.release()
self._tokens = [] self._tokens = []


#snake_case alias:
add_token = addToken

class InputState(DirectObject.DirectObject): class InputState(DirectObject.DirectObject):
""" """
InputState is for tracking the on/off state of some events. InputState is for tracking the on/off state of some events.
Expand Down Expand Up @@ -235,3 +241,10 @@ def debugPrint(self, message):
"""for debugging""" """for debugging"""
return self.notify.debug( return self.notify.debug(
"%s (%s) %s"%(id(self), len(self._state), message)) "%s (%s) %s"%(id(self), len(self._state), message))

#snake_case alias:
watch_with_modifiers = watchWithModifiers
is_set = isSet
get_event_name = getEventName
debug_print = debugPrint
release_inputs = releaseInputs
4 changes: 4 additions & 0 deletions direct/src/controls/__init__.py
@@ -0,0 +1,4 @@
"""
This package contains various types of character controllers, handling basic
control mechanics and setting up collisions for them.
"""
17 changes: 16 additions & 1 deletion direct/src/directbase/DirectStart.py
@@ -1,4 +1,19 @@
""" This is a deprecated module that creates a global instance of ShowBase. """ """
This is a shortcut that instantiates ShowBase automatically on import,
opening a graphical window and setting up the scene graph.
This example demonstrates its use:
import direct.directbase.DirectStart
run()
While it may be considered useful for quick prototyping in the interactive
Python shell, using it in applications is not considered good style.
As such, it has been deprecated starting with Panda3D 1.9. It is equivalent
to and may be replaced by the following code:
from direct.showbase.ShowBase import ShowBase
base = ShowBase()
"""


__all__ = [] __all__ = []


Expand Down
12 changes: 12 additions & 0 deletions direct/src/directbase/__init__.py
@@ -0,0 +1,12 @@
"""
This package contains modules to quickly set up a Panda environment for
quick prototyping in the interactive Python shell. Merely importing
one of these modules will create a :class:`.ShowBase` instance, opening
a graphical window and setting up the scene graph.
The most commonly used module from this package is :mod:`.DirectStart`,
importing which executes the following code::
from direct.showbase.ShowBase import ShowBase
base = ShowBase()
"""

0 comments on commit d7f0f82

Please sign in to comment.