Dump Shader Tree
dump_shaderRecursively dump a classical Cinema 4D shader into JSON from its entity handle, capturing texture paths and linked shaders.
Instructions
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 via GetDown). Pair with list_entities kind=shader to discover shader handles.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| handle | Yes | C4D entity handle. Shapes: {kind:"object",name?|path?}, {kind:"render_data",name}, {kind:"take",name}, {kind:"material",name}, {kind:"tag",object?|object_path?,type_id?,tag_name?}, {kind:"video_post",render_data,type_id}, {kind:"shader",owner:<handle>,index}, {kind:"gv_node",tag:<tag handle>,id?|name?} (Xpresso GvNode; use list_xpresso_nodes to discover stable path ids — GvNode inherits BaseList2D so set_params/get_params/describe work on it), {kind:"plugin_options",plugin_id,plugin_type?} (plugin_id accepts an int or a format alias like "abc"/"fbx"/"obj"/"usd"/"gltf"; plugin_type defaults to "scene_saver"; resolves to the plugin's settings BaseList2D — describe+set_params it to configure exporter options before save_document). Prefer `path` over `name` when names are not unique. For this tool, pass a shader handle such as {kind:"shader", owner:<material handle>, index:0}. | |
| max_depth | No | Maximum recursion depth (default 5). 0 returns only the root node. |