Commit Graph
96 Commits
Author SHA1 Message Date
Sybren A. Stüvel 12ce4bfc6d pyproject.toml: modernize use of deprecated tool.poetry.dev-dependencies
Use `[tool.poetry.group.dev.dependencies]` instead of the deprecated
`[tool.poetry.dev-dependencies]` section.
2025-06-16 11:24:13 +02:00
Sybren A. Stüvel eb69ca5632 Add EndianIO.parse_pointer function
This is to parse in-memory pointer data bytes into an actual pointer value.
2025-01-24 15:34:46 +01:00
Sybren A. Stüvel f2e28edc05 Implement reader & writer for int8_t type 2024-09-02 18:20:51 +02:00
Sybren A. Stüvel e3d3d988b7 Re-lock package dependencies
Re-ran `poetry lock` to regenerate the `poetry.lock` file.
2024-09-02 18:20:51 +02:00
Sybren A. Stüvel 073bc8140a Update CHANGELOG 2024-09-02 18:20:51 +02:00
Sybren A. Stüvel 42dd5ec1b6 Bumped version to 1.18 2024-01-11 16:43:11 +01:00
Sybren A. Stüvel 77778f1895 Mark v1.18 as released today 2024-01-11 16:39:27 +01:00
Sybren A. Stüvel 15f00e6c92 Add support for reading uchar aka uint8_t 2024-01-08 17:08:13 +01:00
Sybren A. Stüvel 937ecfdece Update CHANGELOG 2023-12-18 17:59:37 +01:00
Sybren A. Stüvel 98892151ed Bumped version to 1.18-dev0 2023-12-18 17:58:30 +01:00
Sybren A. Stüvel 47e7c00845 Bumped version to 1.17 2023-12-14 11:54:30 +01:00
Sybren A. Stüvel 1abb8e5650 Mark 1.17 as released today 2023-12-14 11:54:21 +01:00
Sybren A. Stüvel 61dc5b8a23 Fix issue packing lamps with non-IES 'storage'
Lamp/light nodes might have a `storage` property that might point to an
IES texture node (which has the expected `filepath`), but not always.
The latter now no longer crashes BAT.

This fixes https://projects.blender.org/blender/blender-asset-tracer/pulls/92883
2023-12-14 11:36:55 +01:00
Sybren A. Stüvel 81ea8296da Bump version to 1.17-dev0 2023-12-14 11:36:34 +01:00
Sybren A. Stüvel 2a9bdc5206 Mark 1.16 as released today 2023-11-02 15:47:35 +01:00
Sybren A. Stüvel c4ff3fdb54 Bumped version to 1.16 2023-11-02 15:46:01 +01:00
Sybren A. Stüvel 29c0ba14b1 CHANGELOG: add Python version changes
Document drop of support for 3.7.

Also I forgot to mention that v1.15 added support for Python 3.11.
2023-11-02 15:07:17 +01:00
Sybren A. Stüvel e2b2e6fb68 Drop support for Python 3.7
Python 3.7 is EOL, no longer supported.
2023-11-02 15:05:31 +01:00
Sybren A. Stüvel 36c258985e Cleanup: formatting change of pyproject.toml
No functional changes.
2023-11-02 15:05:16 +01:00
Sybren A. Stüvel ef5b83feda CHANGELOG: update for new tracing behaviour of directory assets 2023-11-02 15:01:05 +01:00
Sybren A. Stüvel 606377180c Pack: always pack files, explode directories to a list of files
When an asset is represented as directory in Blender (for example fluid
simulation caches), that directory is traced and each file is considered
an asset.

This makes it considerably easier for Shaman clients, as they need to
compute the SHA256 checksum of each file. The logic to transform a
directory path to a list of the contained files is now in BAT itself.
2023-11-02 14:53:52 +01:00
Sybren A. Stüvel f9bc6f2d08 Cleanup: fix mypy errors
This mostly handles a mypy change where implicit optionals (i.e. things
like `size: int = None`) are no longer allowed.

No functional changes.
2023-11-02 14:46:38 +01:00
Sybren A. Stüvel b3fb7845c3 Cleanup: Reformat with black
No functional changes.
2023-11-02 14:40:27 +01:00
Sybren A. Stüvel 055457ab67 Add BlendFileBlock.raw_data() and .as_string() functions
Add functions to interpret the data in a `BlendFileBlock` as either `bytes`
or `string`. This is used to obtain the contents of a `char*` (instead
of an embedded `char[N]` array).
2023-05-16 16:01:38 +02:00
Sybren A. Stüvel d2b353d1bf README: fix copy-paste error 2022-12-16 15:26:26 +01:00
Sybren A. Stüvel 9641ea1b58 Adjust filenames for newer Poetry
Newer Poetry versions seem to write sources to
`blender_asset_tracer-1.15.tar.gz`, i.e. with underscores in the name,
just like the wheel file.
2022-12-16 15:25:19 +01:00
Sybren A. Stüvel 64d657ead2 Poetry: include a readme setting
This should include the contents of `README.md` in the package & show it
on the Python package index.
2022-12-16 15:22:27 +01:00
Sybren A. Stüvel 54456e0c35 Also test on Python 3.11 2022-12-16 15:14:09 +01:00
Sybren A. Stüvel e6669887ce Update all dependencies to their latest versions 2022-12-16 15:08:59 +01:00
Sybren A. Stüvel aba2b673f1 Change my email address
Change the email address to my work address.
2022-12-16 15:01:38 +01:00
Sybren A. Stüvel ce19808f5c Bumped version to 1.15 2022-12-16 15:00:43 +01:00
Sybren A. Stüvel 8f933ef862 Mark 1.15 as released today 2022-12-16 15:00:31 +01:00
Sybren A. Stüvel 517e8eee23 Bumped version to 1.15-dev0 2022-12-16 14:49:56 +01:00
Sybren A. Stüvel 1e8c924990 Add support for fluid simulation caches
Add `eModifierType_Fluid` support, with non-pointcache caches. The entire
cache directory is considered a dependency to list/pack.
2022-12-16 14:49:36 +01:00
Sybren A. Stüvel 1541c52520 Version bump to 1.14
This was actually released in 2022-09-12, but I forgot to commit!
2022-12-02 13:11:37 +01:00
Sybren A. Stüvel 79193a60cd CHANGELOG: mark 1.14 as released today 2022-09-12 15:28:04 +02:00
Sybren A. Stüvel 330b179a44 README: add new instructions on building & publishing
PyPi requires an API token nowadays, for uploading packages. The README
now includes instructions on how to set those up & use them.
2022-09-12 15:28:04 +02:00
Sybren A. Stüvel 3bcb9bab0e Publish packages with Twine
Twine is the preferred way to publish Python packages nowadays.
2022-09-12 15:27:51 +02:00
Sybren A. Stüvel 051cab877c Poetry: update dependencies 2022-09-12 15:06:08 +02:00
Sybren A. Stüvel cc4043969e Change when the trace_blendfile() callback is called
Previously the `callback.trace_blendfile()` callback was called just before
tracing its dependencies would start, i.e. after opening it. This is now
changed to before opening it, because that can take a long time (to load
SDNA). this will make any UI (like the Flamenco add-on) report the right
filename when waiting for big files, instead of lingering on the
last-opened (potentially very small) blend file.
2022-09-12 15:06:08 +02:00
Sybren A. Stüvel bef5fb88cd Bumped version to 1.13 2022-07-14 10:40:39 +02:00
Sybren A. Stüvel 32e993fbb5 Update CHANGELOG.md 2022-07-14 10:40:36 +02:00
Sybren A. Stüvel 0e5d926e7a Better error message for an assertion
In some unexpected situations BAT would just show that the
`bfile_pp is not None` assertion failed. Now it also shows which file is
the one causing this issue, aiding in debugging the situation.
2022-07-14 10:06:20 +02:00
Sybren A. Stüvel 2aaf0896ba Support Python 3.10 2022-03-25 12:13:19 +01:00
Sybren A. Stüvel 63c4745e9f Cleanup: reformat with Black 2022-03-25 12:07:06 +01:00
Sybren A. Stüvel 3daeb9f80a Bump versions of dependencies
Most importantly, update MyPy so it supports Python 3.10 (which is used
in Blender 3.1, the latest release at this moment).
2022-03-25 12:07:06 +01:00
Sybren A. Stüvel cd6732a407 Bump required Python to 3.7 for MyPy 2022-03-25 12:07:06 +01:00
Sybren A. Stüvel 973bf741c7 Cleanup: add a comment to explain EndianIO::accepted_types
No functional changes.
2022-03-25 12:07:06 +01:00
Sybren A. Stüvel c29774a234 Bumped version to 1.12 2022-03-25 11:55:41 +01:00
Sybren A. Stüvel 8f86379ea6 Changelog: mark 1.12 as released today 2022-03-25 11:55:33 +01:00
Sybren A. Stüvel d778849c89 Add note about not supporting Shaman API of Flamenco 3.x
Decided to *not* support the Shaman API of Flamenco 3.x in BAT. The
support for that protocol will be implemented in the Flamenco 3.x add-on
for Blender, and not in BAT itself.

A future version of BAT will remove the Shaman API support altogether.
2022-03-25 11:55:30 +01:00
Sybren A. Stüvel fab2090080 Bump version to 1.12-dev0 2022-03-11 17:28:46 +01:00
Sybren A. Stüvel cd3f9ce671 Avoid late (non-top-level) imports
Avoiding late imports helps to isolate Blender add-ons bundling BAT from
each other.

There was one late/lazy import to avoid a dependency cycle. This was
solved by simply copying that one tiny function.
2022-03-11 17:03:08 +01:00
Sybren A. Stüvel 4899766943 Bumped version to 1.11 2022-02-18 16:12:41 +01:00
Sybren A. Stüvel 843c34c3c0 Support UDIM images 2022-02-18 16:12:41 +01:00
Sybren A. Stüvel 4ebd535b5f Add missing test blend file 2022-02-04 10:48:49 +01:00
Sybren A. Stüvel 301e73d64a Bumped version to 1.10 2022-02-03 17:54:07 +01:00
Sybren A. Stüvel e5c7e38b44 Avoid doubly-compressing zstandard files 2022-02-03 17:54:03 +01:00
Sybren A. Stüvel 2bf155a5f9 Update pytest for Python 3.10 compatibility 2022-02-03 17:48:41 +01:00
Sybren A. Stüvel 7e61163364 Bumped version to 1.9 2021-11-19 13:59:02 +01:00
Sybren A. Stüvel 086c795306 Mark 1.9 as released today 2021-11-19 13:58:55 +01:00
Sybren A. Stüvel 7dead42c43 Add bat version command to print BAT version
`bat --help` also prints the version, but it's nice to have an explicit
command for this that only prints the version and nothing else.
2021-11-19 13:57:48 +01:00
Sybren A. Stüvel 744609b2f0 Bumped version to 1.8 2021-11-09 11:17:02 +01:00
Sybren A. Stüvel 42800f6c84 Update CHANGELOG.md 2021-11-09 11:16:52 +01:00
Sybren A. Stüvel 2843cce6fd Bumped version to 1.7 2021-11-05 16:30:17 +01:00
Sybren A. Stüvel 3acf467162 Mark v1.7 as released 2021-11-05 16:29:32 +01:00
Sybren A. Stüvel c61d5ee7ab Skip ZStandard tests if the module is not installed 2021-10-05 18:34:44 +02:00
Sybren A. Stüvel 8a06bf5903 Add optional support for ZStandard compression
BAT now can take advantage of the `zstandard` module to handle Blender
3.0+ compressed blend files.

If the module is not installed, the blend files cannot be opened but
GZip-compressed and uncompressed files can still be handled.
2021-10-05 18:24:44 +02:00
Sybren A. Stüvel 3d8c608da3 Bumped version to 1.7b0 2021-07-27 17:09:16 +02:00
Sybren A. Stüvel 2cedf2b424 Bumped version to 1.6 2021-07-27 17:06:13 +02:00
Sybren A. Stüvel 4a1840f51c Remove code that's both bad and unnecessary
The library link will be picked up anyway, and not all datablocks have
a "lib" property.
2021-07-27 16:59:28 +02:00
Sybren A. Stüvel 7de29740cc Add types-requests as dev-time dependency
This is required for newer mypy.
2021-07-27 16:42:25 +02:00
Sybren A. Stüvel 24c0206e89 Support datablocks used as default values in nodes
Follow pointers of input sockets of nodes that can reference ID datablocks.
2021-07-27 16:42:25 +02:00
Sybren A. Stüvel 0bd18594f6 Support linked collections used as input in a Geometry Nodes modifier
Add support for linked collections that are used as input in a Geometry
Nodes modifier. This requires iterating over the geometry nodes modifier
settings, which consists of ID properties. If such an ID property is of
type `IDP_ID`, its pointer is followed and the pointed-to datablock +
its library are visited.

This following of pointers happens in the 'expand' phase, which was only
done for linked library blend files. Since this commit, the old
behaviour of simply looping over all non-`DATA` datablocks of the
to-be-packed blend file is not enough, and datablock expansion is done
for all local datablocks as well.
2021-07-27 16:42:25 +02:00
Sybren A. Stüvel 932283be65 Warn when expander yields blocks that are known to be ignored
This is just a debugging tool, if this warning occurs it's an indication
of a bug in BAT.
2021-07-27 16:42:25 +02:00
Sybren A. Stüvel 74ae76cd73 Bumped version to 1.6b1 2021-07-27 16:42:25 +02:00
Sybren A. Stüvel 97b1a4d922 Drop support for Python 3.5 and 3.6, add support for 3.8 and 3.9
Python 3.5 is EOL already, and Blender never used version 3.6 (it went
straight to 3.7), hence 3.6 was never tested explicitly.

Python 3.7 or newer is required from now on.
2021-07-22 12:03:27 +02:00
Sybren A. Stüvel 4e51b82e4c Bumped version to 1.5b0 2021-07-22 12:03:27 +02:00
Sybren A. Stüvel 113db18211 Bumped version to 1.4.1 2021-07-22 11:40:15 +02:00
Sybren A. Stüvel 70a56d45b9 Document rollback of Python version bump in CHANGELOG.md 2021-07-22 11:40:10 +02:00
Sybren A. Stüvel 2fe39fb347 Revert "Bump Python version to 3.9"
This reverts commit 46466de7db.

Tox wasn't set up correctly for this bump, and we may want to keep
compatibility with older Blenders as well.
2021-07-22 11:37:04 +02:00
Sybren A. Stüvel b36effa6ec Bumped version to 1.4 2021-07-22 11:26:03 +02:00
Sybren A. Stüvel 8927461dbf Document dev-environment setup instructions
MyPy wants some extra love nowadays, and Black needs special handling as
well. The latter is only available as beta-release, and Poetry only has "allow
pre-release versions" as global flag, installing way too many beta packages
for my taste.
2021-07-22 11:24:13 +02:00
Sybren A. Stüvel 46466de7db Bump Python version to 3.9
Blender uses Python 3.9 nowadays, so it can be required in BAT as well.
2021-07-22 11:24:13 +02:00
Sybren A. Stüvel e792f31ced Add Strict Pointer Mode to CHANGELOG.md 2021-07-22 10:54:56 +02:00
Sybren A. Stüvel bd9ec7ddc7 Control Strict Pointer Mode from the CLI, defaulting to OFF
Due to issues with library overrides and unsynced pointers, it's quite
common for the Blender Animation Studio to get crashes of BAT. To avoid
these, Strict Pointer Mode is disabled when using BAT from the CLI.

Blender Cloud add-on will also get a similar update, so that there also
the Strict Pointer Mode is disabled.
2021-07-22 10:47:50 +02:00
Sybren A. Stüvel 087ff25c76 Add 'strict pointer mode' to BlendFile
Add a 'strict pointer mode' to the `BlendFile` class, which is enabled
by default. This allows users of the `BlendFile` class to decide whether
a bad pointer (i.e. one that points to a non-existing datablock) returns
`None` or raises a `SegmentationFault` exception.
2021-07-22 10:28:48 +02:00
Sybren A. Stüvel 803c38dac1 Cleanup: reformat with Black 2021-07-22 10:14:43 +02:00
Sybren A. Stüvel 99389e8ece Bumped version to 1.3.1 2021-02-04 12:01:53 +01:00
Sybren A. Stüvel dd257bad6f Remove assertion that library blend files always exist
Remove an assertion that would cause BAT to raise and exception and halt
when a library blend file is missing. This assertion was fine for aiding
the coding of the library, but now gets in the way of tracing dependencies
of partially checked-out projects.
2021-02-04 11:15:27 +01:00
Sybren A. Stüvel 0a5a50ccf0 Bumped version to 1.3 2021-02-02 13:42:09 +01:00
Sybren A. Stüvel 23dea91572 Add support for indirectly linked Geometry Nodes node trees 2021-02-02 13:41:39 +01:00
Sybren A. Stüvel e4bf2e8e35 Improved path handling
This commit fixes a bunch of issues at the same time, as they are all
related to path handling:

- `pathlib.Path.resolve()` or `.absolute()` are replaced by
  `bpathlib.make_absolute()`. The latter does NOT follow symlinks and does
  NOT network mounts from a drive letter to UNC notation. This also has
  advantages on non-Windows sytems, as it allows BAT-packing a directory
  structure with symlinked files (such as a Shaman checkout).
- Better handling of drive letters, and of paths that cross drive
  boundaries.
- Better testing of Windows-specific cases when running the tests on
  Windows, and of POSIX-specific cases on other platforms.

Thanks to @wisaac for starting this patch in D6676.

Thanks to @jbakker for pointing out the drive letter issue. This fixes
T70655.
2020-03-17 17:15:19 +01:00
Sybren A. Stüvel 3fa4389658 Bumped version to 1.3-dev0 2020-03-17 17:14:00 +01:00
Sybren A. Stüvel 782293b360 MyPy test fix
Newer versions of MyPy aren't silent any more when they complete succesfully,
so test for 'Success' in the message before failing the test.
2020-03-17 12:29:40 +01:00
Sybren A. Stüvel d3be952a77 Added Arcanist config file 2020-01-06 11:24:35 +01:00