rendering
Rendering API wrapper for Blackmagic Design DaVinci Resolve.
delete_all_processed_jobs()
Delete all processed jobs
Source code in client/ayon_resolve/api/rendering.py
164 165 166 167 168 169 170 171 172 173 | |
is_rendering_in_progress()
Check if rendering is in progress
Source code in client/ayon_resolve/api/rendering.py
125 126 127 128 129 130 131 | |
modify_preset_file(xml_path, staging_dir, data)
Copy xml_path to staging_dir and apply data overrides.
Each key in data is either a bare element tag name (e.g. "NumFramesOfHandles") or a slash-separated path expression (e.g. "Parent/Child").
- Bare name – every matching element in the document is updated.
- Path – the leaf element at the given path is updated; if absent it is created as the first child of its parent element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xml_path | Path | Source XML preset file. | required |
staging_dir | Path | Directory where the modified copy is written. | required |
data | dict | Mapping of XML tag / path → new text value. | required |
Returns:
| Name | Type | Description |
|---|---|---|
Path | Path | Path to the modified copy of the preset in staging_dir. |
Raises:
| Type | Description |
|---|---|
AttributeError | Logged as a warning when a bare tag is not found. |
Source code in client/ayon_resolve/api/rendering.py
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | |
render_all_timelines(target_render_directory)
Render all of the timelines of current project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_render_directory | Path | Path to target render directory | required |
Returns:
| Name | Type | Description |
|---|---|---|
bool | True if all renders are successful, False otherwise |
Source code in client/ayon_resolve/api/rendering.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
render_clip_to_intermediate_file(timeline_item, target_render_directory)
Render a single TimelineItem's range on the currently active timeline.
Uses the render settings already configured on the project (format, codec, preset). Caller is responsible for setting those up before calling this function (e.g. via set_render_preset_from_file and set_format_and_codec).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeline_item | TimelineItem | A Resolve | required |
target_render_directory | Path | Directory where rendered files are written. | required |
Returns:
| Name | Type | Description |
|---|---|---|
Path | Path | list[Path] | Single file path for container formats (QuickTime, MXF, …). |
Path | list[Path] | list[Path]: Sorted list of frame paths for image sequences (EXR, DPX, …). |
Raises:
| Type | Description |
|---|---|
RuntimeError | If the render job cannot be created, started, or completes with a non-"Complete" status, or if no output files are found. |
Source code in client/ayon_resolve/api/rendering.py
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
render_single_timeline(timeline, target_render_directory)
Render single timeline
Process is taking a defined timeline and render it to temporary intermediate file which will be lately used by Extract Review plugin for conversion to review file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeline | Timeline | Timeline object | required |
target_render_directory | Path | Path to target render directory | required |
Returns:
| Name | Type | Description |
|---|---|---|
bool | True if rendering is successful, False otherwise |
Source code in client/ayon_resolve/api/rendering.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
render_timeline_intermediate_file(timeline, target_render_directory, preset_path, file_format, codec)
Render timeline to an intermediate file in target_render_directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeline | Timeline | Active Resolve Timeline object. | required |
target_render_directory | Path | Staging directory for the output. | required |
preset_path | Path | Path to the render preset XML file. | required |
file_format | str | Resolve format name (e.g. | required |
codec | str | Resolve codec name (e.g. | required |
Returns:
| Name | Type | Description |
|---|---|---|
Path | Path | list[Path] | Path to the rendered file. |
Path | list[Path] | list[Path]: List of paths to the rendered files. |
Raises:
| Type | Description |
|---|---|
RuntimeError | If the render preset cannot be loaded, the format and codec cannot be set, or the timeline cannot be rendered. |
Source code in client/ayon_resolve/api/rendering.py
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | |
wait_for_rendering_completion()
Wait for rendering completion
Source code in client/ayon_resolve/api/rendering.py
134 135 136 137 138 | |