253 Commits

Author SHA1 Message Date
Sybren A. Stüvel
0b176eda96 Add-on: include error cause in "Error performing BAT pack" message
The error can get cryptic, but without opening the terminal people
otherwise would have no idea what's going on.
2022-08-31 08:09:11 +02:00
Sybren A. Stüvel
a7510f4042 Cleanup: addon, split ping_manager() into two functions
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.
2022-08-31 08:08:06 +02:00
Sybren A. Stüvel
db9aca4a37 Add-on: allow setting job priority when submitting
The job priority was always intended to be settable when submitting, and
editable afterwards. This commit implements the former.
2022-08-30 14:51:48 +02:00
Sybren A. Stüvel
f82ebea11d Add-on: handle submission errors more gracefully 2022-08-25 13:28:45 +02:00
Sybren A. Stüvel
22aa041ec1 Allow relative render output root paths
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".
2022-08-25 13:14:48 +02:00
Sybren A. Stüvel
458c33573e OAPI: regenerate code 2022-08-11 16:58:05 -07:00
Sybren A. Stüvel
4744904502 Add-on: fix mypy error 2022-08-04 16:39:05 +02:00
Sybren A. Stüvel
11f45b8adf Add-on: work around an issue where files are submitted to Shaman twice
It seems that there is an issue in BAT that causes some UDIMs to be
reported multiple times. This is just a quick fix to work around that.
2022-08-04 16:38:22 +02:00
Sybren A. Stüvel
68b919156e Bumped version to 3.0-beta1 2022-08-03 12:43:31 +02:00
Sybren A. Stüvel
b94a9a154d Bumped version to 3.0-dev2 2022-08-02 17:10:28 +02:00
Sybren A. Stüvel
3595767741 Add-on: always use absolute path for last_n_dir_parts() function
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.
2022-08-02 17:07:18 +02:00
Sybren A. Stüvel
1caa4c2a59 OAPI: regenerate code 2022-08-01 18:03:05 +02:00
Sybren A. Stüvel
cb1e991305 Bumped version to 3.0-dev1 2022-08-01 14:21:19 +02:00
Sybren A. Stüvel
a6c935a634 Fix T99421: Introducing an etag for job types
The etag prevents job submissions with old settings, when the job
compiler script has been edited. The etag is the SHA1 hash of the
`JOB_TYPE` dictionary (as defined by the JavaScript file). The hash is
computed in a way that's independent of the exact formatting in the
JavaScript file. Also the actual JS code itself is irrelevant, just the
`JOB_TYPE` dictionary is used.
2022-07-29 21:13:37 +02:00
Sybren A. Stüvel
866513e06a Add-on: check connection with Flamenco on URL change
Whenever the URL to Flamenco Manager is updated, check it and report.

This required moving the 'ping manager' code into a separate function, as
calling an operator from an RNA update callback is not a good idea.
2022-07-29 14:25:47 +02:00
Sybren A. Stüvel
764973f116 Cleanup: add-on, remove unused parameter
No functional changes.
2022-07-29 10:25:23 +02:00
Sybren A. Stüvel
8ddc03d6ef Add-on: evaluate visible job settings immediately
For each job setting, if it's visible and has an `eval` property, it is now
evaluated immediately when switching job types. This means that properties
like the frame range get filled in automatically.

If there is already a value, this process is skipped, in order to not
overwrite the user's choice.

This resolves a common issue where the render job was rejected because
the frame range was kept empty.
2022-07-29 10:25:02 +02:00
Sybren A. Stüvel
ca8a909e41 Add-on: refactor FLAMENCO_OT_submit_job.poll()
Refactor the `FLAMENCO_OT_submit_job.poll()` function to actually use the
`job_types.active_job_type()` function instead of reimplementing similar
logic.

No functional changes.
2022-07-29 10:10:44 +02:00
Sybren A. Stüvel
fb5501028d Add-on: use bat.bpathlib.make_absolute() for making paths absolute
This should resolve the issue where on Windows file paths to a network
share would be converted to UNC notation (and thus loose their drive
letter).
2022-07-28 17:49:01 +02:00
Sybren A. Stüvel
2a4e557bd9 OAPI: regenerate code 2022-07-26 10:28:28 +02:00
Francesco Siddi
a2bd8a5615 OAPI: generate code 2022-07-25 17:16:53 +02:00
Sybren A. Stüvel
45542ef84c OAPI: regenerate code
Regenerate the OpenAPI code to reflect the new version number handling.

See rFc1a728dc for more info.
2022-07-25 16:12:27 +02:00
Sybren A. Stüvel
76f99d9f7d Change flamenco.io → flamenco.blender.org in a few places
Update the add-on's documentation URL and the README for the static website
so that they refer to https://flamenco.blender.org/
2022-07-25 16:10:39 +02:00
Sybren A. Stüvel
c1a728dc2f Version updates via Makefile
Flamenco now no longer uses the Git tags + hash for the application
version, but an explicit `VERSION` variable in the `Makefile`.

After changing the `VERSION` variable in the `Makefile`, run
`make update-version`.

Not every part of Flamenco looks at this variable, though. Most
importantly: the Blender add-on needs special handling, because that
doesn't just take a version string but a tuple of integers. Running
`make update-version` updates the add-on's `bl_info` dict with the new
version. If the version has any `-blabla` suffix (like `3.0-beta0`) it
will also set the `warning` field to explain that it's not a stable
release.
2022-07-25 16:08:07 +02:00
Sybren A. Stüvel
11a352968a Fix T99434: Two-way Variables
Two-way variable implementation in the job submission end-point. Where
Flamenco v2 did the variable replacement in the add-on, this has now
been moved to the Manager itself. The only thing the add-on needs to
pass is its platform, so that the right values can be recognised.

This also implements two-way replacement when tasks are handed out, such
that the `{jobs}` value gets replaced to a value suitable for the
Worker's platform as well.
2022-07-22 11:58:35 +02:00
Sybren A. Stüvel
98555db1f6 OAPI: regenerate code 2022-07-22 11:58:13 +02:00
Sybren A. Stüvel
344a62f37b Add-on: Skip BAT-packing when file already in shared storage
When the to-be-submitted blend file is already stored in the shared
storage, and Shaman is disabled, the add-on now skips BAT-packing it.
Instead, the file is copied to `filename.flamenco.blend` and the path is
submitted as-is.
2022-07-21 14:18:48 +02:00
Sybren A. Stüvel
471bb9f539 Add-on: fix mypy error 2022-07-21 14:05:55 +02:00
Sybren A. Stüvel
19d3ac1a0a Fix T99739: Add-on: Prevent job submission when no job type has been chosen
Prevent the `FLAMENCO_OT_submit_job` operator from running when there has
been no job type selection.
2022-07-21 13:03:15 +02:00
Sybren A. Stüvel
cae0f73758 Add-on: link to documentation & describe where to find the Flamenco panel 2022-07-21 12:55:08 +02:00
Sybren A. Stüvel
043ca032cb OAPI: regenerate code 2022-07-19 17:19:10 +02:00
Sybren A. Stüvel
63db0dc75c OAPI: regenerate code 2022-07-18 17:52:13 +02:00
Sybren A. Stüvel
3133bd2487 OAPI: regenerate code 2022-07-17 17:25:53 +02:00
Sybren A. Stüvel
0e92004f2a OAPI: regenerate code 2022-07-16 15:59:48 +02:00
Sybren A. Stüvel
e4627daf4b OAPI: regenerate code 2022-07-16 12:54:11 +02:00
Sybren A. Stüvel
e2434b44f2 OAPI: regenerate code 2022-07-16 11:11:34 +02:00
Sybren A. Stüvel
f9a3d3864a OAPI: regenerate code 2022-07-14 17:26:26 +02:00
Sybren A. Stüvel
898019cf1d OAPI: regenerate code 2022-07-14 12:22:13 +02:00
Sybren A. Stüvel
e4a38f071c OAPI: regenerate code 2022-07-14 11:16:59 +02:00
Sybren A. Stüvel
77516a64fd Add-on: bump BAT from 1.12 to 1.13
1.13 gives a nicer error message when things go wrong (in a specific, hard
to debug case). No other functional changes.
2022-07-14 10:44:41 +02:00
Sybren A. Stüvel
5b1b0b30a9 Add-on: remove .flamenco.blend after job submission 2022-07-12 17:46:08 +02:00
Sybren A. Stüvel
2215ed2d85 Add-on: load all BAT submodules in one go
Adjust the loading of BAT from a wheel file in such a way that all
submodules are loaded in one go. This ensures that they're still
isolated from the rest of Blender (so other add-ons won't find our BAT),
but not from each other (so that there is only one copy of each
submodule).

In practice, this solves an issue where calling
`blender_asset_tracer.blendfile.set_strict_pointer_mode(False)` had no
effect. This was caused by each loaded submodule having a different copy
of `blendfile`.

Also loaded modules are logged more explicitly (at INFO level) to aid in
debugging later on.
2022-07-12 17:30:18 +02:00
Sybren A. Stüvel
3412a85a14 Add-on: disable BAT's strict pointer mode
Due to issues with library overrides and unsynced pointers, it's quite
common for the Blender Animation Studio to get "address unknown" errors
from BAT. To avoid these, Strict Pointer Mode is disabled.
2022-07-11 17:56:47 +02:00
Sybren A. Stüvel
ae2cb281b4 OAPI: regenerate code 2022-07-08 11:35:57 +02:00
Sybren A. Stüvel
ac5bb5e378 Remove assumption {jobs} only exists when Shaman is enabled
Manager always creates an implicit variable `{jobs}`. This used to be
Shaman-dependent, but now it's always there (has been for a while). This
is now reflected in an add-on comment, and in an extra unit test.
2022-07-05 18:19:49 +02:00
Sybren A. Stüvel
4c8ab01dae OAPI: regenerate code 2022-07-04 12:49:26 +02:00
Sybren A. Stüvel
5537f2c07c OAPI: regenerate code 2022-07-04 12:12:45 +02:00
Sybren A. Stüvel
801fa20f12 OAPI: regenerate code 2022-07-01 12:32:42 +02:00
Sybren A. Stüvel
56463fa3ec OAPI: regenerate code 2022-06-30 19:19:38 +02:00
Sybren A. Stüvel
123674cf57 OAPI: regenerate code 2022-06-30 18:33:36 +02:00