282 Commits

Author SHA1 Message Date
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
Ethan Simon
608a7bdac9 Compatibility with packing read-only source files
File permissions are no longer copied when packing. This means that
read-only source files can still be packed without errors, even when
they have to be rewritten (due to changed paths).

Reviewed by: sybren

Differential Revision: https://developer.blender.org/D13128
2021-11-09 11:15:20 +01:00
Sybren A. Stüvel
2843cce6fd Bumped version to 1.7 2021-11-05 16:30:17 +01: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
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
Paul Golter
4305f32c48 Bumped version to 1.5.1 2021-07-22 16:03:43 +02:00
Paul Golter
db26a0aaf1 Add log warning if SegmentationFault caused by dereferencing invalid pointer is silenced when strict_pointer_mode is turned off. 2021-07-22 15:58:44 +02:00
Paul Golter
cd42417c37 Bumped version to 1.6b0 2021-07-22 12:38:33 +02:00
Paul Golter
d520f6bb33 Bumped version to 1.5 2021-07-22 12:36:15 +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
b36effa6ec Bumped version to 1.4 2021-07-22 11:26:03 +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
ad14de92a8 Bumped version to 1.2.2 2019-10-10 10:35:41 +02:00
Sybren A. Stüvel
0b92037973 Bumped version to 1.2.1
Version 1.2 already existed on pypi by accident.
2019-10-09 08:58:55 +02:00
Sybren A. Stüvel
2e0cfa968b Bumped version to 1.2 2019-10-09 08:56:49 +02:00
Sybren A. Stüvel
23643ace13 Remove unnecessary dictionary lookup
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.
2019-09-27 12:20:15 +02:00
Sybren A. Stüvel
e7cd6ab70d Fix external smoke caches not being packed 2019-09-27 12:19:22 +02:00
Sybren A. Stüvel
5988f3599a Fix T69976: BAT does not work with FluidSimModifier in Blender 2.81
The `point_cache` pointer was removed from Blender in
{rBd663ec48c06a083de74e90dd9c605e98b28baa37}, and was unused before that
commit.
2019-09-26 12:26:42 +02:00
Sybren A. Stüvel
af63f9c3c8 Allow setting Shaman JWT token in SHAMAN_JWT_TOKEN environment variable
I also removed the unused `shaman/auth.py` file.
2019-09-24 11:49:48 +02:00
Sybren A. Stüvel
113b0c9bb8 Fix T65904: External files with same path on different drives are packed once
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.
2019-06-26 14:37:29 +02:00
Sybren A. Stüvel
f0836417a4 Bumped version to 1.2-dev0 2019-06-12 11:49:27 +02:00
Sybren A. Stüvel
f40f7585ed Prevent error when modifying actions dict 2019-06-07 12:35:41 +02:00
Sybren A. Stüvel
37fc7f467a Fix exception when having project on a mapped network drive in Windows 2019-06-07 12:35:41 +02:00
Sybren A. Stüvel
c2e3aea3f6 Bumped version to 1.1.1 2019-04-18 12:04:51 +02:00
Sybren A. Stüvel
acd5a18bed Import urllib3 from requests.packages.urllib3
This is for compatibility with Blender 2.79.
2019-04-18 12:04:03 +02:00
Sybren A. Stüvel
9fdfbc9bb3 Bumped version to 1.1 2019-03-25 17:46:53 +01:00
Sybren A. Stüvel
b418aaf3c4 Bumped version to 1.1.dev2 2019-03-20 13:58:23 +01:00
Sybren A. Stüvel
4964745dee Support Alembic files from linked library
We already supported Alembic files in the top-level blend file, but now we
also support finding Alembic files in linked-in libraries.
2019-03-20 13:57:44 +01:00
Sybren A. Stüvel
c718fb3a41 Support the Mesh Sequence Cache modifier (a.k.a. Alembic files) 2019-03-20 11:14:23 +01:00
Sybren A. Stüvel
6ac117cd37 Formatting 2019-03-20 11:12:47 +01:00
Sybren A. Stüvel
e9fcdb0191 Use exponential backoff when retrying HTTP connections 2019-03-06 16:21:30 +01:00
Sybren A. Stüvel
44ee553c0a Shaman: added some timeouts to HTTP requests 2019-03-06 16:00:46 +01:00
Sybren A. Stüvel
c2a8ff18f8 Bumped version to 1.1-dev1 2019-03-06 13:40:32 +01:00
Sybren A. Stüvel
10abeaea49 Fix ValueError when not requesting a checkout 2019-03-06 12:10:55 +01:00