Skip to main content
Glama

render_frame

Render the current frame in Cinema 4D with customizable output path and dimensions for 3D scene visualization.

Instructions

Render the current frame.

Args:
    output_path: Optional path to save the rendered image
    width: Optional render width in pixels
    height: Optional render height in pixels

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_pathNo
widthNo
heightNo

Implementation Reference

  • The 'render_frame' tool is defined as an async function decorated with @mcp.tool(). It validates connection to Cinema 4D, prepares a command dictionary, and sends it via 'send_to_c4d'.
    async def render_frame(
        output_path: Optional[str] = None,
        width: Optional[int] = None,
        height: Optional[int] = None,
        ctx: Context = None,
    ) -> str:
        """
        Render the current frame.
    
        Args:
            output_path: Optional path to save the rendered image
            width: Optional render width in pixels
            height: Optional render height in pixels
        """
        async with c4d_connection_context() as connection:
            if not connection.connected:
                return "❌ Not connected to Cinema 4D"
    
            # Prepare command
            command = {"command": "render_frame"}
    
            if output_path:
                command["output_path"] = output_path
            if width:
                command["width"] = width
            if height:
                command["height"] = height
    
            # Send command to Cinema 4D
            response = send_to_c4d(connection, command)
            return format_c4d_response(response, "render_frame")

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