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
| Name | Required | Description | Default |
|---|---|---|---|
| text_prompt | No | ||
| input_image_url | No |
Implementation Reference
- src/blender_mcp/server.py:904-939 (handler)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)}"