create_camera
Add a camera to Cinema 4D scenes with custom name, position, and properties like focal length for 3D modeling and rendering.
Instructions
Create a new camera in the scene.
Args:
name: Optional name for the new camera.
position: Optional [x, y, z] position.
properties: Optional dictionary of camera properties (e.g., {"focal_length": 50}).Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| position | No | ||
| properties | No |
Implementation Reference
- src/cinema4d_mcp/server.py:911-942 (handler)The handler function `create_camera` which builds the command and sends it to the Cinema 4D connection.
async def create_camera( name: Optional[str] = None, position: Optional[List[float]] = None, properties: Optional[Dict[str, Any]] = None, ctx: Context = None, ) -> str: """ Create a new camera in the scene. Args: name: Optional name for the new camera. position: Optional [x, y, z] position. properties: Optional dictionary of camera properties (e.g., {"focal_length": 50}). """ requested_name = name async with c4d_connection_context() as connection: if not connection.connected: return "❌ Not connected to Cinema 4D" command = {"command": "create_camera"} if requested_name: command["name"] = ( requested_name # Use the 'name' key expected by the handler ) if position: command["position"] = position if properties: command["properties"] = properties response = send_to_c4d(connection, command) return format_c4d_response(response, "create_camera") - src/cinema4d_mcp/server.py:910-911 (registration)Tool registration using the @mcp.tool() decorator.
@mcp.tool() async def create_camera(