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 toInput Schema
TableJSON 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, {