.NET API
RenderStudioApi
Render Studio (the ArtisanRenderAndAnimation panel): scene environments, the studio material library, and the studio’s render pipeline. Stills go through Rhino’s current renderer (Cycles by default) via _Render + _-SaveRenderWindowAs — the exact route the panel’s Render button takes. Turntables render one frame per camera step and assemble an MP4 with the bundled ffmpeg, same as the panel’s Turntable mode. Environments live as .renv files in
from ArtisanPlugin.Scripting import RenderStudioApi
See also the guide, Render › Render Studio catalogs, and the Python package, ra.render_studio.
Methods
| Method | |
|---|---|
ApplyEnvironment | Applies a scene environment by name (see ListEnvironments()) as both the lighting and the reflection/refraction environment — what clicking an Environment tile does. |
ApplyMaterial | 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 objectIds. |
ListEnvironments | Scene environment names available to ApplyEnvironment (the tiles in the panel’s Environment tab), sorted alphabetically. |
ListMaterialFamilies | Material family names (the panel’s Metals / Gems / Grounds / Misc tabs; one folder per family, so custom families show up too). |
ListMaterials | Material names inside one family, sorted — the tiles the panel shows for that tab. |
RenderStill | 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). |
RenderTurntable | 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. |
ApplyEnvironment
void RenderStudioApi.ApplyEnvironment(string name = null)
Applies a scene environment by name (see ListEnvironments()) as both the lighting and the reflection/refraction environment — what clicking an Environment tile does. name null/empty = the studio’s default setup (2Shapes environment + diamond refraction environment + white ground plane), same as the panel applies before any render.
| Parameter | Type | Default |
|---|---|---|
name | string | null |
ApplyMaterial
void RenderStudioApi.ApplyMaterial(
string family,
string name,
IEnumerable<Guid> objectIds = null)
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 objectIds. objectIds null/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 | Default |
|---|---|---|
family | string | required |
name | string | required |
objectIds | IEnumerable<Guid> | null |
ListEnvironments
IReadOnlyList<string> RenderStudioApi.ListEnvironments()
Scene environment names available to ApplyEnvironment (the tiles in the panel’s Environment tab), sorted alphabetically.
Returns IReadOnlyList<string>.
ListMaterialFamilies
IReadOnlyList<string> RenderStudioApi.ListMaterialFamilies()
Material family names (the panel’s Metals / Gems / Grounds / Misc tabs; one folder per family, so custom families show up too).
Returns IReadOnlyList<string>.
ListMaterials
IReadOnlyList<string> RenderStudioApi.ListMaterials(string family)
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 | Default |
|---|---|---|
family | string | required |
Returns IReadOnlyList<string>.
RenderStill
string RenderStudioApi.RenderStill(
string path,
int width = 0,
int height = 0,
int samples = 0)
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 | Default |
|---|---|---|
path | string | required |
width | int | 0 |
height | int | 0 |
samples | int | 0 |
Returns string.
RenderTurntable
string RenderStudioApi.RenderTurntable(
string path,
int seconds = 0,
int framesPerSecond = 0,
int width = 0,
int height = 0,
int samples = 0,
bool raytraced = true)
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; framesPerSecond 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 | Default |
|---|---|---|
path | string | required |
seconds | int | 0 |
framesPerSecond | int | 0 |
width | int | 0 |
height | int | 0 |
samples | int | 0 |
raytraced | bool | true |
Returns string.