pman is a Python package to help bootstrap and manage Panda3D applications.
Use pip to install the
pip install panda3d-pman
Quick start a project with
If you already have a directory for your project:
pman create .
pman can also create the directory for you:
pman create my_awesome_project
In addition to the
pman has the following commands:
pythonwith the main file
python setup.py test)
pman will look for any of the following files in the project root:
This configuration uses TOML for markup.
pyproject.toml configuration file is project-wide and should be checked in under version control.
Another, per-user configuration file also exists at the project root as
This configuration file stores user settings and should not be checked into version control.
.pman.user take precedence over settings in
.pman and both take precedence over
If a setting is not defined in a config file, a default value will be used.
When storing settings in
pyproject.toml, section names should be pre-pended with
general options would be under
"Game"|The project name. For now this is only used for naming the built application in the default
["DefaultPlugins"]|A list of plugins to load and use.
"DefaultPlugins" is expanded to the current default plugins, which makes it easier to enable additional plugins.|
"assets/"|The directory to look for assets to convert.|
".built_assets/"|The directory to store built assets.|
|A case-insensitive list of patterns. Files matching any of these patterns will not be ignored during the build step. Pattern matching is done using the fnmatch module
"main.py"|The entry-point to the application.|
""|A string of extra arugments that are append to the invocation of
true, automatically run builds as part of running the application (via
pman.shim.init). This is disabled in deployed applications.|
true|Whether or not to build installers for built applications (i.e., run
To extend functionality, pman offers a plugin system. These plugins are found by pman using entry points.
By default, pman loads the following plugins:
When specifying plugins, a special
DefaultPlugins string is available that expands to pman's current default plugins.
For example, to use
MyAwesomePlugin in addition to pman's default plugins use:
plugins = ['DefaultPlugins', 'MyAwesomePlugin']
Below are plugins that ship with pman and their options.
Support file formats:
Loads the file into Panda and saves the result out to BAM. This relies on Panda's builtin file loading capabilities.
Supported file formats:
Converts Blender files to BAM files via blend2bam.
"pbr"|Specify whether to use the default Panda materials ("legacy") or Panda's new PBR material attributes ("pbr"). This is only used by the "gltf" pipeline; the "egg" always uses "legacy".|
"builtin"|The physics engine that collision solids should be built for. To export for Panda's builtin collision system, use "builtin." For Bullet, use "bullet." This is only used by the "gltf" pipeline; the "egg" pipeline always uses "builtin."|
"gltf"|The backend that blend2bam uses to convert blend files. Go here for more information.|
First install the project in editable mode along with
pip install -e .[test]
Then run the test suite with
pip install --upgrade build
python -m build
Edit: I am currently reworking this as I have realized this relies on a dist-info present in the working directory, which is not the wanted behaviour at all !
This small change allow to have custom converters in a given project. It is more like a proof of concept and should probably be reworked/cleaned up. Project plugins should be located in a "plugins" directory.
Current limitations: * the plugin class name must be the same name as the file, but starting with a capital letter ; * plugins can only be located in the plugins subdirectory, and nested subdirs are not yet possible ;
Some use-cases: * Have a tool to create NPC (both mesh and in-game properties, or even scripts) and export them automatically ; * Mesh generation based on parametric files ; * Conversion of table-based data (for instance an ODS table listing all the items or monsters) to a more game-friendly format (XML, json, SQLite...) * ...
When deleting (or moving, renaming) an asset, the built file remains in the built assets directory. This takes up extra space, but also hides errors when I forget to change the path in a loadModel call in my code.
A quick grep through the source code shows that creating a gitignore automatically is possible, but I can't find anywhere in the documentation explaining how to do this. I think this should be a very common need.
pman run should allow for arguments to be passed to the application, e.g.:
pman run -- app_arg invokes
Also need to default to appending '.bam' instead of replacing the extension
This release includes quite a few potentially breaking changes
python -m pman
.pmanconfig file after every call to `pman
.pman.userdoes not exist
blend2bamis no longer option to make installation more straight-forward
__py_cache__/**in setup.py (this is handled by
panda3d panda3d-game-engine game-development gamedev gamedev-tool