panda3d-pman


Namepanda3d-pman JSON
Version 0.16.0 PyPI version JSON
download
home_page
SummaryA Python package to help bootstrap and manage Panda3D applications
upload_time2023-10-30 18:56:48
maintainer
docs_urlNone
authorMitchell Stokes
requires_python>=3.8
licenseMIT
keywords panda3d gamedev
VCS
bugtrack_url
requirements panda3d-blend2bam
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Build Status](https://github.com/Moguri/panda3d-pman/workflows/Pipeline/badge.svg)
[![](https://img.shields.io/github/license/Moguri/pman.svg)](https://choosealicense.com/licenses/mit/)


# Panda3D Manager
pman is a Python package to help bootstrap and manage [Panda3D](https://github.com/panda3d/panda3d) applications.

## Features

* Project quick-start
* Automatic asset conversion
* Automatically adds export directory to the model path
* Convenient CLI for running and testing applications
* Plugin system for expanding functionality

## Installation

Use [pip](https://github.com/panda3d/panda3d) to install the `panda3d-pman` package:

```bash
pip install panda3d-pman
```

## Usage

Quick start a project with `pman create`.
If you already have a directory for your project:

```bash
cd my_awesome_project
pman create .
```

`pman` can also create the directory for you:

```bash
pman create my_awesome_project
```

In addition to the `create` command, `pman` has the following commands:

* update - re-run project creation logic on the project directory
* help - display usage information
* build - convert all files in the assets directory and place them in the export directory
* run - run the application by calling `python` with the main file
* test - run tests (shortcut for `python setup.py test`)
* dist - create distributable forms of Panda3D applications (requires Panda3D 1.10+)
* clean - remove built files

## Configuration

`pman` will look for any of the following files in the project root:
* pyproject.toml
* .pman
* .pman.user

This configuration uses [TOML](https://github.com/toml-lang/toml) for markup.
The `.pman` or `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 `.pman.user`.
This configuration file stores user settings and should *not* be checked into version control. 

Settings in `.pman.user` take precedence over settings in `.pman` and both take precedence over `pyproject.toml`.
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 `tool.pman.`.
For example, `general` options would be under `tool.pman.general`.

### General Options
Section name: `general`

|option|default|description|
|---|---|---|
|name|`"Game"`|The project name. For now this is only used for naming the built application in the default `setup.py`.|
|plugins|`["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.|

### Build Options
Section name: `build`

|option|default|description|
|---|---|---|
|asset_dir|`"assets/"`|The directory to look for assets to convert.|
|export_dir|`".built_assets/"`|The directory to store built assets.|
|ignore_patterns|`[]`|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](https://docs.python.org/3/library/fnmatch.html)

### Run Options
Section name: `run`

|option|default|description|
|---|---|---|
|main_file|`"main.py"`|The entry-point to the application.|
|extra_args|`""`|A string of extra arugments that are append to the invocation of `main_file`.|
|auto_build|`true`|If `true`, automatically run builds as part of running the application (via `pman.shim.init`). This is disabled in deployed applications.|

### Distribution Options
Section name: `dist`

|option|default|description|
|---|---|---|
|build_installers|`true`|Whether or not to build installers for built applications (i.e., run `bdist_apps`).|

## Plugins

To extend functionality, pman offers a plugin system.
These plugins are found by pman using [entry points](https://packaging.python.org/specifications/entry-points/).

### Default Plugins

By default, pman loads the following plugins:

* native2bam
* blend2bam

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:

```toml
[General]
plugins = ['DefaultPlugins', 'MyAwesomePlugin']
```

### Built-in Plugins

Below are plugins that ship with pman and their options.

#### native2bam
Support file formats: `egg`, `egg.pz`, `obj` (and `mtl`), `fbx`, `dae`, `ply`

Loads the file into Panda and saves the result out to BAM. This relies on Panda's builtin file loading capabilities.

##### Options
None

#### blend2bam
Supported file formats: `blend`

Converts Blender files to BAM files via [blend2bam](https://github.com/Moguri/blend2bam).

##### Options
Section name: `blend2bam`

|option|default|description|
|---|---|---|
|material_mode|`"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".|
|physics_engine|`"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."|
|pipeline|`"gltf"`|The backend that blend2bam uses to convert blend files. Go [here](https://github.com/Moguri/blend2bam#pipelines) for more information.|

## Running Tests

First install the project in editable mode along with `test` extras:

```bash
pip install -e .[test]
```

Then run the test suite with `pytest`:

```bash
pytest
```

## Building Wheels

Install `build`:

```bash
pip install --upgrade build
```

and run:

```bash
python -m build
```
## License

[MIT](https://choosealicense.com/licenses/mit/)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "panda3d-pman",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "panda3d,gamedev",
    "author": "Mitchell Stokes",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/c5/0a/85016a04b31515f85c4e64fa57b2562315b64352080ef805d1f1f1c2794b/panda3d-pman-0.16.0.tar.gz",
    "platform": null,
    "description": "![Build Status](https://github.com/Moguri/panda3d-pman/workflows/Pipeline/badge.svg)\n[![](https://img.shields.io/github/license/Moguri/pman.svg)](https://choosealicense.com/licenses/mit/)\n\n\n# Panda3D Manager\npman is a Python package to help bootstrap and manage [Panda3D](https://github.com/panda3d/panda3d) applications.\n\n## Features\n\n* Project quick-start\n* Automatic asset conversion\n* Automatically adds export directory to the model path\n* Convenient CLI for running and testing applications\n* Plugin system for expanding functionality\n\n## Installation\n\nUse [pip](https://github.com/panda3d/panda3d) to install the `panda3d-pman` package:\n\n```bash\npip install panda3d-pman\n```\n\n## Usage\n\nQuick start a project with `pman create`.\nIf you already have a directory for your project:\n\n```bash\ncd my_awesome_project\npman create .\n```\n\n`pman` can also create the directory for you:\n\n```bash\npman create my_awesome_project\n```\n\nIn addition to the `create` command, `pman` has the following commands:\n\n* update - re-run project creation logic on the project directory\n* help - display usage information\n* build - convert all files in the assets directory and place them in the export directory\n* run - run the application by calling `python` with the main file\n* test - run tests (shortcut for `python setup.py test`)\n* dist - create distributable forms of Panda3D applications (requires Panda3D 1.10+)\n* clean - remove built files\n\n## Configuration\n\n`pman` will look for any of the following files in the project root:\n* pyproject.toml\n* .pman\n* .pman.user\n\nThis configuration uses [TOML](https://github.com/toml-lang/toml) for markup.\nThe `.pman` or `pyproject.toml` configuration file is project-wide and should be checked in under version control.\n\nAnother, per-user configuration file also exists at the project root as `.pman.user`.\nThis configuration file stores user settings and should *not* be checked into version control. \n\nSettings in `.pman.user` take precedence over settings in `.pman` and both take precedence over `pyproject.toml`.\nIf a setting is not defined in a config file, a default value will be used.\n\nWhen storing settings in `pyproject.toml`, section names should be pre-pended with `tool.pman.`.\nFor example, `general` options would be under `tool.pman.general`.\n\n### General Options\nSection name: `general`\n\n|option|default|description|\n|---|---|---|\n|name|`\"Game\"`|The project name. For now this is only used for naming the built application in the default `setup.py`.|\n|plugins|`[\"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.|\n\n### Build Options\nSection name: `build`\n\n|option|default|description|\n|---|---|---|\n|asset_dir|`\"assets/\"`|The directory to look for assets to convert.|\n|export_dir|`\".built_assets/\"`|The directory to store built assets.|\n|ignore_patterns|`[]`|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](https://docs.python.org/3/library/fnmatch.html)\n\n### Run Options\nSection name: `run`\n\n|option|default|description|\n|---|---|---|\n|main_file|`\"main.py\"`|The entry-point to the application.|\n|extra_args|`\"\"`|A string of extra arugments that are append to the invocation of `main_file`.|\n|auto_build|`true`|If `true`, automatically run builds as part of running the application (via `pman.shim.init`). This is disabled in deployed applications.|\n\n### Distribution Options\nSection name: `dist`\n\n|option|default|description|\n|---|---|---|\n|build_installers|`true`|Whether or not to build installers for built applications (i.e., run `bdist_apps`).|\n\n## Plugins\n\nTo extend functionality, pman offers a plugin system.\nThese plugins are found by pman using [entry points](https://packaging.python.org/specifications/entry-points/).\n\n### Default Plugins\n\nBy default, pman loads the following plugins:\n\n* native2bam\n* blend2bam\n\nWhen specifying plugins, a special `DefaultPlugins` string is available that expands to pman's current default plugins.\nFor example, to use `MyAwesomePlugin` in addition to pman's default plugins use:\n\n```toml\n[General]\nplugins = ['DefaultPlugins', 'MyAwesomePlugin']\n```\n\n### Built-in Plugins\n\nBelow are plugins that ship with pman and their options.\n\n#### native2bam\nSupport file formats: `egg`, `egg.pz`, `obj` (and `mtl`), `fbx`, `dae`, `ply`\n\nLoads the file into Panda and saves the result out to BAM. This relies on Panda's builtin file loading capabilities.\n\n##### Options\nNone\n\n#### blend2bam\nSupported file formats: `blend`\n\nConverts Blender files to BAM files via [blend2bam](https://github.com/Moguri/blend2bam).\n\n##### Options\nSection name: `blend2bam`\n\n|option|default|description|\n|---|---|---|\n|material_mode|`\"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\".|\n|physics_engine|`\"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.\"|\n|pipeline|`\"gltf\"`|The backend that blend2bam uses to convert blend files. Go [here](https://github.com/Moguri/blend2bam#pipelines) for more information.|\n\n## Running Tests\n\nFirst install the project in editable mode along with `test` extras:\n\n```bash\npip install -e .[test]\n```\n\nThen run the test suite with `pytest`:\n\n```bash\npytest\n```\n\n## Building Wheels\n\nInstall `build`:\n\n```bash\npip install --upgrade build\n```\n\nand run:\n\n```bash\npython -m build\n```\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package to help bootstrap and manage Panda3D applications",
    "version": "0.16.0",
    "project_urls": {
        "homepage": "https://github.com/Moguri/pman"
    },
    "split_keywords": [
        "panda3d",
        "gamedev"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3c11c1013eda4089e7ef38fdbd94cb515709abd9adf8312ea68f829b5d5f721",
                "md5": "96c6f703d07b93b03586c08af309c01b",
                "sha256": "1c3f8a6d33a29ddd40f0574227226f3c1cac536f724515e965206f01f83c0e77"
            },
            "downloads": -1,
            "filename": "panda3d_pman-0.16.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "96c6f703d07b93b03586c08af309c01b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 20282,
            "upload_time": "2023-10-30T18:56:47",
            "upload_time_iso_8601": "2023-10-30T18:56:47.094306Z",
            "url": "https://files.pythonhosted.org/packages/e3/c1/1c1013eda4089e7ef38fdbd94cb515709abd9adf8312ea68f829b5d5f721/panda3d_pman-0.16.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c50a85016a04b31515f85c4e64fa57b2562315b64352080ef805d1f1f1c2794b",
                "md5": "ad7b6ec1e8e68ec550697d03afb1c442",
                "sha256": "e436684e0a8921b31d35f01e765363a7b78029c48eb8bad8327f4ba6e6e0142e"
            },
            "downloads": -1,
            "filename": "panda3d-pman-0.16.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ad7b6ec1e8e68ec550697d03afb1c442",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 16286,
            "upload_time": "2023-10-30T18:56:48",
            "upload_time_iso_8601": "2023-10-30T18:56:48.675273Z",
            "url": "https://files.pythonhosted.org/packages/c5/0a/85016a04b31515f85c4e64fa57b2562315b64352080ef805d1f1f1c2794b/panda3d-pman-0.16.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-30 18:56:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Moguri",
    "github_project": "pman",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "panda3d-blend2bam",
            "specs": []
        }
    ],
    "lcname": "panda3d-pman"
}
        
Elapsed time: 0.39531s