updated README
This commit is contained in:
parent
6599b225d3
commit
40a8334b97
@ -101,12 +101,16 @@ Once the config file has been set on Claude, and the addon is running on Blender
|
|||||||
- `delete_object` - Remove an object from the scene
|
- `delete_object` - Remove an object from the scene
|
||||||
- `set_material` - Apply or create materials for objects
|
- `set_material` - Apply or create materials for objects
|
||||||
- `execute_blender_code` - Run any Python code in Blender
|
- `execute_blender_code` - Run any Python code in Blender
|
||||||
|
- `get_polyhaven_categories` - Get a list of categories for PolyHaven assets (HDRIs, textures, models)
|
||||||
|
- `search_polyhaven_assets` - Search for assets on PolyHaven with optional category filtering
|
||||||
|
- `download_polyhaven_asset` - Download and import a PolyHaven asset into Blender
|
||||||
|
|
||||||
### Example Commands
|
### Example Commands
|
||||||
|
|
||||||
Here are some examples of what you can ask Claude to do:
|
Here are some examples of what you can ask Claude to do:
|
||||||
|
|
||||||
- "Create a low poly scene in a dungeon, with a dragon guarding a pot of gold" [Demo](https://www.youtube.com/watch?v=DqgKuLYUv00)
|
- "Create a low poly scene in a dungeon, with a dragon guarding a pot of gold" [Demo](https://www.youtube.com/watch?v=DqgKuLYUv00)
|
||||||
|
- "Create a beach vibe using HDRIs, textures, and models like rocks and vegatation from Poly Haven"
|
||||||
- Give a reference image, and create a Blender scene out of it [Demo](https://www.youtube.com/watch?v=FDRb03XPiRo)
|
- Give a reference image, and create a Blender scene out of it [Demo](https://www.youtube.com/watch?v=FDRb03XPiRo)
|
||||||
- "Get information about the current scene, and make a threejs sketch from it" [Demo](https://www.youtube.com/watch?v=jxbNI5L7AH8)
|
- "Get information about the current scene, and make a threejs sketch from it" [Demo](https://www.youtube.com/watch?v=jxbNI5L7AH8)
|
||||||
- "Make this car red and metallic"
|
- "Make this car red and metallic"
|
||||||
@ -116,10 +120,12 @@ Here are some examples of what you can ask Claude to do:
|
|||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
- **Connection issues**: Make sure the Blender addon server is running, and the MCP server is configured on Claude, DO NOT run the uvx command in the terminal
|
- **Connection issues**: Make sure the Blender addon server is running, and the MCP server is configured on Claude, DO NOT run the uvx command in the terminal. Sometimes, the first command won't go through but after that it starts working.
|
||||||
- **Timeout errors**: Try simplifying your requests or breaking them into smaller steps
|
- **Timeout errors**: Try simplifying your requests or breaking them into smaller steps
|
||||||
|
- **Poly Haven integration**: Claude is sometimes erratic with its behaviour
|
||||||
- **Have you tried turning it off and on again?**: If you're still having connection errors, try restarting both Claude and the Blender server
|
- **Have you tried turning it off and on again?**: If you're still having connection errors, try restarting both Claude and the Blender server
|
||||||
|
|
||||||
|
|
||||||
## Technical Details
|
## Technical Details
|
||||||
|
|
||||||
### Communication Protocol
|
### Communication Protocol
|
||||||
@ -132,6 +138,7 @@ The system uses a simple JSON-based protocol over TCP sockets:
|
|||||||
## Limitations & Security Considerations
|
## Limitations & Security Considerations
|
||||||
|
|
||||||
- The `execute_blender_code` tool allows running arbitrary Python code in Blender, which can be powerful but potentially dangerous. Use with caution in production environments. ALWAYS save your work before using it.
|
- The `execute_blender_code` tool allows running arbitrary Python code in Blender, which can be powerful but potentially dangerous. Use with caution in production environments. ALWAYS save your work before using it.
|
||||||
|
- Poly Haven requires downloading models, textures, and HDRI images. If you do not want to use it, please turn it off in the checkbox in Blender.
|
||||||
- Complex operations might need to be broken down into smaller steps
|
- Complex operations might need to be broken down into smaller steps
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -632,6 +632,26 @@ def set_texture(
|
|||||||
logger.error(f"Error applying texture: {str(e)}")
|
logger.error(f"Error applying texture: {str(e)}")
|
||||||
return f"Error applying texture: {str(e)}"
|
return f"Error applying texture: {str(e)}"
|
||||||
|
|
||||||
|
@mcp.prompt()
|
||||||
|
def asset_creation_strategy() -> str:
|
||||||
|
"""Defines the preferred strategy for creating assets in Blender"""
|
||||||
|
return """When creating 3D content in Blender, follow these priorities:
|
||||||
|
|
||||||
|
1. First, try to find and use appropriate PolyHaven assets:
|
||||||
|
- For objects/models: Use download_polyhaven_asset() with asset_type="models"
|
||||||
|
- For materials/textures: Use download_polyhaven_asset() with asset_type="textures"
|
||||||
|
- For environment lighting: Use download_polyhaven_asset() with asset_type="hdris"
|
||||||
|
|
||||||
|
2. Only fall back to basic creation tools when:
|
||||||
|
- A simple primitive is explicitly requested
|
||||||
|
- No suitable PolyHaven asset exists
|
||||||
|
- The task specifically requires a basic material/color
|
||||||
|
- Time or resource constraints make downloading assets impractical
|
||||||
|
|
||||||
|
Basic creation tools to use as fallback:
|
||||||
|
- create_object() for basic primitives
|
||||||
|
- set_material() for basic colors and materials
|
||||||
|
"""
|
||||||
|
|
||||||
# Main execution
|
# Main execution
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user