Sybren A. Stüvel 33512d42cf Multi-threaded compressed file transfers
For regular file transfers (so to a directory, not to a ZIP file or S3
storage), use multi-threaded transfer when compressing. Compressing is
CPU-bound, so using multiple threads speeds things up considerably
(packing a Spring lighting file went from 6min30 single-threaded to
2min13 multi-threaded on my machine).
2018-11-27 15:50:20 +01:00
2018-07-10 16:03:30 +02:00
2018-07-03 14:00:53 +02:00
2018-07-10 16:03:30 +02:00

Blender Asset Tracer BAT🦇

Script to manage assets with Blender.

Blender Asset Tracer, a.k.a. BAT🦇, is the replacement of BAM and blender-file

Development is driven by choices explained in T54125.

Uploading to S3-compatible storage

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.

[ENDPOINT]
aws_access_key_id = YOUR_ACCESS_KEY_ID
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, for example:

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 the jobs bucket.

Paths

There are two object types used to represent file paths. Those are strictly separated.

  1. bpathlib.BlendPath represents a path as stored in a blend file. It consists of bytes, and is blendfile-relative when it starts with //. It can represent any path from any OS Blender supports, and as such should be used carefully.
  2. pathlib.Path represents an actual path, possibly on the local filesystem of the computer running BAT. Any filesystem operation (such as checking whether it exists) must be done using a pathlib.Path.

When it is necessary to interpret a bpathlib.BlendPath as a real path instead of a sequence of bytes, BAT first attempts to decode it as UTF-8. If that fails, the local filesystem encoding is used. The latter is also no guarantee of correctness, though.

Type checking

The code statically type-checked with mypy.

Mypy likes to see the return type of __init__ methods explicitly declared as None. Until issue #604 is resolved, we just do this in our code too.

Description
Blender Asset Tracer can parse blend files and find their dependencies. (ADV fork)
Readme 66 MiB
1.21 Latest
2026-02-20 11:01:20 +01:00
Languages
Python 99.8%
Shell 0.2%