Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameNo
positionNo
propertiesNo

Implementation Reference

  • 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")
  • Tool registration using the @mcp.tool() decorator.
    @mcp.tool()
    async def create_camera(

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