Editor-owned rendering
Timeline processors can request rendering without importing or controlling the editor's renderer directly:
render_media = context.get("runtime", {}).get("render_media")
if not callable(render_media):
raise RuntimeError("This host does not expose render_media")
output = render_media(
{
"mode": "video",
"clip_ids": context["selection"]["clip_ids"],
"bake_keyframes": True,
"track_fx": True,
"master_fx": False,
"include_audio": True,
"quality": "high",
"name": "Pre-render",
"destination_dir": r"D:\Exports",
}
)
output["ref"] = "prerender"
return {"outputs": [output]}render_media() operates on the detached project snapshot captured before the
processor starts. It never renders against a project that is being mutated in
parallel.
Note: Use
runtime.render_mediainstead of importing renderer internals. This keeps timeline processors compatible with the host-owned render pipeline.
Video render request
{
"mode": "video",
"clip_ids": [...],
# or: "track_index": 1,
"range_start": 5.0, # optional absolute timeline time
"range_end": 12.0, # optional absolute timeline time
"bake_keyframes": True,
"track_fx": True,
"master_fx": False,
"include_audio": True,
"quality": "high",
"video_encoder": "auto",
"name": "Pre-render",
"destination_dir": "...",
}Supported quality labels are:
draft, standard, high, maximum
The selected range is shifted to time zero in the rendered output. Crossing clips are trimmed to the requested range while source alignment is preserved.
Frame render request
{
"mode": "frame",
"clip_ids": [...],
"time": 8.5,
"extension": ".png",
"bake_keyframes": True,
"track_fx": True,
"master_fx": True,
"name": "Still",
"destination_dir": "...",
}Supported frame extensions are .png, .jpg and .jpeg.
Source copy request
{
"mode": "source_copy",
"clip_ids": [single_clip_id],
"name": "Original Source Copy",
"destination_dir": "...",
}Source copy requires exactly one clip with an existing source file.
render_media() returns a normal processor output dictionary. Return that value
through the processor's outputs list so Yrendr can register it in Project Viewer.