{"id":28646869,"url":"https://github.com/victordibia/blenderlm","last_synced_at":"2025-07-15T05:34:06.002Z","repository":{"id":297374268,"uuid":"946935762","full_name":"victordibia/blenderlm","owner":"victordibia","description":"BlenderLM is a Python package that enables LLMs (Large Language Models) to control and interact with Blender, the open-source 3D creation suite. ","archived":false,"fork":false,"pushed_at":"2025-06-05T05:49:15.000Z","size":474,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T07:44:03.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/victordibia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-11T22:55:09.000Z","updated_at":"2025-06-05T05:49:18.000Z","dependencies_parsed_at":"2025-06-06T18:30:41.365Z","dependency_job_id":null,"html_url":"https://github.com/victordibia/blenderlm","commit_stats":null,"previous_names":["victordibia/blenderlm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/victordibia/blenderlm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victordibia%2Fblenderlm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victordibia%2Fblenderlm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victordibia%2Fblenderlm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victordibia%2Fblenderlm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victordibia","download_url":"https://codeload.github.com/victordibia/blenderlm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victordibia%2Fblenderlm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259565576,"owners_count":22877348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-13T02:08:16.266Z","updated_at":"2025-06-13T02:08:19.470Z","avatar_url":"https://github.com/victordibia.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BlenderLM\n\n\u003cimg src=\"https://raw.githubusercontent.com/victordibia/blenderlm/main/docs/icon.png\" width=\"100\" height=\"100\" alt=\"BlenderLM Logo\" style=\"padding-bottom: 10px;\"\u003e\n\n\u003c!-- [![PyPI version](https://badge.fury.io/py/blenderlm.svg)](https://pypi.org/project/blenderlm/) --\u003e\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n\u003e Note: This is a sample project I built as part of a talk (it may not be maintained going forward).\n\nBlenderLM is a Python sample app that enables LLMs (Large Language Models) to control and interact with Blender, the open-source 3D creation suite. It provides a clean API and tools designed specifically for use with LLM agent frameworks like Autogen/GoogleADK/CrewAI.\n\n## Features\n\n- REST API for controlling Blender programmatically\n- Ready-to-use tools for LLM agents\n- Support for creating, modifying, and manipulating 3D objects\n- Material and scene management\n- Web UI for intuitive interaction (optional)\n\n## Installation\n\n```bash\n# Install the base package\npip install blenderlm\n```\n\n## Architecture\n\nBlenderLM consists of three main components:\n\n1. **Blender Addon**: A Blender addon that exposes Blender functionality via a socket server\n2. **API Server**: A FastAPI server that communicates with the Blender addon and provides a REST API\n3. **Client Library**: Python client and tools for interacting with the API server (with Autogen integration)\n\n## Blender Addon Setup\n\n1. Install the BlenderLM addon in Blender:\n\n   - Download the Blender addon file from the `addon` directory\n   - In Blender, go to Edit \u003e Preferences \u003e Add-ons \u003e Install\n   - Select the downloaded file and click \"Install Add-on\"\n   - Enable the addon by checking the box next to \"Interface: BlenderLM\"\n\n2. Start the Blender addon server:\n   - In Blender, go to the sidebar (N key)\n   - Find the \"BlenderLM\" tab\n   - Set the port (default: 9876)\n   - Click \"Start Server\"\n\n## Usage\n\n### Starting the BlenderLM Server\n\n```bash\n# Start the server\nblenderlm serve --port 8000 --blender-port 9876\n```\n\n### Interacting with BlenderLM\n\nYou can interact with BlenderLM using the provided client library. Below is an example of how to create a simple agent that uses BlenderLM tools to create a 3D object in Blender.\n\n```python\nimport asyncio\nfrom blenderlm.client.agents import OpenAIAgent\nfrom blenderlm.client import get_blender_tools\nfrom blenderlm.client.agents import AgentMessage\n\nasync def main():\n    blender_tool_functions = await get_blender_tools()\n\n    # Instantiate the agent, passing the tool functions\n    agent = OpenAIAgent(\n        tools=blender_tool_functions,\n        model_name=\"gpt-4.1-mini\",\n    )\n\n    updates =   agent.run_stream(\n        task=\"Create a low poly well with the right materials and colors.\",\n    )\n    async for update in updates:\n        if isinstance(update, AgentMessage):\n            print(update.role,\":\", update.content, str(update.metadata))\n        else:\n            print(update.role,\":\", update.content)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n\n```\n\n## Available Tools\n\nBlenderLM provides the following tools:\n\n- **Object Creation**: Create 3D primitives (cube, sphere, cylinder, etc.)\n- **Object Manipulation**: Move, rotate, and scale objects\n- **Material Management**: Create and apply materials\n- **Scene Management**: Manage the 3D scene\n- **Rendering**: Render the scene to an image\n\n## Command Line Interface\n\n```bash\n# Show help\nblenderlm --help\n\n# Show version\nblenderlm version\n\n# Start the server\nblenderlm serve --port 8000 --blender-port 9876\n\n# Test connection\nblenderlm test\n\n```\n\n## Security Note\n\nThe BlenderLM addon opens a socket server that accepts and executes commands. Only use it on trusted networks as it has no authentication mechanism by default.\n\n## License\n\nMIT\n\n## Acknowledgement\n\nInspired by [blender-mcp](https://github.com/ahujasid/blender-mcp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictordibia%2Fblenderlm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictordibia%2Fblenderlm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictordibia%2Fblenderlm/lists"}