apply_material
Assign materials to 3D objects in Cinema 4D by specifying material and object names for scene texturing.
Instructions
Apply a material to an object.
Args:
material_name: Name of the material to apply
object_name: Name of the object to apply the material to
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"material_name": "<material_name>",
"object_name": "<object_name>"
},
"name": "apply_material"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| material_name | Yes | ||
| object_name | Yes |
Implementation Reference
- src/cinema4d_mcp/server.py:561-576 (handler)The handler function for the apply_material tool, which manages connection to Cinema 4D and dispatches the command.
async def apply_material(material_name: str, object_name: str, ctx: Context) -> str: """ Apply a material to an object. Args: material_name: Name of the material to apply object_name: Name of the object to apply the material to """ async with c4d_connection_context() as connection: if not connection.connected: return "❌ Not connected to Cinema 4D" # Send command to Cinema 4D response = send_to_c4d( connection, {