Python package
ra.render_studio
Render Studio: environments, materials, stills and turntables.
import rhinoartisan as ra
Wraps ArtisanPlugin.Scripting.RenderStudioApi.
Functions
| Function | |
|---|---|
apply_environment() | Applies a scene environment by name (see ListEnvironments()) as both the lighting and the reflection/refraction environment — what clicking an Environment tile does. |
apply_material() | Applies a studio material (see ListMaterials()) the way the panel does: non-Grounds families skin the given objects (and every member of their groups); the Grounds family targets the ground plane instead and ignores object_ids. |
list_environments() | Scene environment names available to ApplyEnvironment (the tiles in the panel’s Environment tab), sorted alphabetically. |
list_material_families() | Material family names (the panel’s Metals / Gems / Grounds / Misc tabs; one folder per family, so custom families show up too). |
list_materials() | Material names inside one family, sorted — the tiles the panel shows for that tab. |
render_still() | Renders a still through the studio pipeline (_Render on the current renderer — Cycles unless the user changed it — then _-SaveRenderWindowAs) and returns the full path written (“.png” appended when the path has no extension). |
render_turntable() | Renders a turntable MP4 the way the panel’s Turntable mode does: the camera orbits the current target on a horizontal circle through the current camera position (starting there), one frame is rendered per step, and the bundled ffmpeg assembles the video. |
ra.render_studio.apply_environment()
ra.render_studio.apply_environment(name=None)
Applies a scene environment by name (see ListEnvironments()) as both the lighting and the reflection/refraction environment — what clicking an Environment tile does. name None/empty = the studio’s default setup (2Shapes environment + diamond refraction environment + white ground plane), same as the panel applies before any render.
| Parameter | Type | |
|---|---|---|
name | str | optional — None = the tool default |
ra.render_studio.apply_material()
ra.render_studio.apply_material(family: str, name: str, object_ids=None)
Applies a studio material (see ListMaterials()) the way the panel does: non-Grounds families skin the given objects (and every member of their groups); the Grounds family targets the ground plane instead and ignores object_ids. object_ids None/empty = current selection. The material is loaded once per document and reused on later calls (matched by its FAMILY-NAME tag). Ensures the default studio lighting is in place first, exactly like a panel click.
| Parameter | Type | |
|---|---|---|
family | str | required |
name | str | required |
object_ids | Sequence[IdLike] | optional — None = the tool default |
ra.render_studio.list_environments()
ra.render_studio.list_environments() -> List[str]
Scene environment names available to ApplyEnvironment (the tiles in the panel’s Environment tab), sorted alphabetically.
ra.render_studio.list_material_families()
ra.render_studio.list_material_families() -> List[str]
Material family names (the panel’s Metals / Gems / Grounds / Misc tabs; one folder per family, so custom families show up too).
ra.render_studio.list_materials()
ra.render_studio.list_materials(family: str) -> List[str]
Material names inside one family, sorted — the tiles the panel shows for that tab. Throws listing the valid families when the family doesn’t exist.
| Parameter | Type | |
|---|---|---|
family | str | required |
ra.render_studio.render_still()
ra.render_studio.render_still(path: str, width=None, height=None, samples=None) -> str
Renders a still through the studio pipeline (_Render on the current renderer — Cycles unless the user changed it — then _-SaveRenderWindowAs) and returns the full path written (“.png” appended when the path has no extension). width/height 0 = 800x600 (the panel default), pixels. samples 0 = 500 Cycles passes (the studio’s document default). The render window stays open afterwards, as it does for the panel’s Render button. Blocks until the render finishes; throws when it is cancelled.
| Parameter | Type | |
|---|---|---|
path | str | required |
width | int | optional — None = the tool default |
height | int | optional — None = the tool default |
samples | int | optional — None = the tool default |
ra.render_studio.render_turntable()
ra.render_studio.render_turntable(path: str, seconds=None, frames_per_second=None, width=None, height=None, samples=None, raytraced=None) -> str
Renders a turntable MP4 the way the panel’s Turntable mode does: the camera orbits the current target on a horizontal circle through the current camera position (starting there), one frame is rendered per step, and the bundled ffmpeg assembles the video. Returns the full path written (“.mp4” appended when missing). Frames are left in a FRAMES_seconds 0 = 5; frames_per_second 0 = 12 (panel defaults; total frames = seconds * fps + 1). width/height 0 = 800x600, pixels. samples 0 = 500 passes. raytraced True (the panel’s Cycles mode) renders every frame with _Render; False captures the viewport in its current display mode instead — much faster, lower quality. Blocks until the video is written; expect minutes in raytraced mode.
| Parameter | Type | |
|---|---|---|
path | str | required |
seconds | int | optional — None = the tool default |
frames_per_second | int | optional — None = the tool default |
width | int | optional — None = the tool default |
height | int | optional — None = the tool default |
samples | int | optional — None = the tool default |
raytraced | bool | optional — None = the tool default |