Add Support for Geometry Node Cache #92890
42
README.md
42
README.md
@ -1,6 +1,10 @@
|
|||||||
# Blender Asset Tracer BAT🦇
|
# Blender Asset Tracer BAT🦇
|
||||||
|
|
||||||
Blender Asset Tracer, a.k.a. BAT🦇 is a script to manage assets with Blender.
|
Script to manage assets with Blender.
|
||||||
|
|
||||||
|
Blender Asset Tracer, a.k.a. BAT🦇, is the replacement of
|
||||||
|
[BAM](https://developer.blender.org/diffusion/BAM/) and
|
||||||
|
[blender-file](https://developer.blender.org/source/blender-file/)
|
||||||
|
|
||||||
Development is driven by choices explained in [T54125](https://developer.blender.org/T54125).
|
Development is driven by choices explained in [T54125](https://developer.blender.org/T54125).
|
||||||
|
|
||||||
@ -9,28 +13,18 @@ Development is driven by choices explained in [T54125](https://developer.blender
|
|||||||
The `cli.py` wrapper at the root of the project can be used to directly access the command line
|
The `cli.py` wrapper at the root of the project can be used to directly access the command line
|
||||||
tools, without requiring any setup involving `venv` and so on:
|
tools, without requiring any setup involving `venv` and so on:
|
||||||
|
|
||||||
```bash
|
```
|
||||||
python3 path/to/repo/cli.py list path/to/blendfile.blend
|
python3 path/to/repo/cli.py list path/to/blendfile.blend
|
||||||
```
|
```
|
||||||
|
|
||||||
## Setting up development environment
|
## Setting up development environment
|
||||||
|
|
||||||
```bash
|
```
|
||||||
python3.9 -m venv .venv
|
python3.9 -m venv .venv
|
||||||
```
|
|
||||||
```bash
|
|
||||||
. ./.venv/bin/activate
|
. ./.venv/bin/activate
|
||||||
```
|
|
||||||
```bash
|
|
||||||
pip install -U pip
|
pip install -U pip
|
||||||
```
|
|
||||||
```bash
|
|
||||||
pip install poetry black
|
pip install poetry black
|
||||||
```
|
|
||||||
```bash
|
|
||||||
poetry install
|
poetry install
|
||||||
```
|
|
||||||
```bash
|
|
||||||
mypy --install-types
|
mypy --install-types
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -40,18 +34,14 @@ mypy --install-types
|
|||||||
BAT Pack supports uploading to S3-compatible storage. This requires a credentials file in
|
BAT Pack supports uploading to S3-compatible storage. This requires a credentials file in
|
||||||
`~/.aws/credentials`. Replace the all-capital words to suit your situation.
|
`~/.aws/credentials`. Replace the all-capital words to suit your situation.
|
||||||
|
|
||||||
```ini
|
|
||||||
[ENDPOINT]
|
[ENDPOINT]
|
||||||
aws_access_key_id = YOUR_ACCESS_KEY_ID
|
aws_access_key_id = YOUR_ACCESS_KEY_ID
|
||||||
aws_secret_access_key = YOUR_SECRET
|
aws_secret_access_key = YOUR_SECRET
|
||||||
```
|
|
||||||
|
|
||||||
You can then send a BAT Pack to the storage using a target `s3:/ENDPOINT/bucketname/path-in-bucket`,
|
You can then send a BAT Pack to the storage using a target `s3:/ENDPOINT/bucketname/path-in-bucket`,
|
||||||
for example:
|
for example:
|
||||||
|
|
||||||
```bash
|
|
||||||
bat pack my_blendfile.blend s3:/storage.service.cloud/jobs/awesome_work
|
bat pack my_blendfile.blend s3:/storage.service.cloud/jobs/awesome_work
|
||||||
```
|
|
||||||
|
|
||||||
This will upload the blend file and its dependencies to `awesome_work/my_blendfile.blend` in
|
This will upload the blend file and its dependencies to `awesome_work/my_blendfile.blend` in
|
||||||
the `jobs` bucket.
|
the `jobs` bucket.
|
||||||
@ -86,7 +76,6 @@ Mypy likes to see the return type of `__init__` methods explicitly declared as `
|
|||||||
BAT can be used as a Python library to inspect the contents of blend files, without having to
|
BAT can be used as a Python library to inspect the contents of blend files, without having to
|
||||||
open Blender itself. Here is an example showing how to determine the render engine used:
|
open Blender itself. Here is an example showing how to determine the render engine used:
|
||||||
|
|
||||||
```python
|
|
||||||
#!/usr/bin/env python3.7
|
#!/usr/bin/env python3.7
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
@ -130,7 +119,6 @@ render_info = {
|
|||||||
|
|
||||||
json.dump(render_info, sys.stdout, indent=4, sort_keys=True)
|
json.dump(render_info, sys.stdout, indent=4, sort_keys=True)
|
||||||
print()
|
print()
|
||||||
```
|
|
||||||
|
|
||||||
To understand the naming of the properties, look at Blender's `DNA_xxxx.h` files with struct
|
To understand the naming of the properties, look at Blender's `DNA_xxxx.h` files with struct
|
||||||
definitions. It is those names that are accessed via `blender_asset_tracer.blendfile`. The
|
definitions. It is those names that are accessed via `blender_asset_tracer.blendfile`. The
|
||||||
@ -167,9 +155,10 @@ As password, use the token itself, including the `pypi-` prefix.
|
|||||||
See https://pypi.org/help/#apitoken for help using API tokens to publish. This
|
See https://pypi.org/help/#apitoken for help using API tokens to publish. This
|
||||||
is what I have in `~/.pypirc`:
|
is what I have in `~/.pypirc`:
|
||||||
|
|
||||||
```ini
|
```
|
||||||
[distutils]
|
[distutils]
|
||||||
index-servers = bat
|
index-servers =
|
||||||
|
bat
|
||||||
|
|
||||||
# Use `twine upload -r bat` to upload with this token.
|
# Use `twine upload -r bat` to upload with this token.
|
||||||
[bat]
|
[bat]
|
||||||
@ -178,18 +167,11 @@ username = __token__
|
|||||||
password = pypi-abc-123-blablabla
|
password = pypi-abc-123-blablabla
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```
|
||||||
. ./.venv/bin/activate
|
. ./.venv/bin/activate
|
||||||
```
|
|
||||||
```bash
|
|
||||||
pip install twine
|
pip install twine
|
||||||
```
|
|
||||||
```bash
|
|
||||||
poetry build
|
poetry build
|
||||||
```
|
|
||||||
```bash
|
|
||||||
twine check dist/blender_asset_tracer-1.18.tar.gz dist/blender_asset_tracer-1.18-*.whl
|
twine check dist/blender_asset_tracer-1.18.tar.gz dist/blender_asset_tracer-1.18-*.whl
|
||||||
```
|
|
||||||
```bash
|
|
||||||
twine upload -r bat dist/blender_asset_tracer-1.18.tar.gz dist/blender_asset_tracer-1.18-*.whl
|
twine upload -r bat dist/blender_asset_tracer-1.18.tar.gz dist/blender_asset_tracer-1.18-*.whl
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user