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.
This commit is contained in:
parent
87684a0d92
commit
db9aca4a37
@ -14,6 +14,7 @@ bugs in actually-released versions.
|
||||
embedded `flamenco-3.x.y-xxxx/` directory with all the files (instead of
|
||||
putting all the files in the root of the tarball).
|
||||
- Two-way variable replacement now also changes the path separators to the target platform.
|
||||
- Allow setting priority when submitting a job.
|
||||
|
||||
|
||||
## 3.0-beta1 - released 2022-08-03
|
||||
|
@ -129,6 +129,14 @@ def register() -> None:
|
||||
description="Name of the Flamenco job; an empty name will use the blend file name as job name",
|
||||
)
|
||||
|
||||
bpy.types.Scene.flamenco_job_priority = bpy.props.IntProperty(
|
||||
name="Flamenco Job Priority",
|
||||
description="Priority of the render jobs; higher numbers will get higher priority",
|
||||
default=50,
|
||||
min=0,
|
||||
max=100,
|
||||
)
|
||||
|
||||
preferences.register()
|
||||
operators.register()
|
||||
gui.register()
|
||||
|
@ -41,6 +41,7 @@ class FLAMENCO_PT_job_submission(bpy.types.Panel):
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(context.scene, "flamenco_job_name", text="Job Name")
|
||||
col.prop(context.scene, "flamenco_job_priority", text="Priority")
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
@ -41,10 +41,12 @@ def job_for_scene(scene: bpy.types.Scene) -> Optional[_SubmittedJob]:
|
||||
settings = propgroup.as_jobsettings()
|
||||
metadata = JobMetadata()
|
||||
|
||||
priority = getattr(scene, "flamenco_job_priority", 50)
|
||||
|
||||
job: SubmittedJob = SubmittedJob(
|
||||
name=scene.flamenco_job_name,
|
||||
type=propgroup.job_type.name,
|
||||
priority=50,
|
||||
priority=priority,
|
||||
settings=settings,
|
||||
metadata=metadata,
|
||||
submitter_platform=platform.system().lower(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user