apply_shader
Create and apply specialized shader materials like noise, gradient, or fresnel to objects in Cinema 4D scenes for enhanced visual effects.
Instructions
Create and apply a specialized shader material.
Args:
shader_type: Type of shader (noise, gradient, fresnel, etc)
material_name: Optional name of material to apply shader to
object_name: Optional name of object to apply the material toInput Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shader_type | Yes | ||
| material_name | No | ||
| object_name | No |
Implementation Reference
- src/cinema4d_mcp/server.py:970-997 (handler)The handler function `apply_shader` executes the shader application logic by sending a command to the Cinema 4D connection.
async def apply_shader( shader_type: str, material_name: Optional[str] = None, object_name: Optional[str] = None, ctx: Context = None, ) -> str: """ Create and apply a specialized shader material. Args: shader_type: Type of shader (noise, gradient, fresnel, etc) material_name: Optional name of material to apply shader to object_name: Optional name of object to apply the material to """ async with c4d_connection_context() as connection: if not connection.connected: return "❌ Not connected to Cinema 4D" command = {"command": "apply_shader", "shader_type": shader_type} if material_name: command["material_name"] = material_name if object_name: command["object_name"] = object_name response = send_to_c4d(connection, command) return format_c4d_response(response, "apply_shader") - src/cinema4d_mcp/server.py:969-970 (registration)The `apply_shader` tool is registered using the `@mcp.tool()` decorator.
@mcp.tool() async def apply_shader(