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.
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.
This reverts commit 46466de7db924d374a97c74219db9694b9a67bbd.
Tox wasn't set up correctly for this bump, and we may want to keep
compatibility with older Blenders as well.
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.
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.
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.
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.
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.
The logging is sent to stdout already (which is captured and printed by
PyTest), so having PyTest also capture and print logging just doubles
the output.
No functional changes.
This may also fix a Windows compatibility issue related to path
normalisation. Untested as it's hard to reproduce, but at least it
shouldn't hurt either.
External files with the same path on different drives are packed as a
single file. In this commit the drive letter is taken into account when
determining the path inside `_outside_project`, so that they are distinct.