ZipPacker now captures the full BAT_DEBUG log stream into an in-memory
buffer for the lifetime of the pack and writes it as bat-debug.log inside
the produced zip, so archives are self-describing for post-mortem
debugging (which assets were found, where they were rewritten to, which
files were missing, etc.).
The capture forces the blender_asset_tracer logger to DEBUG only on a
dedicated handler, so terminal verbosity is unchanged. The log is flushed
into the closed zip via append mode in close(), which also covers
post-transfer messages and KeyboardInterrupt / FileTransferError paths.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cross-validation audit by Codex + Opus identified 14 issues:
CRITICAL:
- Fix _find_subdir_ci() prefix match accepting wrong folders (e.g.
Publish_old). Now uses exact case-insensitive match.
HIGH:
- Add pack-sequence CLI subcommand with unambiguous arg parsing.
Deprecate --sequence on pack (nargs='+' consumed the target).
- Fix Windows UNC/drive path normalization in bpathlib.make_absolute()
- Fix ZIP failure losing traceback + progress bar stuck on error
- Fix os.path.commonpath crash on cross-drive paths (new
derive_common_project helper)
- Fix progress bar saturating at 40% during trace (log scale)
MEDIUM:
- Add per-shot error isolation in sequence scan (collect all errors)
- Add memory warning for >50 files in sequence pack
- Improve pack-info.txt with dedup stats
- Wrap single Path in list for old operators (type consistency)
LOW/INFO:
- Document VERSION_RE pattern
- Add TASK_CHOICE_ITEMS empty guard
28 new tests in tests/test_sequence_pack.py, 0 regressions.
Co-Authored-By: Mario Hawat <mario@autourdeminuit.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add --sequence CLI flag to pack multiple blend files together with
shared dependency deduplication
- Add BAT_OT_sequence_pack Blender operator: scan a sequence folder for
latest published blend files, review with checkboxes, pack to ZIP
- Add studio template system (Autour de Minuit, La Cabane Productions)
with configurable folder conventions and task type selection
- Add BlenderProgressCallback for cursor progress indicator during pack
- Add ZIP write start/finish logging
- Deduplicate blend file paths in CLI when positional and --sequence overlap
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Guard DNA field accesses with has_field() checks for fields renamed or
removed across Blender versions (proxy, dup_group, texcomesh, nodetree,
etc.), fix mesh block pointer mismatch in path rewriting, fix mkrelative
IndexError when asset path is shorter than blend file path, and add
[BAT] console prints for tracing progress.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move operators and preferences out of __init__.py into dedicated modules.
Fix cyclic import by using proper AddonPreferences pattern. Replace
implicit .zip extension detection in CLI with explicit -z/--zip flag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Upgrade `zstandard` to `0.16`, because that is what's used in the oldest
still-supported Blender (4.2-LTS).
This also upgrades Pytest to 7.4.4 and Pytest-cov to 4.1.0. Still a
conservative upgrade, but at least it gets rid of various deprecation
warnings.
The oldest still-supported version of Blender is 4.2-LTS, which uses
Python 3.11, so that's what's now the required Python version for BAT.
Make the build system depend on `poetry-core` instead of `poetry`, to
make package builds faster (especially important when using Tox for
testing in various environments).
This also re-generates the `poetry.lock` file, so updates the
dependencies to their latest version compatible with the `project.toml`
file.
As addresses typically represented everywhere as hex values.
Before:
```
Biggest ARegion-DATA block is 304 B at address 1585888006560
Finding what points there
<BlendFileBlock.ScrArea (DATA), size=184 at 0x1713e4acd60> (b'regionbase', b'first')
<BlendFileBlock.ARegion (DATA), size=304 at 0x1713e4a9020> b'prev'
```
After:
```
Biggest ARegion-DATA block is 304 B at address 0x1713e4a91a0
Finding what points there
<BlendFileBlock.ScrArea (DATA), size=184 at 0x1713e4acd60> (b'regionbase', b'first')
<BlendFileBlock.ARegion (DATA), size=304 at 0x1713e4a9020> b'prev'
```
Reviewed-on: https://projects.blender.org/blender/blender-asset-tracer/pulls/92900
Extend `Struct.field_set()` so that the `path` type can be a
`dna.FieldPath`, to mirror `Struct.field_get`'s `path` type, and allow
users to set file-block's subproperties. For example this allows
setting `object_block[(b'id', 'name')]`.
Also, along the way, added a test for getting subproperty value.
Reviewed-on: https://projects.blender.org/blender/blender-asset-tracer/pulls/92899
Add an `array_index` parameter to `block.get(property_name)` to get a
specific item from an array.
Example:
```python
verts = self.bf.block_from_addr[verts_ptr]
assert verts.get(b"co") == [-1.0, -1.0, -1.0] # index 0
assert verts.get(b"co", array_index=1) == [-1.0, -1.0, 1.0]
```
Reviewed-on: https://projects.blender.org/blender/blender-asset-tracer/pulls/92898
Add support for geometry node simulation cache files.
This also adds support for dealing with dynamic arrays in Blender's
DNA, because `modifier.bakes` is a pointer to such an array.
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Reviewed-on: https://projects.blender.org/blender/blender-asset-tracer/pulls/92890
BlendFileBlock attributes:
Explicit annotation on BlendFileBlock are needed because otherwise
e.g. `block.add_old` type was imprecisely inferred from the
assignments as `int | Any`, where `Any` comes from `.unpack` returning
`tuple[Any, ...]`.
Ideally unpack should be somehow connected to the returned types, but
this solution should work for now just to avoid typing errors.
dna_io - add some missing annotations:
Some annotations were needed to ensure `block.code` will be inferred
as `bytes` and not `bytes | Unknown`.
Reviewed-on: https://projects.blender.org/blender/blender-asset-tracer/pulls/92897
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
There was an error running `twine check` (`KeyError: 'license'`) that was
fixed by upgrading to 5.0. This version was chosen as it's the one in
the current Ubuntu LTS release.
This is mostly the same as blender/blender!140195. The header parsing code has
been updated to be able to read old and new .blend file headers.
There is a new test file which is the same as the existing `basic_file.blend`,
but saved with the new header format. A new unit test has been added to check
that this file is read correctly as well.
Pull Request: https://projects.blender.org/blender/blender-asset-tracer/pulls/92893
Add support for the Dynamic Paint modifier point cache.
I added a walker to iterate through all surfaces on a canvas to get each surface's point cache.
Reviewed-on: https://projects.blender.org/blender/blender-asset-tracer/pulls/92889
Reviewed-by: Sybren A. Stüvel <sybren@blender.org>
Allows to use `python3 path/to/cli.py my args` just from source code,
without requiring to set up a whole venv for that. Much simpler when
only 'regular' debuging in code logic itself is needed.