create_material
Create a new material in Cinema 4D with customizable name, color, and properties for 3D modeling and scene manipulation.
Instructions
Create a new material in Cinema 4D.
Args:
name: Name for the new material
color: Optional [R, G, B] color (values 0-1)
properties: Optional additional material propertiesInput Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| color | No | ||
| properties | No |
Implementation Reference
- src/cinema4d_mcp/server.py:529-558 (handler)The create_material handler function which prepares and sends the creation command to the Cinema 4D instance.
async def create_material( name: str, color: Optional[List[float]] = None, properties: Optional[Dict[str, Any]] = None, ctx: Context = None, ) -> str: """ Create a new material in Cinema 4D. Args: name: Name for the new material color: Optional [R, G, B] color (values 0-1) properties: Optional additional material properties """ async with c4d_connection_context() as connection: if not connection.connected: return "❌ Not connected to Cinema 4D" # Prepare command command = {"command": "create_material", "material_name": name} if color: command["color"] = color if properties: command["properties"] = properties # Send command to Cinema 4D response = send_to_c4d(connection, command) return format_c4d_response(response, "create_material") - src/cinema4d_mcp/server.py:528-528 (registration)Registration of the create_material tool using the @mcp.tool() decorator.
@mcp.tool()