Render Settings
- class dazpy.DazRenderSettings(client=None)[source]
Bases:
object- render_engine_state()[source]
Return truthful Render Settings engine facts and a normalized verdict.
DzRenderOptions.renderTypeis the effective render-operation selector. The active renderer class/name is returned as a separate fact and only participates in normalization whenrenderTypeisSoftware. In particular, an Iray active-renderer name cannot turn a ScreenShot or HardwareAssisted operation into an Iray verdict.
- set_render_engine(engine)[source]
Persist
irayorviewportand require exact live readback.This is an explicit persistent setter, not a transactional render helper. It calls
applyChanges()so the selected render operation is written via DAZ’s settings manager. Any lookup, mutation, apply, or readback failure raisesRenderError; unknown engine names never silently continue.
- active_engine()[source]
Return the active render engine name.
The Render Settings pane’s “Engine” dropdown conflates two separate DazScript concepts, confirmed against a live instance:
DzRenderOptions.renderTypeis a 3-value enum (ScreenShot, HardwareAssisted, Software) picking how the scene is rendered; only when it’sSoftwaredoesrenderMgr.getActiveRenderer()(the pluggable Iray/Filament/… renderer) apply. Returns"viewport"or"multi_pass_opengl"for the first two modes, otherwise the mapped engine name (e.g. “iray”, “filament”), falling back to the raw DazScript class name (e.g. “DzIrayRenderer”) if it isn’t one of the known engines.
- set_active_engine(engine)[source]
Set the active render engine.
- Parameters:
engine (str) –
"viewport"or"multi_pass_opengl"to switchDzRenderOptions.renderTypeto one of the two non-pluggable modes, or a pluggable renderer name (e.g."iray","filament", or a raw DazScript class name like"DzIrayRenderer") to setrenderTypetoSoftwareand activate that renderer.- Raises:
RenderError – If a pluggable renderer name doesn’t resolve to a renderer registered with the render manager (e.g. the Filament plugin isn’t installed).
- render(camera_name=None, camera_label=None)[source]
Render the scene to
output_path.DAZ Studio’s
doRender()only writes to disk whenrenderImgToIdis set toDzRenderOptions.DirectToFileand the camera is applied to both the render options and the active viewport before the call.- Parameters:
camera_name (str | None) – Internal name of the camera node to render from. Internal names are not guaranteed unique – e.g. duplicating a camera node in the Scene panel copies its internal name too, only the display label is forced unique – so this can silently resolve to the wrong node when duplicates exist. Prefer camera_label unless you specifically need name-based lookup. Mutually exclusive with camera_label.
camera_label (str | None) – User-visible label of the camera node to render from (the same value shown in the Scene panel, resolved via
Scene.findCameraByLabel()). Labels are kept unique by DAZ Studio even when internal names collide, so this is the more reliable way to target a specific camera. Mutually exclusive with camera_name. When neither is given the active viewport camera is used.
- Returns:
A
RenderOutcomewithsuccessand the resolvedoutput_pathactually written bydoRender()(opts.renderImgFilenameafter the call).- Raises:
ValueError – If both camera_name and camera_label are given.
- Return type:
RenderOutcome
- render_and_wait(poll_interval=1.0, timeout=600.0)[source]
Alias for
render()kept for backwards compatibility.doRender()is synchronous in DAZ Studio so no polling is required.
- property max_samples: int | None
Iray progressive rendering sample cap (
Max Samplesin the Advanced tab).
- property max_time_secs: int | None
Iray progressive rendering time cap in seconds (
Max Timein the Advanced tab).
- property quality: float | None
Iray
Rendering Qualityconvergence target (higher converges further).
- set_quality_preset(preset)[source]
Apply a named Iray quality preset, controlling sample count and render time.
- Parameters:
preset (str) – One of
"draft","preview","good","final"(fastest/lowest quality to slowest/highest quality).- Raises:
ValueError – If preset is not a recognized preset name.
- property canvases_enabled: bool | None
Master on/off switch for all Iray Canvas output (
Render to Canvases).
- add_canvas(name, canvas_type)[source]
Add (or reconfigure) an Iray Canvas by name.
- Parameters:
name (str) – Canvas name. If a canvas with this name already exists it is reconfigured to canvas_type rather than duplicated.
canvas_type (str) – One of
"Beauty","Diffuse","Specular","Glossy","Emission","LightGroup","EnvironmentLighting","LPE","Irradiance","Alpha","Shadow","AmbientOcclusion","Distance","Depth","MaterialTag","MaterialID","ObjectID","Normal","TextureCoordinate","BSDFWeight","ConvergenceHeatmap","PostToon","WorldPosition".
- Returns:
The resulting
Canvas.- Raises:
RenderError – If the render manager or Iray property holder is unavailable.
- Return type:
Canvas
- remove_canvas(name)[source]
Remove a configured Iray Canvas by name.
- Returns:
Trueif a matching canvas was found and removed,Falseif no canvas with name exists.- Return type:
- canvas_output_paths(output_path)[source]
Return each configured canvas’s resolved output file path for a render to output_path.
Derived from DAZ Studio’s naming convention – canvases are written to
<dir>/<basename>_canvases/<basename>-<canvasName>-<canvasType>.exralongside the main render output. Confirmed empirically against a live render; DazScript does not expose these paths directly, so this is computed rather than queried.- Parameters:
output_path (str) – The path passed as the main render’s
output_path(i.e. whatoutput_pathwould be set to).- Returns:
A dict mapping each canvas’s name to its resolved output path.
- Return type: