Fix#104183: Error submitting job to flamenco manager.
The bug happened when a user, using filesystem as storage solution,
would try to submit the job to the flamenco manager. The user would be shown
an Error -> Error packing with BAT: 'Packer' object has no attribute 'actual_checkout_path'.
The fix was to account for multiple implementations of the Packer object.
Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104184
If Shaman is used to submit the job files, store the job's checkout ID
(i.e. the path relative to the checkout root) in the database. This will
make it possible in the future to remove the Shaman checkout along with
the job itself.
Job preparation (that is, constructing the data to be sent to the Flamenco
API) shouldn't fail, but in case it does, it should stop the rest of the
submission process.
Add support for Blender's `use_all_linked_data_direct` experimental
option. This is a workaround for an issue with BAT, for which a quick
solution is required by the Blender Studio (production crunch).
Flamenco writes the `.flamenco.blend` file with
`preferences.experimental.use_all_linked_data_direct` set to `True`, so
that BAT has an easier time finding linked assets.
If file has never been saved, Flamenco cannot create a temp copy to
submit. This caused an exception, which is now avoided by showing a
clear error message instead.
Maniphest Tasks: T102192
Differential Revision: https://developer.blender.org/D16358
Fix a BAT error that arises when submitting a job from a Windows
workstation to a Shaman flamenco system. BAT expects an absolute path,
but on Windows systems, absolute paths begin with a drive letter.
This patch adds an arbitrary drive letter, and later removes it once the
relative paths have been computed.
Reviewed by: sybren
Differential Revision: https://developer.blender.org/D16084
BAT-packing is a multi-threaded operation, so messages about its progress
are queued up in a thread-safe manner. The modal operator was only handling
4 messages per second, causing major slowdowns when there are lots of
small files to be processed. This is now done much faster, and thus the
UI shouldn't lag behind of the actual submissions progress.
Implement the `getSharedStorage` operation in the Manager, and use it in
the add-on to get the shared storage location in a way that makes sense
for the platform of the user.
Manifest task: T100196
Before submitting a job, the add-on now checks the version of the Manager.
If this is not the same version of the add-on, a warning is shown and a
"Force Submit" button appears. This makes it both explicit that something
is iffy and still allows for pushing forward.
This is important when upgrading Flamenco, because I'm sure many people
will forget to actually redownload and reinstall the add-on.
Split the `comms.ping_manager()` function into two: one that returns the
version & config of the Manager, and the other that reports on it.
This will make it possible to do the former without the latter in certain
other situations where we want to refresh the manager info in the
background.
Add a new `abspath(path)` function to the add-on, for use in job type
settings. With this, the "simple blender render" job can support relative
paths for the "render output root" setting, and still have an absolute
final "render output path".
Always use absolute paths in the `last_n_dir_parts()` function. This fixes
an issue with the "simple Blender render" job type, when a
blendfile-relative path was used for the render output root.