add_effector
Add MoGraph effectors like random, shader, or field types to manipulate object properties in Cinema 4D scenes.
Instructions
Add a MoGraph Effector to the scene.
Args:
effector_type: Type of effector (random, shader, field)
name: Optional name for the effector
target: Optional target object (e.g., cloner) to apply the effector toInput Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| effector_type | Yes | ||
| name | No | ||
| target | No |
Implementation Reference
- src/cinema4d_mcp/server.py:766-794 (handler)The `add_effector` tool handler implementation, which validates connection and sends the 'add_effector' command to Cinema 4D. It is registered via `@mcp.tool()`.
@mcp.tool() async def add_effector( effector_type: str, name: Optional[str] = None, target: Optional[str] = None, ctx: Context = None, ) -> str: """ Add a MoGraph Effector to the scene. Args: effector_type: Type of effector (random, shader, field) name: Optional name for the effector target: Optional target object (e.g., cloner) to apply the effector to """ async with c4d_connection_context() as connection: if not connection.connected: return "❌ Not connected to Cinema 4D" command = {"command": "add_effector", "effector_type": effector_type} if name: command["effector_name"] = name if target: command["cloner_name"] = target response = send_to_c4d(connection, command) return format_c4d_response(response, "add_effector")