Skip to main content
Glama
opslon

BlenderMCP

by opslon

generate_hunyuan3d_model

Create 3D assets with built-in materials using text descriptions or image references, then import them directly into Blender for 3D modeling workflows.

Instructions

Generate 3D asset using Hunyuan3D by providing either text description, image reference, or both for the desired asset, and import the asset into Blender. The 3D asset has built-in materials.

Parameters:

  • text_prompt: (Optional) A short description of the desired model in English/Chinese.

  • input_image_url: (Optional) The local or remote url of the input image. Accepts None if only using text prompt.

Returns:

  • When successful, returns a JSON with job_id (format: "job_xxx") indicating the task is in progress

  • When the job completes, the status will change to "DONE" indicating the model has been imported

  • Returns error message if the operation fails

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
text_promptNo
input_image_urlNo

Implementation Reference

  • Handler function for generating Hunyuan3D models, sends a command to the Blender server to create a job.
    def generate_hunyuan3d_model(
        ctx: Context,
        text_prompt: str = None,
        input_image_url: str = None
    ) -> str:
        """
        Generate 3D asset using Hunyuan3D by providing either text description, image reference, 
        or both for the desired asset, and import the asset into Blender.
        The 3D asset has built-in materials.
        
        Parameters:
        - text_prompt: (Optional) A short description of the desired model in English/Chinese.
        - input_image_url: (Optional) The local or remote url of the input image. Accepts None if only using text prompt.
    
        Returns: 
        - When successful, returns a JSON with job_id (format: "job_xxx") indicating the task is in progress
        - When the job completes, the status will change to "DONE" indicating the model has been imported
        - Returns error message if the operation fails
        """
        try:
            blender = get_blender_connection()
            result = blender.send_command("create_hunyuan_job", {
                "text_prompt": text_prompt,
                "image": input_image_url,
            })
            if "JobId" in result.get("Response", {}):
                job_id = result["Response"]["JobId"]
                formatted_job_id = f"job_{job_id}"
                return json.dumps({
                    "job_id": formatted_job_id,
                })
            return json.dumps(result)
        except Exception as e:
            logger.error(f"Error generating Hunyuan3D task: {str(e)}")
            return f"Error generating Hunyuan3D task: {str(e)}"

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/opslon/blender-mcp-optimized'

If you have feedback or need assistance with the MCP directory API, please join our Discord server