When Flamenco 3 was just released, it was important to indicate the
difference between the Flamenco 2 panel (which was just labeled
"Flamenco"), and the new Flamenco 3 panel. The release of v3.0 was
almost two years ago, so it's time to remove the "3" from the titles and
just name things "Flamenco".
Skip writing the `.flamenco.blend` file when working directly on shared
storage. This was already the intended behaviour, but I think it got lost
in a recent refactor.
Show the worker tag name (and its description in a tooltip) in the job
details. When no worker tag is assigned, "All Workers" is shown in a more
dimmed colour.
This also renames the "Type" field to "Job Type". "Tag" and "Type" could
be confused, and now they're displayed as "Worker Tag" and "Job Type".
The UI in the add-on's submission interface is also updated for this, so
that that also shows "Worker Tag" (instead of just "Tag").
Add a checkbox to the submission interface to submit the job in
`paused` status.
Internally this translates the boolean value of the checkbox to the
desired state (`queued` or `paused`). A checkbox was chosen to
simplify the user interface; technically a drop-down could have been
used to select the initial state, but this would require more clicks
to get the same result.
Pull Request: https://projects.blender.org/studio/flamenco/pulls/104323
Prevent a potential crash of Blender. Calling
`context.window_manager.modal_handler_add(self)` from an operator that does
not actually run modally can cause problems. So now that's called only
when running modally.
The `bpy.ops.flamenco.submit_job(job_name="jobname")` operator can now be
executed from Python. In that case, it will block the main thread until
the job submission is complete.
Refactor the job submission operator, to make it easier to allow executing
the operator (that is, running in the foreground, blocking execution until
submission is done).
No functional changes.
This gives job type authors more control over how settings are presented
in Blender's job submission GUI. If a job setting does not define a
label, its `key` is used to generate one (like Flamenco 3.5 and older).
Note that this isn't used in the web interface yet.
Remove some Python 3.10 features to make the add-on compatible with py39.
This is the Python version that's bundled with Blender 2.93 LTS, for which
I got a request to see if it could be supported.
The Blender version still isn't officially supported, but this should make
things at least not immediately fail.
Avoid these warnings on the console:
```
WARN (bpy.rna): source/blender/python/intern/bpy_rna.cc:1339
pyrna_enum_to_py: current value '0' matches no enum in 'Scene', 'Scene',
'flamenco_job_type'
```
The solution was two-fold:
- Use a non-empty string as the identifier for the 'Select a Job Type'
choice.
- Give the property a default value.
Instead of storing the cached manager info in the Blender preferences,
store the info in a JSON file. The file is located in the user prefs
folder (`~/.config/blender/{version}/config` on Linux).
This also reduces the number of 'refresh' operators to a single one, which
then fetches all necessary info from the Manager.
This fixes an issue (reported via chat) where worker tags were sometimes
not retained across file saves.