mcp-cinema4d

v0.5.1
io.github.kumoproductions/mcp-cinema4d Checked 1 day ago Published 2 months ago

MCP server for Cinema 4D — entity CRUD, parameter-level access, batched undo, security controls.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ping Ping C4D

Check connectivity to the Cinema 4D bridge plugin.

render Render Active Document

Render the active Cinema 4D document at its currently-active render data settings. To change resolution / renderer / frame range / etc., adjust the active RenderData first via `create_render_data` (with `update_if_exists:true` on the active RD) or `set_params`. The request times out after 180 seconds; heavier renders that exceed that keep running in C4D but the call returns a timeout.

ParameterTypeDescription
output_pathstringOptional absolute path to write the rendered image. Defaults to a temp file.

preview_render Preview Render (Viewport, Constant Lines)

Quick agent-friendly verification render. Uses the Viewport renderer with the active editor view temporarily switched to Constant Shading (Lines) — sketch-style and fast. Independent of the active RenderData (built freestanding, never inserted) and restores BaseDraw / camera / time / take in finally. Returns a base64 PNG inline so the agent can directly view it. Use `view: top|bottom|left|right|front|back` for an auto-framed temp camera, or `camera` to render through a named scene camera. Pass `save_path` to also write the PNG to disk.

ParameterTypeDescription
camerastringOptional scene camera object name. Mutually exclusive with a non-'current' view.
frameintegerOptional frame number; defaults to the current document time.
heightintegerOutput height in pixels (default 1024, max 4096).
save_pathstringOptional absolute PNG path. When set, the rendered image is also written to disk (parent directory must already exist). The base64 PNG is still returned inline.
takestringOptional take name to switch to before rendering. Restored afterward.
viewstringPreset view. 'current' (default) uses the active BaseDraw camera. The other presets place a temp camera looking at the scene bounds from that side; the temp camera is removed in finally.
widthintegerOutput width in pixels (default 1024, max 4096).

reset_scene Reset Active Scene

Clear scene state in one RPC. With `prefix` (e.g. 'e2e_') removes only objects / materials / non-active render data / non-main takes whose name starts with the prefix, then flushes the undo buffer — cheap cleanup for test suites. Without prefix, swaps the active document for a fresh empty BaseDocument (everything goes). Much faster than chained remove_entity calls when cleanup involves animated objects.

ParameterTypeDescription
keep_active_rdbooleanPrefix-mode only: protect the currently-active RenderData from deletion. Default true.
prefixstringOnly remove entities whose name starts with this prefix. Omit for full reset.

call_command Call C4D Command

Invoke a Cinema 4D command by plugin id via c4d.CallCommand(). Works for built-in commands (render, save, make editable, ...) and any registered command plugin.

ParameterTypeDescription
command_id *integerCinema 4D command id. Examples: 12099 = Render to Picture Viewer, 12161 = Save Document, 12236 = Make Editable, 12168 = New Document. Use list_plugins (plugin_type="command") to discover.
subidintegerOptional sub-id (rarely needed).
timeout_msintegerRequest timeout in ms (default 60000). CallCommand often runs synchronously; increase for long-running ones like Render.

list_plugins List C4D Plugins (Any Type)

Generalized plugin enumerator. Pass plugin_type (e.g. "material", "shader", "video_post", "command") or a raw int to FilterPluginList. Each entry includes "plugin" (parent folder of the binary, e.g. "OctaneRender 1.7.1") and "plugin_file" (binary basename) for host-plugin attribution. Filter results by name_pattern and/or plugin_pattern regex.

ParameterTypeDescription
name_patternstringOptional regex applied to plugin display name (e.g. "octane|convert").
plugin_patternstringOptional regex matched against the host plugin folder or binary filename (e.g. "octane" → "OctaneRender 1.7.1"). Useful for commands whose display name does not include the plugin brand.
plugin_typePlugin category: string alias or raw c4d.PLUGINTYPE_* integer. Defaults to 'command'.

undo Pop Undo Stack

Pop up to `steps` entries off the active document's undo stack via doc.DoUndo. Stops early if the stack empties. Returns `steps_performed` so callers can tell when fewer steps were available than requested. Default: 1 step.

ParameterTypeDescription
stepsintegerNumber of undo steps to perform (default 1).

batch Batch Execute

Run many generic ops in one RPC. Each op is applied in order; by default failures are recorded per op and the batch continues. The whole batch is wrapped in a single undo group. Useful for 'apply X to all matching entities' workflows (pair with list_entities + name_pattern to get handles).

ParameterTypeDescription
ops *arrayOperations to execute in order.
stop_on_errorbooleanAbort on first error (default false — errors are collected per op).

list_entities List C4D Entities

Enumerate scene entities of a given kind. Returns compact summaries (name, type_id, type_name, plus kind-specific fields — `is_active` for take / material / render_data). For kind=object also supports type_ids / tag_types / max_depth filters and include_tags / include_params to read data inline — so you can find 'all cubes with a Ttexture tag and their position in one call' without falling back to exec_python. Use this first to find what exists before `describe`/`set_params`. **Note:** kind=shader walks classical shader chains; for node-material graphs use `list_graph_nodes`.

ParameterTypeDescription
kind *stringEntity kind to list.
include_paramsarray(kind=object) Parameter ids to read per match. Returned under `params: {param_id: value}`.
include_tagsboolean(kind=object) Attach `tags: [{type_id, type_name, name}, ...]` to each match.
max_depthinteger(kind=object) Skip objects deeper than this (root=0). Default: unlimited.
name_patternstringOptional regex to filter results by name (e.g. "^VFX_Shot00[2-9]$").
objectstringFilter tags to this object name (only for kind=tag). Omit to list tags on all objects.
object_pathstringFilter tags to this object path (only for kind=tag). Use when the name is not unique.
ownerOwner handle (required for kind=shader).
render_datastringRender data name (required for kind=video_post).
tag_typesarray(kind=object) Keep only objects carrying a tag whose type id is in this set (e.g. [5616] for Ttexture).
type_idsarray(kind=object) Keep only objects whose GetType() is in this set (e.g. [5159] for cubes).

describe Describe C4D Entity

Dump all description parameters (id, name, cycle enum, current value) of a C4D entity resolved by handle. Use this to discover parameter IDs before reading/writing.

ParameterTypeDescription
handle *C4D entity handle. Shapes: {kind:"object",name?|path?}, {kind:"render_data",name}, {kind:"take",name}, {kind:"material",name}, {kind:"layer",name}, {kind:"tag",object?|object_path?,type_id?,tag_name?}…

get_params Get Parameter Values

Read parameter values on a C4D entity by id or DescID path. Each id may be: an int (top-level), a list [a, b, …] (chained DescID; dtypes inferred from the description), or contain 'x'/'y'/'z' for vector sub-components (e.g. [903, 'x'] = position.x). For explicit dtypes use [[id, 'real|long|bool|vector'], …]. Returns `{values: [{path, value}]}` in request order. Discover ids via `describe`.

ParameterTypeDescription
handle *C4D entity handle. Shapes: {kind:"object",name?|path?}, {kind:"render_data",name}, {kind:"take",name}, {kind:"material",name}, {kind:"layer",name}, {kind:"tag",object?|object_path?,type_id?,tag_name?}…
ids *arrayList of parameter paths to read.

set_params Set Parameter Values

Atomically write parameter values (wrapped in one undo). Each entry is `{path, value}` where `path` is either an int id or a DescID path (e.g. [903, 'x'] = position.x). Lists of 3 numbers auto-coerce into c4d.Vector for vector-typed destinations. Returns `{applied: [{path, value}], errors: [{path, error}]}`.

ParameterTypeDescription
handle *C4D entity handle. Shapes: {kind:"object",name?|path?}, {kind:"render_data",name}, {kind:"take",name}, {kind:"material",name}, {kind:"layer",name}, {kind:"tag",object?|object_path?,type_id?,tag_name?}…
values *arrayWrites to apply. Wrapped in an undo group.

get_container Dump Raw BaseContainer

Dump the raw BaseContainer of a C4D entity (including hidden keys that don't show up in `describe`, e.g. Octane AOV shader slots at 3740/3741). Filter by key range to narrow output.

ParameterTypeDescription
handle *C4D entity handle. Shapes: {kind:"object",name?|path?}, {kind:"render_data",name}, {kind:"take",name}, {kind:"material",name}, {kind:"layer",name}, {kind:"tag",object?|object_path?,type_id?,tag_name?}…
id_fromintegerInclusive lower bound for container keys.
id_tointegerInclusive upper bound for container keys.

dump_shader Dump Shader Tree

Recursively dump a shader (resolved from a handle) into JSON. **Classical materials only** — node materials (Standard node space / Redshift / etc.) expose their shading as a maxon node graph; use `list_graph_nodes` / `apply_graph_description` for those instead. Captures type_id / type_name / name per node; promotes c4d.Xbitmap paths to a "file" field; heuristically surfaces image-like strings hiding in other shader BaseContainers as "file_candidates"; and expands shader links stored inside the container as "linked_shaders" (the shape used by Fusion / Colorizer whose internals don't appear vi…

ParameterTypeDescription
handle *C4D entity handle. Shapes: {kind:"object",name?|path?}, {kind:"render_data",name}, {kind:"take",name}, {kind:"material",name}, {kind:"layer",name}, {kind:"tag",object?|object_path?,type_id?,tag_name?}…
max_depthintegerMaximum recursion depth (default 5). 0 returns only the root node.

create_entity Create C4D Entity

Unified constructor for object / tag / material / shader / video_post. Handles parent linking, optional params, positions, and container slot assignment in one call. Returns the handle of the created entity (object handles include `path` for stable re-resolution) so you can chain set_params / set_keyframe. Note: `kind:"shader"` targets classical shader chains (Fusion, Colorizer, Xbitmap, …). For node-material edits (Standard node space / Redshift), use `apply_graph_description` instead. `kind:"video_post"` attaches a renderer effect (Octane 1029525, Redshift 1036219, Magic Bullet Looks 10547…

ParameterTypeDescription
kind *stringEntity kind to create.
type_id *Plugin id. Accepts a numeric id (c4d.Ocube=5159, c4d.Ttexture=5616, Octane renderer=1029525, …) or, for kind='object', an alias string: 'cube', 'sphere', 'cylinder', 'cone', 'torus', 'plane', 'disc'…
namestringOptional display name.
paramsobject{param_id: value} to set after allocation. Lists of 3 numbers become Vectors.
parentParent handle. Required for tag (owner object), shader (owner VideoPost / tag / material) and video_post (owner render_data). Optional for object (creates at scene root if omitted).
positionarrayRelative position [x,y,z] (objects only).
slotsarrayOwner BaseContainer slot ids to link the new shader into (e.g. [3740, 3741] for Octane AOV).

remove_entity Remove C4D Entity

Delete the resolved entity (wrapped in an undo step).

ParameterTypeDescription
handle *Entity to delete.

set_keyframe Set Keyframe

Create or update a single keyframe on a resolved entity's parameter. Supports scalar (real/long/bool) and vector (x/y/z component) parameters; the bridge infers the dtype from the entity's description, or you can override it explicitly. Creates the CTrack automatically on first use.

ParameterTypeDescription
frame *integerFrame number.
handle *Entity whose parameter gets the keyframe.
param_id *integerTop-level description id (e.g. c4d.ID_BASEOBJECT_REL_ROTATION = 904).
value *number | booleanValue at this frame (rotations in radians; bools coerce to 0/1).
componentstringSub-component for Vector params. For C4D rotation (HPB) use "x" for H, "y" for P, "z" for B.
dtypestringOverride the dtype when description lookup fails (rare).
fpsintegerTime base override (default: doc fps).
interpstringKey interpolation (default "spline").

set_document Set Document Settings

Update document-level settings: fps, frame range, current frame, active camera, active take. FPS and frame range are also mirrored onto the active render data.

ParameterTypeDescription
active_camerastringName of the camera object to set as scene camera.
active_takestringName of the take to make current (Main is always valid).
current_frameintegerMove playhead to this frame.
fpsintegerDocument FPS (also mirrored to active render data).
frame_endintegerDocument max time / loop-max in frames.
frame_startintegerDocument min time / loop-min in frames.

import_scene Import / Merge Scene File

Merge an external file (abc/fbx/obj/c4d/etc.) into the active document via MergeDocument. Returns the newly-imported top-level objects so they can be chained with set_params / create_entity / create_take. Optionally re-parents them under an existing object and renames the first root.

ParameterTypeDescription
path *stringAbsolute path to the file to merge (abc/fbx/obj/c4d/...).
filterstringScene filter (default "all").
parentOptional parent handle — newly-imported top-level objects are moved under this object.
renamestringOptional new name for the first imported top-level object.

create_render_data Create Render Data

Create (or update-if-exists) a RenderData with resolution / renderer / fps / frame range in one call. Returns the render_data handle for subsequent create_take / set_params chaining.

ParameterTypeDescription
name *stringRender data name (used as handle).
fpsintegerFrame rate (also disables Use Project Frame Rate).
frame_endintegerFrame range end.
frame_sequencestringFrame range mode (default "manual" when frame_start/end given).
frame_startintegerFrame range start.
heightintegerOutput height (pixels).
make_activebooleanMake this the active render data.
paramsobjectExtra {param_id: value} to apply (any RDATA_* id).
parentstringParent render_data name to nest under (default: top level).
rendererRenderer plugin id, or alias: "octane"/"standard"/"physical"/"redshift"/"cycles"/"viewport".
update_if_existsbooleanIf a render data with this name already exists, update it instead of creating.
widthintegerOutput width (pixels).

create_take Create / Update Take

Create or update a Take (AddTake + SetCamera + SetRenderData + SetChecked) in one call. New takes are checked by default so they participate in batch renders; pass `checked:false` to override. Returns the take handle — ideal for building per-shot take stacks programmatically.

ParameterTypeDescription
name *stringTake name (used as handle).
camerastringObject name to link as the take's camera override.
checkedbooleanChecked state for batch rendering (default true on create).
clear_camerabooleanExplicitly clear the camera override.
clear_render_databooleanExplicitly clear the render data override.
make_activebooleanMake this take the current take.
parentstringParent take name (default: Main).
render_datastringRender data name to link as the take's render settings override.
update_if_existsbooleanIf a take with this name already exists, update it instead of creating.

take_override Write Take Parameter Overrides

Write per-Take parameter overrides onto a target node (object / tag / material / render_data / video_post / shader). Wraps `take.OverrideNode + UpdateSceneNode + override[descid] = value`. Use this for shot-by-shot variations that share a single scene (e.g. override Focal Length per Take while one Camera is reused). Paths use the same syntax as `set_params`. If the scene's Take Manager has its "Lock Overrides" toggle off (which makes C4D refuse all override creation), the bridge enables it for the write and restores the artist's state afterward — reported as `lock_overrides_toggled` in the r…

ParameterTypeDescription
take *stringTake name (must not be Main).
target *Handle of the node to override.
cleararrayPaths to drop from the override (parameter reverts to scene value).
paramsobjectShorthand {pid: value} for flat writes (applied after `values`).
remove_allbooleanDrop the entire override for this target on this Take.
valuesarrayOverride writes — same path syntax as set_params.

create_marker Create Timeline Marker

Create a named timeline marker at a frame (or time in seconds), with optional colour and length, in one call (c4d.documents.AddMarker). Replaces the old workaround of seeking the playhead and firing the 'Create Marker at Current Frame' command, which could only drop unnamed markers. Returns the marker's info including its `index` handle for set_marker / remove_marker.

ParameterTypeDescription
colorarrayMarker colour as [r, g, b] floats in 0..1.
frameintegerFrame position (mutually exclusive with time_seconds).
length_framesintegerMarker length in frames (default 0 — a point marker).
namestringMarker label (default empty).
time_secondsnumberPosition in seconds (alternative to frame).

list_markers List Timeline Markers

Enumerate every timeline marker in the active document with its frame, time_seconds, name, colour and length_frames (c4d.documents.GetFirstMarker + GetNext). Each entry carries an `index` handle accepted by set_marker / remove_marker. Use this to verify marker placement — get_document_state only reports marker_count.

set_marker Edit Timeline Marker

Rename, recolour, move, or resize an existing timeline marker. Identify the target by exactly one of `index` (from list_markers — always unambiguous), `frame`, or `name` (the latter two error if several markers match). Pass at least one update field. Returns the updated marker's info.

ParameterTypeDescription
colorarrayNew colour as [r, g, b] floats in 0..1.
frameintegerTarget the marker at this frame (errors on ambiguity).
indexintegerTarget by position in the marker chain (see list_markers).
length_framesintegerNew marker length in frames.
namestringTarget by name (errors on ambiguity).
new_frameintegerMove the marker to this frame.
new_namestringNew label for the marker.
new_time_secondsnumberMove the marker to this time in seconds (mutually exclusive with new_frame).

remove_marker Remove Timeline Marker

Delete one timeline marker, or all of them. Pass `all:true` to clear every marker, or identify a single target by exactly one of `index` (from list_markers), `frame`, or `name` (the latter two error if several markers match). Returns `{removed: N}`.

ParameterTypeDescription
allbooleanRemove every marker (ignores the selectors below).
frameintegerTarget the marker at this frame (errors on ambiguity).
indexintegerTarget by position in the marker chain (see list_markers).
namestringTarget by name (errors on ambiguity).

sample_transform Sample Object Transform at Frames

Evaluate the scene at each requested frame and return the object's transform. Useful to verify alembic / constraint / xpresso-driven animation without writing a bespoke exec_python sampler.

ParameterTypeDescription
frames *arrayFrames to sample (1..500). The scene is evaluated at each frame via ExecutePasses.
handle *Target object handle (must resolve to a BaseObject).
formatstringOutput format: "off_rot" returns pos+rot(HPB radians); "matrix" returns 4x3 rows.
fpsintegerTime base override (default: doc fps).
restore_timebooleanRestore the original playhead after sampling (default true).
spacestringTransform space (default "global").

get_selection Get Active Selection

Read the active document's current selection: the active object (primary), all selected objects, and the active tag / material. Useful for reacting to the user's current focus without asking them to re-pick entities. Returns canonical handles so results can be piped directly into describe / set_params / etc.

set_selection Set Active Selection

Replace or extend the active document's selection. Pass `objects` (first becomes the active object), `tag`, or `material`. With `mode:'add'` the listed objects are added to the existing selection; with `mode:'replace'` (default) the prior selection is cleared first. `clear:true` deselects everything and ignores other fields.

ParameterTypeDescription
clearbooleanIf true, deselect everything and ignore other fields.
materialMaterial handle to set as active.
modestringApplies to `objects`. Default 'replace'.
objectsarrayObject handles to select. The first becomes the active object.
tagTag handle to set as active.

move_entity Move / Reparent / Reorder Node

Reparent a node under a new parent, promote it to the top of its hierarchy, or reorder it relative to a sibling. Works on objects, takes, and render_data — siblings/parents must share the moved node's kind. Exactly one destination field must be provided (`parent`, `before`, `after`, or `to_root:true`). For takes, `to_root:true` reparents under Main; the Main take itself cannot be moved. Returns the node's new canonical handle so follow-up edits remain stable.

clone_entity Clone Entity

Duplicate an entity. Supports object / tag / material / shader (via GetClone + parent insert), render_data (doc.InsertRenderData — copies VideoPosts too), video_post (rd.InsertVideoPost), and take (TakeData.AddTake, copying existing overrides). Objects default to dropping next to the source; pass `parent` to place the clone elsewhere. Returns a handle to the new entity.

ParameterTypeDescription
handle *Source entity to clone.
namestringOptional name for the clone.
parentFor objects: destination parent (defaults to source's sibling). For tags: required owner object. For shaders: required owner. For video_post: target render_data (defaults to source's host). For take:…

modeling_command Modeling Command

Run a Cinema 4D modeling operation via c4d.utils.SendModelingCommand on one or more target objects. Commands that produce new geometry (Current State to Object, Connect / Join, Split, Explode Segments) return handles to the inserted results; in-place commands (Make Editable, Subdivide, Triangulate, …) return the mutated targets. Aliases: current_state_to_object / cso, make_editable, connect / join, connect_delete, subdivide, triangulate, untriangulate, reverse_normals, align_normals, optimize, center_axis, split, explode_segments, melt, collapse, dissolve.

ParameterTypeDescription
command *Alias (see description) or raw MCOMMAND_* integer.
targets *arrayTarget object handles.
modestringMODELINGCOMMANDMODE_* selector. Default 'all'.
paramsobjectOptional BaseContainer params for the command (e.g. subdivision level).

get_mesh Get Mesh

Read points and polygons (or spline segments) from an editable PointObject / PolygonObject / SplineObject. Primitives (Cube, Sphere, …) must be converted first via `modeling_command` make_editable. Triangles are returned as [a,b,c] (c==d in C4D storage), quads as [a,b,c,d]. Point and polygon counts are capped to 50,000 by default to protect JSON payload size — override via max_points / max_polys.

ParameterTypeDescription
handle *Target object (must be editable).
includearrayOptional extras. 'normals' adds phong-shaded vertex normals. 'selections' adds `point_selection` / `poly_selection` / `edge_selection` index lists.
max_pointsintegerDefault 50000.
max_polysintegerDefault 50000.

set_mesh Set Mesh

Overwrite the points (and optionally polygons) of an editable object. Triangles may be passed as [a,b,c]; the bridge expands them to C4D's quad storage (a,b,c,c). If polygons is omitted, only points are rewritten and the count must match the existing topology. Wrapped in a single undo entry.

ParameterTypeDescription
handle *Target editable object.
points *arrayNew point positions.
polygonsarrayNew polygon indices. [a,b,c] = triangle, [a,b,c,d] = quad.

set_mesh_selection Set Mesh Selection

Replace the point / polygon / edge BaseSelect on an editable mesh. Existing selection of the specified kind is cleared first. Pair with `get_mesh` using `include:['selections']` to read the same channels back.

ParameterTypeDescription
handle *Editable target (PointObject / PolygonObject).
indices *arrayIndices to mark selected.
kind *stringWhich selection channel to replace.

save_document Save Document

Save the active document to disk. Path must be absolute; the parent directory must exist. Supported formats: c4d (default), abc / alembic, fbx, obj, stl, ply, usd / usda, gltf. With `copy:true` the document's internal name/path is left unchanged (Save-As-Copy behaviour).

ParameterTypeDescription
path *stringAbsolute output path.
copybooleanSave as copy — document's active path/name stays unchanged. Default false.
formatstringExport format alias. Default 'c4d'.

open_document Open Document

Load a Cinema 4D scene file as a new document. Unlike `import_scene` (which merges into the current doc), this opens the file as its own document. Pass `make_active:true` (default) to switch focus to the loaded document. Differs from `import_scene` which calls MergeDocument.

ParameterTypeDescription
path *stringAbsolute path to a loadable scene file.
make_activebooleanSwitch the active document to the newly loaded one. Default true.

new_document New Document

Insert a fresh empty BaseDocument into C4D's document list and (by default) switch focus to it. Useful for starting a clean scene without overwriting the current one.

ParameterTypeDescription
make_activebooleanSwitch the active document to the new one. Default true.
namestringOptional display name for the new document.

list_documents List Documents

Enumerate the documents currently open in Cinema 4D. Each entry has its list `index` (the handle accepted by `set_active_document`), name, path and whether it is the active document. `get_document_state` only reports the active document; this is how you discover the others before switching.

set_active_document Set Active Document

Switch focus to an already-open document, identified by its list `index` (from `list_documents`) or `name`. Pass exactly one of the two. `name` errors if it matches zero or several open documents — use `index` to disambiguate. This only switches between documents already open; use `open_document` to load a file from disk.

ParameterTypeDescription
indexinteger0-based position in the document list (see `list_documents`).
namestringDocument name; errors if it matches zero or several open documents.

close_document Close Document

Close an open document, identified by its list `index` (from `list_documents`) or `name`. Pass exactly one of the two. A document with unsaved changes is refused unless `force:true` — closing discards unsaved work without a prompt (unlike the GUI close). C4D always keeps at least one document, so closing the last one leaves a fresh empty document active.

ParameterTypeDescription
forcebooleanClose even with unsaved changes, discarding them. Default false.
indexinteger0-based position in the document list (see `list_documents`).
namestringDocument name; errors if it matches zero or several open documents.

list_graph_nodes List Node Material Graph Nodes

Walk a node graph and return a flat list of nodes. Target either a node-based material (via `handle`) or the active document's scene-nodes graph (via `scope:'document'`). `supported:false` comes back when the maxon framework is unavailable or no graph exists in the requested space.

ParameterTypeDescription
handleMaterial handle. Required unless `scope:'document'`.
node_spacestringAlias 'standard' | 'redshift' | 'scenenodes' / 'neutron' or a fully-qualified maxon.Id. Default 'standard' (materials) or 'scenenodes' (document).
scopestringSet to 'document' to target the scene-nodes (neutron) graph.

list_graph_node_assets List Node Graph Asset Types

Enumerate registered node-template asset ids for a node space — the ids you pass to `apply_graph_description` as `$type`. For the scene-nodes (neutron) space, results are filtered to the templates actually addable there (e.g. 'net.maxon.node.invert', 'net.maxon.node.access.composecolor64'); note these differ from the net.maxon.corenode:* ids that `list_graph_nodes` reports for existing nodes. `supported:false` comes back when the C4D build lacks the maxon framework.

ParameterTypeDescription
node_spacestringAlias 'standard' | 'redshift' | 'scenenodes' (a.k.a. 'neutron') or a fully-qualified maxon.Id. Default 'standard'.

get_graph_info Get Node Material Graph Info

Report which node spaces a material exposes a graph in, which one is currently active, and the alias table the bridge understands. Use this before `apply_graph_description` to confirm the right `node_space` is addressable on this build / material.

ParameterTypeDescription
handle *Material handle.

apply_graph_description Apply Node Graph Description

Build or mutate a node graph using maxon.GraphDescription's declarative dict syntax. Supports creating nodes (`$type`), assigning stable ids (`$id`), wiring connections via 'thisPort -> childPort' keys (the value is the nested upstream node), and setting port values inline. Example: {"$type":"Output","Surface -> outColor":{"$type":"Standard Material","$id":"mat","Base/Color":[1,0,0]}}. Works for material graphs (standard/redshift) and the scene-nodes (neutron) document graph via `scope:"document"`. For scene-nodes, `$type` must be a node-template asset id from `list_graph_node_assets` (node_sp…

ParameterTypeDescription
description *objectmaxon.GraphDescription dict (nested; $type / $id / '->' keys).
create_graphbooleanCreate the graph if missing. Default true.
handleMaterial handle. Required unless `scope:'document'`.
node_spacestringAlias 'standard' | 'redshift' | 'scenenodes' or a maxon.Id. Default 'standard' for materials, 'scenenodes' for document scope.
scopestringTarget the active document's scene-nodes graph instead of a material.

set_graph_port Set Node Graph Port Value

Update a single port on a node addressable by its stable $id within a node material graph. Thin convenience over apply_graph_description: internally builds a {$query:{$id:node_id}, port: value} payload. Lists of 3 numbers are coerced to maxon.Vector for vector-typed ports.

ParameterTypeDescription
node_id *stringThe $id assigned to the target node.
port *stringPort path, e.g. 'Base/Metalness' or 'Image/Custom Gamma'.
value *New port value. [x,y,z] is passed as maxon.Vector.
handleMaterial handle. Required unless `scope:'document'`.
node_spacestringAlias 'standard' | 'redshift' | 'scenenodes' or maxon.Id. Default 'standard'.
scopestringTarget the scene-nodes graph on the active document.

remove_graph_node Remove Node Graph Node

Delete a node by id from a node-material graph. The id must match the node's stable maxon.Id (as reported by list_graph_nodes or assigned via $id in apply_graph_description).

ParameterTypeDescription
node_id *stringThe id of the node to remove.
handleMaterial handle. Required unless `scope:'document'`.
node_spacestringAlias 'standard' | 'redshift' | 'scenenodes' or maxon.Id. Default 'standard'.
scopestringTarget the scene-nodes graph on the active document.

list_xpresso_nodes List Xpresso Graph Nodes

Walk an Xpresso (Texpresso / GvNodeMaster) tag and return a flat list of its GvNodes. Each entry carries a stable dotted-index path id ('0.2' = root's first child, its third child) plus port summaries. Use the id to address nodes from `apply_xpresso_graph`, `set_xpresso_port`, `remove_xpresso_node`, or any handle-taking tool via `{kind:'gv_node', tag, id}`. Accepts either a tag handle (Texpresso) or an object handle (uses that object's first Texpresso tag).

ParameterTypeDescription
handle *Xpresso tag handle or host object handle.

apply_xpresso_graph Apply Xpresso Graph Description

Declarative builder for an Xpresso (classic GvNodeMaster) graph — mirror of `apply_graph_description` but for Xpresso rather than Maxon node materials. Creates nodes (CreateNode) and wires connections (GvPort.Connect) in one call. Accepts an operator_id as an int (e.g. c4d.ID_OPERATOR_CONST=1001150) or short alias ('object'|'const'|'result'|'math'|'range_mapper'|'condition'|'compare'|'memory'|'iterate'|'bool'|'freeze'|'formula'|'realtovect'|'vecttoreal'|'matrix2vect'|'vect2matrix'|'link'|'spy'|'python'). Optionally creates the Texpresso tag when given an object handle and `create_tag_if_miss…

set_xpresso_port Edit Xpresso Port

Low-level Xpresso port primitive — covers cases `apply_xpresso_graph` can't express. `action:'add'` adds a new input/output port via GvNode.AddPort(port_id). `connect` wires this node's `port` to `target` (on a peer node identified by `target.node_handle`); output-vs-input direction is auto-detected. `disconnect` removes incoming connections from `port`. `set_value` writes the port's default. `remove` deletes the port. Use `list_xpresso_nodes` first to discover node path ids and existing ports.

ParameterTypeDescription
action *stringOperation to perform.
node *gv_node handle for the operated-on GvNode.
iostringDirection for `add`.
portobjectTarget port selector. Required for remove / connect / disconnect / set_value.
port_idintegerPort main id passed to GvNode.AddPort (required for `add`).
targetobjectPeer port selector (with its node_handle). Required for connect.
valueNew default value for `set_value`. [x,y,z] is coerced to c4d.Vector.

remove_xpresso_node Remove Xpresso Graph Node

Delete a GvNode from an Xpresso graph. The handle must be a gv_node handle pointing at the target (use `list_xpresso_nodes` to discover its path id). All incoming / outgoing connections on the node are severed automatically.

ParameterTypeDescription
handle *gv_node handle for the node to remove.

assign_material Assign Material (Texture Tag)

Link a material to an object by creating a Texture tag (or updating an existing one when `update_if_exists:true`). Avoids wrangling TEXTURETAG_* param ids by hand. Projection aliases: spherical, cylindrical, flat, cubic, frontal, spatial, uvw, shrinkwrap, camera.

ParameterTypeDescription
material *Material to assign.
object *Target object.
namestringOptional display name for the Texture tag.
projectionstringProjection alias. Omit to preserve the existing projection.
restrict_to_selectionstringPolygon-selection tag name to restrict this texture to.
update_if_existsbooleanIf a Texture tag already exists on the object, update it in place instead of appending. Default false.
uv_offsetarray[u, v] offset applied to TEXTURETAG_OFFSETX/Y.
uv_tilesarray[u, v] tile count applied to TEXTURETAG_TILESX/Y.

set_transform Set Object Transform

Write an object's transform in local or global space. Pass any combination of `pos`/`rot` (HPB radians)/`scale` to patch individual components — unspecified parts keep their current value. Or pass a full 4x3 `matrix` (rows: offset, v1, v2, v3) to replace the whole transform; matrix is mutually exclusive with the decomposed fields. Space defaults to 'local' (SetMl). Use 'global' (SetMg) to write world coordinates through a parent.

ParameterTypeDescription
handle *Target object.
matrixarray4x3 matrix as [offset, v1, v2, v3]. Exclusive with pos/rot/scale.
posarray[x, y, z].
rotarray[heading, pitch, bank] in radians.
scalearray[sx, sy, sz].
spacestringDefault 'local'.

add_user_data Add User Data Slot

Add a new User Data slot to any BaseList2D (common rigging / control-exposure pattern). Returns the slot's DescID (as a nested list) which can be piped into `get_params` / `set_params` as a path. dtype aliases: real, long, bool, vector, string, color, filename, time, link.

ParameterTypeDescription
dtype *stringUser-data dtype.
handle *Target (object / tag / material / etc.).
name *stringDisplay name for the new UD slot.
defaultDefault stored on the descriptor.
maxnumberNumeric upper bound (real / long).
minnumberNumeric lower bound (real / long).
stepnumberSpinner step size.
valueInitial value. For vector / color, pass [x,y,z].

list_user_data List User Data

Enumerate the User Data slots on a target. Each entry carries `{desc_id, name, dtype, value}`. Feed `desc_id` back into `remove_user_data` / `get_params` / `set_params` as a DescID path.

ParameterTypeDescription
handle *Target to inspect.

remove_user_data Remove User Data Slot

Delete a User Data slot by its DescID path (as returned by `list_user_data` or `add_user_data`). Wrapped in undo.

ParameterTypeDescription
desc_id *arrayDescID path — list of [id, dtype, creator?] levels.
handle *Target.

list_mograph_clones List MoGraph Clones

Read the per-clone transforms from a MoGraph generator (Cloner / Matrix / Tracer / …). The bridge forces a scene pass so the MoData array is populated before sampling. Returns `{count, returned, clones: [{index, pos, matrix?}]}`. `supported:false` when the build lacks c4d.modules.mograph or when the handle isn't a MoGraph generator.

ParameterTypeDescription
handle *MoGraph generator (e.g. Omgcloner).
include_matrixbooleanInclude the 4x3 matrix per clone. Default true.
max_countintegerCap on clones returned. Default 2048.

list_tracks List Animation Tracks

Enumerate CTracks on the resolved entity. Returns `{name, param_id, component, dtype, key_count}` per track so callers can pipe the results straight into get_keyframes / set_keyframe. Vector tracks (Position, Rotation, Scale) surface as separate entries per component.

ParameterTypeDescription
handle *Entity whose animation tracks to enumerate.

get_keyframes Get Keyframes

Read the keys on a specific animation track. Combine with list_tracks to discover which (param_id, component) pairs are animated. Returns `[{frame, value, interp}]`. Optional start_frame / end_frame clip the range inclusively.

ParameterTypeDescription
handle *Animated entity.
param_id *integerTop-level description id of the parameter.
componentSub-component for vector parameters. Omit / null for scalar tracks.
end_frameintegerInclusive upper frame bound.
fpsintegerOverride for BaseTime → frame conversion.
start_frameintegerInclusive lower frame bound.

delete_keyframe Delete Keyframe

Remove keys from a CTrack. Pass `frame` for a single-frame delete, or `start_frame` / `end_frame` (inclusive) for a range. Returns `{removed, track}`. Symmetric with `set_keyframe`.

ParameterTypeDescription
handle *Animated target.
param_id *integerTop-level description id.
componentVector sub-component. null / omitted for scalar tracks.
end_frameintegerInclusive upper bound.
fpsintegerOverride for BaseTime conversion.
frameintegerSingle frame to remove.
start_frameintegerInclusive lower bound.

delete_track Delete Animation Track

Remove an entire CTrack (identified by `param_id` + optional `component`) from the target. Returns `{removed: bool}`.

ParameterTypeDescription
handle *Animated target.
param_id *integerTop-level description id.
componentVector sub-component. null / omitted for scalar tracks.

list_layers List Layers

Enumerate every LayerObject in the active document. Each entry returns the layer's name, optional color [r,g,b], and its flag dict (solo / view / render / manager / locked / generators / deformers / expressions / animation / xref).

create_layer Create Layer

Create a LayerObject at the document's layer root. With `update_if_exists:true` the existing layer with the same name is updated in place (idempotent). Pass `color:[r,g,b]` (0..1) and/or `flags:{solo,view,render,manager,locked,...}` to configure it.

ParameterTypeDescription
name *stringLayer display name (also used for lookup).
colorarray[r,g,b] in 0..1.
flagsobjectInitial flag values.
update_if_existsbooleanIdempotent update. Default false.

assign_to_layer Assign To Layer

Place a target (object / tag / material) on a named layer. Pass `layer:null` to clear the assignment. The layer must exist — call `create_layer` first if needed.

ParameterTypeDescription
layer *string | nullLayer name, or null to clear.
target *Entity to assign.

get_object_layer Get Object's Layer

Return the layer currently assigned to a target entity (object / tag / material), or null if unassigned.

ParameterTypeDescription
target *Entity to query.

set_layer_flags Set Layer Flags

Toggle a layer's visibility / render / lock flags in one call. Only fields explicitly passed are modified; omitted flags keep their current value. `flags` returned in the response reflects the post-update state.

ParameterTypeDescription
layer *stringLayer name (required).
animationboolean
colorarrayOptional color update as [r,g,b] in 0..1.
deformersboolean
expressionsboolean
generatorsboolean
lockedboolean
managerboolean
renderboolean
soloboolean
viewboolean
xrefboolean

get_document_state Get Document State

One-shot reader for the active document's key fields: fps, min/max and loop frame range, current frame, document name/path, canonical handles for the active camera / take / render data, and `marker_count` (how many timeline markers exist — list them with list_markers). Pairs with `set_document` for the writer side.