When a path starts with b'//' it will not be converted to a PurePath, as
the handling of such filenames is platform dependent (Windows handles those
weirdly, like appending a slash to any path).
Currently pointcaches on disk for cloth sims were not traced. This patch allows the tracing of pointcaches for cloth sims.
Reviewers: sybren, fsiddi
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D3910
For this to work well I also had to remove the sorting of blocks in
trace.deps(). The sorting caused the first `yield` to be executed only
after each blend file was opened, which means that the consuming for-loop
takes a long time to hit its first iteration. As a result, it would respond
slowly to abort requests. By not sorting the first `yield` is much sooner,
resolving this issue.
Both the dependency Tracer class and the Packer class now support a
callback object, where the latter is a subclass of the former.
For file transfers running in a separate thread, there is a thread-safe
wrapper for progress callbacks. This wrapper can be called from any thread,
and calls the wrapped callback object from the main thread. This way the
callback implementation itself doesn't have to worry about threading
issues.
This does introduce some not-so-nice things, like having to annotate each
`__init__` function with `-> None`. However, the benefits of having static
type checking in a complex bit of software like BAT outweigh the downsides.