Skip to content

.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 \Render\Environments; materials as .rmtl files in \Render\Materials<Family> (Metals, Gems, Grounds, Misc). Names are the file names without extension.

from ArtisanPlugin.Scripting import RenderStudioApi

See also the guide, Render › Render Studio catalogs, and the Python package, ra.render_studio.

Methods

Method
ApplyEnvironmentApplies a scene environment by name (see ListEnvironments()) as both the lighting and the reflection/refraction environment — what clicking an Environment tile does.
ApplyMaterialApplies 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.
ListEnvironmentsScene environment names available to ApplyEnvironment (the tiles in the panel’s Environment tab), sorted alphabetically.
ListMaterialFamiliesMaterial family names (the panel’s Metals / Gems / Grounds / Misc tabs; one folder per family, so custom families show up too).
ListMaterialsMaterial names inside one family, sorted — the tiles the panel shows for that tab.
RenderStillRenders 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).
RenderTurntableRenders 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.

ParameterTypeDefault
namestringnull

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.

ParameterTypeDefault
familystringrequired
namestringrequired
objectIdsIEnumerable<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.

ParameterTypeDefault
familystringrequired

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.

ParameterTypeDefault
pathstringrequired
widthint0
heightint0
samplesint0

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_ folder next to the video, as the panel leaves them. 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.

ParameterTypeDefault
pathstringrequired
secondsint0
framesPerSecondint0
widthint0
heightint0
samplesint0
raytracedbooltrue

Returns string.