Skip to main content
Glama

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 properties

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
colorNo
propertiesNo

Implementation Reference

  • 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")
  • Registration of the create_material tool using the @mcp.tool() decorator.
    @mcp.tool()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ttiimmaacc/cinema4d-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server