blenderwright 2.3.0__tar.gz → 3.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {blenderwright-2.3.0 → blenderwright-3.1.0}/.github/workflows/ci.yml +3 -1
- blenderwright-3.1.0/.github/workflows/live-tests.yml +76 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/.github/workflows/release.yml +4 -2
- {blenderwright-2.3.0 → blenderwright-3.1.0}/.gitignore +1 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/PKG-INFO +37 -28
- {blenderwright-2.3.0 → blenderwright-3.1.0}/README.md +35 -27
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/__init__.py +2 -2
- blenderwright-3.1.0/addon/auth.py +96 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/blender_manifest.toml +2 -2
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/dispatcher.py +8 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/__init__.py +6 -0
- blenderwright-3.1.0/addon/handlers/animation.py +613 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/armature.py +129 -35
- blenderwright-3.1.0/addon/handlers/baking.py +123 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/booltool.py +26 -1
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/camera.py +37 -39
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/collections.py +136 -0
- blenderwright-3.1.0/addon/handlers/compositor.py +233 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/curves.py +10 -2
- blenderwright-3.1.0/addon/handlers/deform.py +431 -0
- blenderwright-3.1.0/addon/handlers/file_ops.py +541 -0
- blenderwright-3.1.0/addon/handlers/geometry_nodes.py +644 -0
- blenderwright-3.1.0/addon/handlers/gpencil.py +287 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/lighting.py +125 -41
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/materials.py +30 -4
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/mesh_editing.py +91 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/modeling.py +36 -17
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/objects.py +44 -2
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/physics.py +177 -5
- blenderwright-3.1.0/addon/handlers/rendering.py +565 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/scene.py +22 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/sculpting.py +162 -22
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/selection.py +34 -30
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/sequencer.py +79 -0
- blenderwright-3.1.0/addon/handlers/uv.py +396 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/viewport.py +34 -5
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/render_guard.py +5 -3
- blenderwright-3.1.0/addon/server.py +359 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/ui_panel.py +50 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/docs/index.html +839 -93
- {blenderwright-2.3.0 → blenderwright-3.1.0}/pyproject.toml +7 -1
- blenderwright-3.1.0/src/blenderwright/connection.py +398 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/server.py +6 -2
- blenderwright-3.1.0/src/blenderwright/tools/animation.py +615 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/armature.py +140 -4
- blenderwright-3.1.0/src/blenderwright/tools/baking.py +95 -0
- blenderwright-3.1.0/src/blenderwright/tools/collections.py +304 -0
- blenderwright-3.1.0/src/blenderwright/tools/compositor.py +126 -0
- blenderwright-3.1.0/src/blenderwright/tools/deform.py +517 -0
- blenderwright-3.1.0/src/blenderwright/tools/file_ops.py +436 -0
- blenderwright-3.1.0/src/blenderwright/tools/geometry_nodes.py +475 -0
- blenderwright-3.1.0/src/blenderwright/tools/gpencil.py +347 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/lighting.py +129 -8
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/materials.py +22 -4
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/mesh_editing.py +190 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/modeling.py +30 -4
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/objects.py +86 -2
- blenderwright-3.1.0/src/blenderwright/tools/physics.py +599 -0
- blenderwright-3.1.0/src/blenderwright/tools/render_settings.py +712 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/rendering.py +0 -1
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/scene.py +91 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/sculpting.py +94 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/selection.py +3 -2
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/sequencer.py +144 -0
- blenderwright-3.1.0/src/blenderwright/tools/uv.py +330 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/toolsets.py +65 -28
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/validators.py +156 -3
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/conftest.py +23 -0
- blenderwright-3.1.0/tests/test_addon/conftest.py +63 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_dispatcher.py +18 -0
- blenderwright-3.1.0/tests/test_addon/test_handlers/test_camera_handler.py +177 -0
- blenderwright-3.1.0/tests/test_addon/test_handlers/test_file_ops_handler.py +114 -0
- blenderwright-3.1.0/tests/test_addon/test_handlers/test_geometry_nodes_handler.py +114 -0
- blenderwright-3.1.0/tests/test_addon/test_handlers/test_live_sweep_fixes.py +66 -0
- blenderwright-3.1.0/tests/test_addon/test_handlers/test_selection_handler.py +63 -0
- blenderwright-3.1.0/tests/test_addon/test_handlers/test_sequencer_handler.py +81 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_render_guard.py +25 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_server.py +75 -30
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_ui_panel.py +11 -0
- blenderwright-3.1.0/tests/test_auth_token.py +143 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_connection.py +16 -1
- blenderwright-3.1.0/tests/test_connection_auth.py +11 -0
- blenderwright-3.1.0/tests/test_handshake.py +302 -0
- blenderwright-3.1.0/tests/test_port_claim.py +44 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_project_metadata.py +13 -0
- blenderwright-3.1.0/tests/test_tools/test_actions_nla.py +91 -0
- blenderwright-3.1.0/tests/test_tools/test_allowlists.py +63 -0
- blenderwright-3.1.0/tests/test_tools/test_assets.py +68 -0
- blenderwright-3.1.0/tests/test_tools/test_baking.py +72 -0
- blenderwright-3.1.0/tests/test_tools/test_build_geometry_nodes.py +113 -0
- blenderwright-3.1.0/tests/test_tools/test_color_attributes.py +70 -0
- blenderwright-3.1.0/tests/test_tools/test_color_management.py +125 -0
- blenderwright-3.1.0/tests/test_tools/test_compositor.py +114 -0
- blenderwright-3.1.0/tests/test_tools/test_deform.py +153 -0
- blenderwright-3.1.0/tests/test_tools/test_drivers.py +134 -0
- blenderwright-3.1.0/tests/test_tools/test_edit_mesh_operation.py +54 -0
- blenderwright-3.1.0/tests/test_tools/test_essentials_modifiers.py +49 -0
- blenderwright-3.1.0/tests/test_tools/test_external_paths.py +76 -0
- blenderwright-3.1.0/tests/test_tools/test_fields_collision.py +82 -0
- blenderwright-3.1.0/tests/test_tools/test_file_formats.py +23 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_file_ops.py +40 -0
- blenderwright-3.1.0/tests/test_tools/test_freestyle.py +50 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_gpencil.py +29 -19
- blenderwright-3.1.0/tests/test_tools/test_grease_pencil.py +89 -0
- blenderwright-3.1.0/tests/test_tools/test_keyframe_property.py +58 -0
- blenderwright-3.1.0/tests/test_tools/test_lattice.py +79 -0
- blenderwright-3.1.0/tests/test_tools/test_light_groups_aovs.py +76 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_lighting.py +56 -1
- blenderwright-3.1.0/tests/test_tools/test_link_append.py +103 -0
- blenderwright-3.1.0/tests/test_tools/test_linked_data.py +61 -0
- blenderwright-3.1.0/tests/test_tools/test_metaball.py +61 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_modeling.py +2 -2
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_new_nodes.py +9 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_numeric_text_values.py +0 -3
- blenderwright-3.1.0/tests/test_tools/test_packing.py +58 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_physics.py +8 -1
- blenderwright-3.1.0/tests/test_tools/test_render_quality.py +142 -0
- blenderwright-3.1.0/tests/test_tools/test_render_settings_2.py +105 -0
- blenderwright-3.1.0/tests/test_tools/test_rigging.py +85 -0
- blenderwright-3.1.0/tests/test_tools/test_rigid_body_constraints.py +91 -0
- blenderwright-3.1.0/tests/test_tools/test_sculpt_masks.py +82 -0
- blenderwright-3.1.0/tests/test_tools/test_sequencer_strips.py +89 -0
- blenderwright-3.1.0/tests/test_tools/test_symmetry_loop_tools.py +80 -0
- blenderwright-3.1.0/tests/test_tools/test_units.py +93 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_uv.py +21 -0
- blenderwright-3.1.0/tests/test_tools/test_uv_islands.py +82 -0
- blenderwright-3.1.0/tests/test_tools/test_uv_maps.py +65 -0
- blenderwright-3.1.0/tests/test_tools/test_uv_unwrap_methods.py +25 -0
- blenderwright-3.1.0/tests/test_tools/test_view_layers.py +85 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_toolsets.py +26 -1
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_validators.py +64 -0
- blenderwright-3.1.0/tests_live/__init__.py +0 -0
- blenderwright-3.1.0/tests_live/assets/tex.png +0 -0
- blenderwright-3.1.0/tests_live/assets/tone.wav +0 -0
- blenderwright-3.1.0/tests_live/assets/tri.obj +4 -0
- blenderwright-3.1.0/tests_live/blender_host.py +32 -0
- blenderwright-3.1.0/tests_live/cases.py +371 -0
- blenderwright-3.1.0/tests_live/conftest.py +70 -0
- blenderwright-3.1.0/tests_live/pixels.py +44 -0
- blenderwright-3.1.0/tests_live/test_addon_guards.py +59 -0
- blenderwright-3.1.0/tests_live/test_animation.py +151 -0
- blenderwright-3.1.0/tests_live/test_camera.py +43 -0
- blenderwright-3.1.0/tests_live/test_compositor_world_scene.py +158 -0
- blenderwright-3.1.0/tests_live/test_deform.py +131 -0
- blenderwright-3.1.0/tests_live/test_edit_mesh.py +52 -0
- blenderwright-3.1.0/tests_live/test_every_tool.py +53 -0
- blenderwright-3.1.0/tests_live/test_export.py +41 -0
- blenderwright-3.1.0/tests_live/test_file_ops.py +124 -0
- blenderwright-3.1.0/tests_live/test_freestyle.py +34 -0
- blenderwright-3.1.0/tests_live/test_geometry_nodes.py +118 -0
- blenderwright-3.1.0/tests_live/test_geometry_zones.py +58 -0
- blenderwright-3.1.0/tests_live/test_harness.py +21 -0
- blenderwright-3.1.0/tests_live/test_lattice.py +58 -0
- blenderwright-3.1.0/tests_live/test_materials.py +124 -0
- blenderwright-3.1.0/tests_live/test_metaball.py +31 -0
- blenderwright-3.1.0/tests_live/test_modeling_physics_rigging.py +197 -0
- blenderwright-3.1.0/tests_live/test_objects.py +80 -0
- blenderwright-3.1.0/tests_live/test_procedural.py +95 -0
- blenderwright-3.1.0/tests_live/test_render_settings.py +149 -0
- blenderwright-3.1.0/tests_live/test_sculpting.py +96 -0
- blenderwright-3.1.0/tests_live/test_sequencer.py +55 -0
- blenderwright-3.1.0/tests_live/test_sequencer_quality_gpencil.py +121 -0
- blenderwright-3.1.0/tests_live/test_uv.py +64 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/uv.lock +14 -1
- blenderwright-2.3.0/.github/workflows/test-bpy51.yml +0 -32
- blenderwright-2.3.0/addon/handlers/animation.py +0 -210
- blenderwright-2.3.0/addon/handlers/file_ops.py +0 -204
- blenderwright-2.3.0/addon/handlers/geometry_nodes.py +0 -302
- blenderwright-2.3.0/addon/handlers/gpencil.py +0 -153
- blenderwright-2.3.0/addon/handlers/rendering.py +0 -167
- blenderwright-2.3.0/addon/handlers/uv.py +0 -181
- blenderwright-2.3.0/addon/server.py +0 -228
- blenderwright-2.3.0/blend-ai-v1.0.0.zip +0 -0
- blenderwright-2.3.0/src/blenderwright/connection.py +0 -209
- blenderwright-2.3.0/src/blenderwright/tools/animation.py +0 -251
- blenderwright-2.3.0/src/blenderwright/tools/collections.py +0 -123
- blenderwright-2.3.0/src/blenderwright/tools/file_ops.py +0 -153
- blenderwright-2.3.0/src/blenderwright/tools/geometry_nodes.py +0 -187
- blenderwright-2.3.0/src/blenderwright/tools/gpencil.py +0 -183
- blenderwright-2.3.0/src/blenderwright/tools/physics.py +0 -320
- blenderwright-2.3.0/src/blenderwright/tools/uv.py +0 -133
- blenderwright-2.3.0/tests/test_addon/conftest.py +0 -28
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_camera_handler.py +0 -298
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_geometry_nodes_handler.py +0 -97
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_gpencil_handler.py +0 -205
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_materials_handler.py +0 -547
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_mesh_quality_handler.py +0 -485
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_modeling_handler.py +0 -187
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_objects_handler.py +0 -608
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_procedural_handler.py +0 -649
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_rendering_handler.py +0 -145
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_sculpting_handler.py +0 -171
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_selection_handler.py +0 -90
- blenderwright-2.3.0/tests/test_addon/test_handlers/test_sequencer_handler.py +0 -261
- blenderwright-2.3.0/tests/test_tools/test_uv_slim.py +0 -23
- {blenderwright-2.3.0 → blenderwright-3.1.0}/.github/FUNDING.yml +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/.github/workflows/pylint.yml +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/LICENSE.md +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/code_exec.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/mesh_quality.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/print3d.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/procedural.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/raster.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/sweep.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/handlers/transforms.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/addon/thread_safety.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/build.ps1 +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/build.sh +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/docs/.nojekyll +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/docs/CNAME +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/docs/googled2f6c71abc2d6a7b.html +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/docs/robots.txt +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/docs/shuttle-launch.mp4 +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/docs/sitemap.xml +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/glama.json +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/install-addon.sh +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/install_addon.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/launch_ollama.sh +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/saloon.png +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/screenshot.png +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/scripts/generate_tool_docs.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/shader-preview.png +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/shuttle-launch.gif +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/shuttle-launch.png +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/__init__.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/__main__.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/aliases.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/enum_hints.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/ollama_chat.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/prompts/__init__.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/prompts/workflows.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/resources/__init__.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/resources/scene_info.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/strict.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tool_registry.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/__init__.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/booltool.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/camera.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/code_exec.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/curves.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/mesh_quality.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/print3d.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/screenshot.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/sweep.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/transforms.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/src/blenderwright/tools/viewport.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/__init__.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/__init__.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_handler_registration.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_handlers/__init__.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_handlers/test_code_exec_handler.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_handlers/test_print3d_handler.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_handlers/test_raster_handler.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_handlers/test_scene_handler.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_handlers/test_sweep_handler.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_layer_consistency.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_module_cache_purge.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_addon/test_thread_safety.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_command_registry.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_enum_hints.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_installer.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_long_names.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_object_param_naming.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_ollama_budget.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_ollama_chat.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_ollama_toolsets.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_ollama_vision.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_round_wasters.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_strict_parameters.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tool_disambiguation.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/__init__.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/conftest.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_animation.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_armature.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_auto_critique_prompt.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_booltool.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_camera.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_code_exec.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_collections.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_curves.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_eevee_light_path.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_extensions.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_geometry_nodes.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_imported_mesh_cleanup_prompt.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_issue_31_validation.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_materials.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_mesh_editing.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_mesh_quality.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_mesh_repair.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_negative_scale_primitives.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_objects.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_point_camera_at.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_print3d.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_procedural.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_prompts.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_raster.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_rendering.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_scene.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_screenshot.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_sculpting.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_selection.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_selection_respected.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_sequencer.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_shader_nodes.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_sweep.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_transforms.py +0 -0
- {blenderwright-2.3.0 → blenderwright-3.1.0}/tests/test_tools/test_viewport.py +0 -0
|
@@ -80,4 +80,6 @@ jobs:
|
|
|
80
80
|
- name: Install dependencies
|
|
81
81
|
run: pip install -e ".[dev]"
|
|
82
82
|
- name: Run tests with coverage
|
|
83
|
-
|
|
83
|
+
# Includes the add-on handler tests: they run on a fake bpy, so they
|
|
84
|
+
# check logic only. Real Blender behaviour is the Live Tests workflow.
|
|
85
|
+
run: pytest tests/ --cov=src/blenderwright --cov-report=term-missing
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Live Tests (Blender 5.2)
|
|
2
|
+
|
|
3
|
+
# Every MCP tool against a real headless Blender 5.2.3: the official release,
|
|
4
|
+
# checked against Blender's published SHA-256, cached per OS and version.
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [main]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [main]
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
live:
|
|
17
|
+
name: Live (${{ matrix.os }})
|
|
18
|
+
runs-on: ${{ matrix.os }}
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
include:
|
|
23
|
+
- os: ubuntu-latest
|
|
24
|
+
archive: blender-5.2.3-linux-x64.tar.xz
|
|
25
|
+
sha256: 78486c018b4443efe5e75ab54c290ed8c15abafd249b862c2c9ce2530a918eec
|
|
26
|
+
exe: blender/blender
|
|
27
|
+
- os: windows-latest
|
|
28
|
+
archive: blender-5.2.3-windows-x64.zip
|
|
29
|
+
sha256: 723f08a4401502561eb763cdeacf8745b31e5f3f154d287d3830d97cf75dc2fb
|
|
30
|
+
exe: blender/blender.exe
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
|
|
34
|
+
- uses: actions/setup-python@v5
|
|
35
|
+
with:
|
|
36
|
+
python-version: "3.13"
|
|
37
|
+
|
|
38
|
+
- name: Install dependencies
|
|
39
|
+
run: pip install -e ".[dev]"
|
|
40
|
+
|
|
41
|
+
- name: Restore Blender
|
|
42
|
+
id: blender-cache
|
|
43
|
+
uses: actions/cache@v4
|
|
44
|
+
with:
|
|
45
|
+
path: blender
|
|
46
|
+
key: ${{ runner.os }}-${{ matrix.archive }}
|
|
47
|
+
|
|
48
|
+
- name: Download and verify Blender
|
|
49
|
+
if: steps.blender-cache.outputs.cache-hit != 'true'
|
|
50
|
+
shell: bash
|
|
51
|
+
run: |
|
|
52
|
+
curl -fsSL -o "${{ matrix.archive }}" \
|
|
53
|
+
"https://download.blender.org/release/Blender5.2/${{ matrix.archive }}"
|
|
54
|
+
echo "${{ matrix.sha256 }} ${{ matrix.archive }}" | sha256sum -c -
|
|
55
|
+
mkdir unpacked
|
|
56
|
+
if [[ "${{ matrix.archive }}" == *.zip ]]; then
|
|
57
|
+
unzip -q "${{ matrix.archive }}" -d unpacked
|
|
58
|
+
else
|
|
59
|
+
tar -xJf "${{ matrix.archive }}" -C unpacked
|
|
60
|
+
fi
|
|
61
|
+
mv unpacked/* blender
|
|
62
|
+
rm -rf unpacked "${{ matrix.archive }}"
|
|
63
|
+
|
|
64
|
+
- name: Install Blender's system libraries
|
|
65
|
+
if: runner.os == 'Linux'
|
|
66
|
+
run: |
|
|
67
|
+
sudo apt-get update -q
|
|
68
|
+
sudo apt-get install -y -q libxi6 libxxf86vm1 libxfixes3 libxrender1 libxkbcommon0 \
|
|
69
|
+
libsm6 libice6 libgl1 libegl1 libgl1-mesa-dri
|
|
70
|
+
|
|
71
|
+
- name: Run live tests
|
|
72
|
+
env:
|
|
73
|
+
BLENDER: ${{ github.workspace }}/${{ matrix.exe }}
|
|
74
|
+
# Runners have no GPU: viewport capture and EEVEE run locally instead
|
|
75
|
+
BLENDERWRIGHT_NO_GPU: "1"
|
|
76
|
+
run: pytest tests_live -v --tb=short -p no:cacheprovider
|
|
@@ -15,10 +15,12 @@ jobs:
|
|
|
15
15
|
steps:
|
|
16
16
|
- uses: actions/checkout@v4
|
|
17
17
|
|
|
18
|
-
- name: Download Blender
|
|
18
|
+
- name: Download Blender 5.2 LTS
|
|
19
19
|
run: |
|
|
20
20
|
curl -sSfL -o blender.tar.xz \
|
|
21
|
-
https://download.blender.org/release/
|
|
21
|
+
https://download.blender.org/release/Blender5.2/blender-5.2.3-linux-x64.tar.xz
|
|
22
|
+
echo "78486c018b4443efe5e75ab54c290ed8c15abafd249b862c2c9ce2530a918eec blender.tar.xz" \
|
|
23
|
+
| sha256sum -c -
|
|
22
24
|
mkdir -p blender
|
|
23
25
|
tar -xf blender.tar.xz -C blender --strip-components=1
|
|
24
26
|
echo "$PWD/blender" >> "$GITHUB_PATH"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: blenderwright
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: The most intuitive and efficient MCP Server for Blender
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE.md
|
|
@@ -10,6 +10,7 @@ Requires-Dist: pydantic>=2.0
|
|
|
10
10
|
Provides-Extra: chat
|
|
11
11
|
Requires-Dist: ollama>=0.4; extra == 'chat'
|
|
12
12
|
Provides-Extra: dev
|
|
13
|
+
Requires-Dist: fake-bpy-module-5-2>=20260730; extra == 'dev'
|
|
13
14
|
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
|
|
14
15
|
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
|
|
15
16
|
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
@@ -44,14 +45,14 @@ The most intuitive and efficient MCP Server for Blender. Control Blender entirel
|
|
|
44
45
|
|
|
45
46
|
## Key Features
|
|
46
47
|
|
|
47
|
-
- **[
|
|
48
|
+
- **[276 tools](https://blenderwright.holdmybeer.gg/)** across 32 modules covering every major Blender domain: modeling, mesh editing, materials, shader nodes, lighting, camera, animation, rendering, sculpting, UV mapping, physics, geometry nodes, rigging, curves, sweeps along a path, 3D-print checking, annotations, collections, file I/O, Bool Tool, viewport control, mesh quality analysis, and extension suggestions
|
|
48
49
|
- **13 expert prompts**: topology best practices, real-world scale references, lighting principles, studio setup, character basemesh workflow, PBR material guide, auto-critique feedback loop, and more
|
|
49
50
|
- **Visual feedback loop**: fast viewport screenshots via OpenGL render (~ms, not seconds) with auto-critique prompts that guide the LLM to check its own work
|
|
50
51
|
- **Mesh quality analysis**: structured reports covering non-manifold edges, loose vertices, zero-area faces, duplicate vertices, and wire edges
|
|
51
52
|
- **Extension suggestions**: proactively recommends Bool Tool, LoopTools, and Node Wrangler when a task would benefit from them (skips already-installed extensions)
|
|
52
53
|
- **Raw Python is opt-in**: `execute_blender_code` is off until you tick "Allow raw Python" in the N-panel, per session, never saved into the .blend. When on, every snippet is echoed to the console and listed in the panel. A restricted namespace blocks obvious mistakes (`os`, `subprocess`, `exec`, `open`, ...); it is a guard against accidents, not a security boundary
|
|
53
54
|
- **Render-aware**: automatically detects when Blender is rendering and queues commands. Recovers from stuck render guards via `load_post` handler and reset command
|
|
54
|
-
- **Blender
|
|
55
|
+
- **Built for Blender 5.2 LTS**: ships as a Blender Extension; developed and tested on Blender 5.2
|
|
55
56
|
- **Custom port**: configure the server port from the N-panel UI (default: 9876, range: 1024–65535)
|
|
56
57
|
- **Zero telemetry**: no usage tracking, no analytics, no data collection. Everything runs locally on `127.0.0.1`
|
|
57
58
|
- **Zero-dependency addon**: the Blender addon uses only Python stdlib + `bpy`. Nothing to pip install inside Blender
|
|
@@ -80,17 +81,17 @@ Then point your client at `uv run --directory /path/to/blenderwright blenderwrig
|
|
|
80
81
|
### 2. Install the Blender addon
|
|
81
82
|
|
|
82
83
|
1. Download the latest addon zip from [GitHub Releases](https://github.com/HoldMyBeer-gg/blenderwright/releases)
|
|
83
|
-
2. Open Blender
|
|
84
|
+
2. Open Blender 5.2 LTS
|
|
84
85
|
3. Go to **Edit > Preferences > Get Extensions**, click the dropdown (▾) top-right, and choose **Install from Disk...**
|
|
85
86
|
4. Select the downloaded `.zip` file
|
|
86
87
|
5. Enable **"blenderwright"** in the extensions list
|
|
87
88
|
|
|
88
|
-
> **Blender
|
|
89
|
+
> **Blender 5.1 and earlier:** Not supported. blenderwright targets Blender 5.2 LTS, and Blender refuses to install it on older versions. Please upgrade Blender from [blender.org/download](https://www.blender.org/download/).
|
|
89
90
|
|
|
90
91
|
<details>
|
|
91
92
|
<summary><strong>Developer install (symlink)</strong></summary>
|
|
92
93
|
|
|
93
|
-
If you're developing on blenderwright, symlink the addon folder into Blender's user extensions directory instead. Replace `<ver>` with your Blender version (e.g. `
|
|
94
|
+
If you're developing on blenderwright, symlink the addon folder into Blender's user extensions directory instead. Replace `<ver>` with your Blender version (e.g. `5.2`).
|
|
94
95
|
|
|
95
96
|
```bash
|
|
96
97
|
# macOS
|
|
@@ -109,7 +110,7 @@ Then enable the extension in Blender preferences under **Get Extensions > User**
|
|
|
109
110
|
|
|
110
111
|
### 3. Start the server in Blender
|
|
111
112
|
|
|
112
|
-
In Blender's 3D Viewport, open the **N-panel** (press `N`), find the **blenderwright** tab. Set your preferred port (default: 9876), then click **Start Server**.
|
|
113
|
+
In Blender's 3D Viewport, open the **N-panel** (press `N`), find the **blenderwright** tab. Set your preferred port (default: 9876), then click **Start Server**. To skip this every time, tick **Start server when Blender opens** in Edit > Preferences > Add-ons > blenderwright (off by default).
|
|
113
114
|
|
|
114
115
|
### 4. Connect your AI assistant
|
|
115
116
|
|
|
@@ -197,7 +198,7 @@ python install_addon.py upgrade /Applications/Blender.app/Contents/MacOS/Blender
|
|
|
197
198
|
python install_addon.py upgrade /usr/local/bin/blender
|
|
198
199
|
|
|
199
200
|
# Windows
|
|
200
|
-
python install_addon.py upgrade "C:\Program Files\Blender Foundation\Blender
|
|
201
|
+
python install_addon.py upgrade "C:\Program Files\Blender Foundation\Blender 5.2\blender.exe"
|
|
201
202
|
```
|
|
202
203
|
|
|
203
204
|
It refuses to run while Blender is open, checks the path before touching anything,
|
|
@@ -257,37 +258,41 @@ blenderwright includes 13 MCP prompts that guide the LLM toward professional-qua
|
|
|
257
258
|
## Tool Domains
|
|
258
259
|
|
|
259
260
|
<details>
|
|
260
|
-
<summary><strong>All
|
|
261
|
+
<summary><strong>All 276 tools across 32 modules</strong></summary>
|
|
261
262
|
|
|
262
263
|
Full reference with every parameter: **[blenderwright.holdmybeer.gg](https://blenderwright.holdmybeer.gg/)**
|
|
263
264
|
|
|
264
265
|
| Domain | Tools | Highlights |
|
|
265
266
|
|--------|-------|-----------|
|
|
266
|
-
| Scene |
|
|
267
|
-
| Objects |
|
|
267
|
+
| Scene | 7 | Get scene info, set frame range, units, manage scenes, suggest helpful extensions |
|
|
268
|
+
| Objects | 16 | Create primitives and metaballs, duplicate, parent, join, visibility, origin, convert, auto-smooth |
|
|
268
269
|
| Transforms | 6 | Position, rotation (euler/quat), scale, apply, snap |
|
|
269
270
|
| Modeling | 13 | Modifiers, booleans, subdivide, extrude, bevel, loop cut, bridge edge loops |
|
|
270
|
-
| Mesh Editing |
|
|
271
|
+
| Mesh Editing | 20 | Inset, fill, grid fill, mark seam/sharp, normals, dissolve, knife project, spin, crease, symmetrize, bisect, loop tools (circle, space evenly, flatten), smooth vertices, poke, edge split, wireframe, solidify |
|
|
271
272
|
| Selection | 6 | Select by index, by axis, by face sides, by similarity; invert; report what is selected |
|
|
272
273
|
| Mesh Quality | 3 | Analyze mesh defects: non-manifold, loose verts, zero-area faces, duplicates and repair them; decimate to reduce polycount |
|
|
273
274
|
| Bool Tool | 4 | Auto union, difference, intersect, slice (via Blender's Bool Tool addon) |
|
|
274
275
|
| Materials | 25 | Principled BSDF, procedural and raster textures, textures, blend modes, shader node graph (add/connect/remove nodes, including 5.1 Raycast node) |
|
|
275
|
-
| Lighting |
|
|
276
|
+
| Lighting | 9 | Point/sun/spot/area lights, HDRIs, light rigs, shadows, Blender's built-in HDRIs, HDRI rotation, procedural sky with sun, light linking |
|
|
276
277
|
| Camera | 6 | Create, aim, DOF, viewport capture, active camera |
|
|
277
|
-
| Animation |
|
|
278
|
+
| Animation | 16 | Keyframes, interpolation, frame range, follow path, drivers with Python-free simple expressions, keyframe any property (material colours, light power, world, lens), actions and NLA strips (share, push down, repeat, layer), F-curve modifiers (cycles, noise, stepped, smooth) |
|
|
278
279
|
| Rendering | 7 | Engine, resolution, samples, output format, render, EEVEE light path intensity |
|
|
280
|
+
| Render settings | 13 | Color management (AgX, looks, exposure), film transparency, denoising, Cycles sampling and light paths, motion blur, render passes, ray visibility and shadow catcher, EEVEE quality, render performance, light groups, shader AOVs, Freestyle lines |
|
|
281
|
+
| Baking | 1 | Bake albedo, normal (high-poly to low-poly with cage), AO, roughness, emission or lit maps to PNG/EXR/TIFF with Cycles |
|
|
282
|
+
| Compositor | 5 | Post-processing chain: glare and bloom, lens distortion, colour balance, blur, Essentials vignette, film grain, chromatic aberration, split toning, sharpening |
|
|
283
|
+
| Deform | 14 | Vertex groups and weights (assign, normalize, smooth, clean, limit, mirror), shape keys (add, sculpt by offset with weighted falloff, blend, animate), color attributes (vertex colors), lattice cages (fit, move, taper, reset) |
|
|
279
284
|
| Curves | 10 | Bezier/NURBS/path, 3D text, convert, reverse, handle types, cyclic, subdivide |
|
|
280
285
|
| Sweep | 2 | Sweep a profile along a 3D path for tubes, hoses, cables and rails, with flip-free framing; check a path for bends too tight for the profile |
|
|
281
286
|
| 3D Printing | 1 | Reversed normals, self-intersection, thin walls, shells and overhangs via Blender's 3D Print Toolbox |
|
|
282
|
-
| Sequencer |
|
|
283
|
-
| Sculpting |
|
|
284
|
-
| UV Mapping |
|
|
285
|
-
| Physics |
|
|
286
|
-
| Geometry Nodes |
|
|
287
|
-
| Armature |
|
|
288
|
-
|
|
|
289
|
-
| Collections |
|
|
290
|
-
| File I/O |
|
|
287
|
+
| Sequencer | 8 | Image-sequence, sound, movie, text and colour strips, position, crop, blend, fades, list and remove strips, render to MP4, MKV or WebM with audio |
|
|
288
|
+
| Sculpting | 10 | Brushes, remesh, multires, symmetry, dynamic topology, stroke_method, masks, face sets |
|
|
289
|
+
| UV Mapping | 8 | Smart project, unwrap (ANGLE_BASED, CONFORMAL, MINIMUM_STRETCH), projection, pack islands, island operations (average scale, minimize stretch, randomize, arrange, weld), texel density, multiple UV maps (lightmaps) |
|
|
290
|
+
| Physics | 14 | Rigid body (constraints: hinge, slider, spring, motor, breakable; world substeps), cloth, fluid, particles (velocity, rendering, delete), bake, force fields, colliders, soft body |
|
|
291
|
+
| Geometry Nodes | 8 | Build a whole node graph in one call and read it back, create node trees, add/connect nodes, set inputs, Essentials modifiers (array, scatter on surface, instance on elements, curve to tube, ...) |
|
|
292
|
+
| Armature | 8 | Bones, constraints, auto weights, pose, bone collections, IK chains with pole targets, more constraint types |
|
|
293
|
+
| Grease Pencil | 9 | Grease Pencil v3 drawings (tapered, coloured strokes on layers and frames), Line Art inked outlines, annotation layers and strokes |
|
|
294
|
+
| Collections | 8 | Create, move objects, visibility, delete, collection instances, make instances real, view layers (holdout, indirect only, material override) |
|
|
295
|
+
| File I/O | 14 | Import/export (FBX, OBJ, glTF, USD, STL...), save/open, list/link/append from other .blend files, pack/unpack resources, check and relink external paths, asset libraries (list, place), linked data (make local, override, reload) |
|
|
291
296
|
| Viewport | 3 | Shading mode, overlays, focus on object |
|
|
292
297
|
| Screenshot | 1 | Fast viewport capture (OpenGL) or full render, base64 output |
|
|
293
298
|
| Code Exec | 1 | Sandboxed Python execution in Blender (dangerous imports blocked) |
|
|
@@ -331,7 +336,7 @@ AI Assistant <--stdio/MCP--> blenderwright server <--TCP socket--> Blender addon
|
|
|
331
336
|
- **MCP Server** (`src/blenderwright/`): Python process using the `mcp` SDK. Exposes tools, resources, and prompts over stdio. Validates all inputs before forwarding to Blender.
|
|
332
337
|
- **Blender Addon** (`addon/`): Runs a TCP socket server inside Blender on a background thread. Commands are queued and executed on the main thread via `bpy.app.timers` to respect Blender's threading model.
|
|
333
338
|
- **Render Guard**: Tracks render state via `bpy.app.handlers`. During renders, the server immediately returns a "busy" status. Automatically recovers from crashed renders via `load_post` handler. Can be force-reset via MCP command.
|
|
334
|
-
- **Protocol**: Length-prefixed JSON messages over TCP with SO_KEEPALIVE for stale connection detection. Each message is a 4-byte big-endian length header followed by a UTF-8 JSON payload.
|
|
339
|
+
- **Protocol**: Length-prefixed JSON messages over TCP with SO_KEEPALIVE for stale connection detection. Each message is a 4-byte big-endian length header followed by a UTF-8 JSON payload. A connection opens with a challenge-response handshake that also checks both sides speak the same protocol version, then every message is signed (see Security).
|
|
335
340
|
|
|
336
341
|
</details>
|
|
337
342
|
|
|
@@ -350,12 +355,13 @@ AI Assistant <--stdio/MCP--> blenderwright server <--TCP socket--> Blender addon
|
|
|
350
355
|
<summary><strong>Security</strong></summary>
|
|
351
356
|
|
|
352
357
|
- **Localhost only**: The TCP socket binds to `127.0.0.1`, never exposed to the network.
|
|
358
|
+
- **Authenticated socket**: any local program can reach `127.0.0.1`, so the connection is authenticated. Start Server writes a fresh random token to a file only your user can read (`~/Library/Application Support/blenderwright/token` on macOS, `%APPDATA%\blenderwright\token` on Windows, `~/.config/blenderwright/token` on Linux) and deletes it on Stop. The token never crosses the socket: Blender and the MCP server each prove they know it by signing fresh random nonces (HMAC-SHA256), and every command and reply after that is signed with a per-connection key and numbered, so commands cannot be injected, altered or replayed. The MCP server refuses to send anything to a process on the port that cannot prove itself. A failed check closes the connection and the N-panel shows the count. On Windows the port is claimed exclusively. If the MCP server runs where it can't see the token file (WSL, Docker), set `BLENDERWRIGHT_TOKEN_FILE` to its path. Each port has its own token file (`token` for 9876, `token-<port>` otherwise), so two Blenders on two ports never overwrite each other's; point an MCP server at the second one with `BLENDERWRIGHT_PORT`.
|
|
353
359
|
- **Raw Python is off by default**: `execute_blender_code` refuses to run until you tick "Allow raw Python" in the blenderwright N-panel. The switch is a `WindowManager` property, so it is per Blender session and is never written into a `.blend` file. Every run is echoed to the system console and the panel shows a count and the last snippet. The 191 structured tools do not need it.
|
|
354
360
|
- **The restricted namespace is not a sandbox**: when raw Python is on, the import hook refuses 25 imports (`os`, `subprocess`, `socket`, `shutil`, `sys`, `ctypes`, `importlib`, `pathlib`, `signal`, `multiprocessing`, `pickle`, `shelve`, `tempfile`, `http`, `urllib`, `ftplib`, `smtplib`, `xmlrpc`, `code`, `codeop`, `compileall`, `webbrowser`, `antigravity`, `turtle`, `tkinter`) and the builtins `__import__`, `exec`, `eval`, `compile`, `open`, `globals`, `locals`, `vars`, `input`, `breakpoint`, `exit`, `quit`, `help` and `memoryview` are removed. That catches a model making a mistake. It does not contain an adversary: the code runs in-process with full `bpy`, and `bpy` alone can save files anywhere and run any operator. Treat "Allow raw Python" the way you would treat running a script someone else wrote: read what the model is about to run, and turn it off when you are done.
|
|
355
361
|
- **Input validation**: All inputs pass through validators before reaching Blender: name sanitization, path traversal prevention, numeric range checks, enum allowlists.
|
|
356
362
|
- **File safety**: Import operations disable `use_scripts_auto_execute` to prevent script injection from imported files. File extensions are checked against allowlists.
|
|
357
363
|
- **Command allowlist**: The addon dispatcher only processes explicitly registered commands. Unknown commands are rejected.
|
|
358
|
-
- **Shader node allowlist**: Only
|
|
364
|
+
- **Shader node allowlist**: Only 93 known shader node types can be created, which prevents arbitrary type injection.
|
|
359
365
|
|
|
360
366
|
</details>
|
|
361
367
|
|
|
@@ -381,9 +387,12 @@ AI Assistant <--stdio/MCP--> blenderwright server <--TCP socket--> Blender addon
|
|
|
381
387
|
# Install with dev dependencies
|
|
382
388
|
uv pip install -e ".[dev]"
|
|
383
389
|
|
|
384
|
-
#
|
|
390
|
+
# Unit tests: validation and logic, Blender faked
|
|
385
391
|
uv run --extra dev pytest
|
|
386
392
|
|
|
393
|
+
# Live tests: every tool against a real headless Blender 5.2
|
|
394
|
+
BLENDER=/Applications/Blender.app/Contents/MacOS/Blender uv run --extra dev pytest tests_live
|
|
395
|
+
|
|
387
396
|
# Run tests with coverage
|
|
388
397
|
uv run --extra dev pytest --cov=blenderwright
|
|
389
398
|
|
|
@@ -403,11 +412,11 @@ blenderwright/
|
|
|
403
412
|
│ ├── server.py # FastMCP entry point
|
|
404
413
|
│ ├── connection.py # TCP client to Blender (with busy-retry)
|
|
405
414
|
│ ├── validators.py # Input validation
|
|
406
|
-
│ ├── tools/ #
|
|
415
|
+
│ ├── tools/ # 32 tool modules (276 tools)
|
|
407
416
|
│ ├── resources/ # MCP resources (scene, objects, materials)
|
|
408
417
|
│ └── prompts/ # 13 expert prompt templates
|
|
409
418
|
├── addon/ # Blender addon (zero external deps)
|
|
410
|
-
│ ├── blender_manifest.toml # Blender
|
|
419
|
+
│ ├── blender_manifest.toml # Blender 5.2+ Extension manifest
|
|
411
420
|
│ ├── __init__.py # bl_info (legacy fallback) + register/unregister
|
|
412
421
|
│ ├── server.py # TCP socket server (SO_KEEPALIVE)
|
|
413
422
|
│ ├── dispatcher.py # Command routing + allowlist
|
|
@@ -26,14 +26,14 @@ The most intuitive and efficient MCP Server for Blender. Control Blender entirel
|
|
|
26
26
|
|
|
27
27
|
## Key Features
|
|
28
28
|
|
|
29
|
-
- **[
|
|
29
|
+
- **[276 tools](https://blenderwright.holdmybeer.gg/)** across 32 modules covering every major Blender domain: modeling, mesh editing, materials, shader nodes, lighting, camera, animation, rendering, sculpting, UV mapping, physics, geometry nodes, rigging, curves, sweeps along a path, 3D-print checking, annotations, collections, file I/O, Bool Tool, viewport control, mesh quality analysis, and extension suggestions
|
|
30
30
|
- **13 expert prompts**: topology best practices, real-world scale references, lighting principles, studio setup, character basemesh workflow, PBR material guide, auto-critique feedback loop, and more
|
|
31
31
|
- **Visual feedback loop**: fast viewport screenshots via OpenGL render (~ms, not seconds) with auto-critique prompts that guide the LLM to check its own work
|
|
32
32
|
- **Mesh quality analysis**: structured reports covering non-manifold edges, loose vertices, zero-area faces, duplicate vertices, and wire edges
|
|
33
33
|
- **Extension suggestions**: proactively recommends Bool Tool, LoopTools, and Node Wrangler when a task would benefit from them (skips already-installed extensions)
|
|
34
34
|
- **Raw Python is opt-in**: `execute_blender_code` is off until you tick "Allow raw Python" in the N-panel, per session, never saved into the .blend. When on, every snippet is echoed to the console and listed in the panel. A restricted namespace blocks obvious mistakes (`os`, `subprocess`, `exec`, `open`, ...); it is a guard against accidents, not a security boundary
|
|
35
35
|
- **Render-aware**: automatically detects when Blender is rendering and queues commands. Recovers from stuck render guards via `load_post` handler and reset command
|
|
36
|
-
- **Blender
|
|
36
|
+
- **Built for Blender 5.2 LTS**: ships as a Blender Extension; developed and tested on Blender 5.2
|
|
37
37
|
- **Custom port**: configure the server port from the N-panel UI (default: 9876, range: 1024–65535)
|
|
38
38
|
- **Zero telemetry**: no usage tracking, no analytics, no data collection. Everything runs locally on `127.0.0.1`
|
|
39
39
|
- **Zero-dependency addon**: the Blender addon uses only Python stdlib + `bpy`. Nothing to pip install inside Blender
|
|
@@ -62,17 +62,17 @@ Then point your client at `uv run --directory /path/to/blenderwright blenderwrig
|
|
|
62
62
|
### 2. Install the Blender addon
|
|
63
63
|
|
|
64
64
|
1. Download the latest addon zip from [GitHub Releases](https://github.com/HoldMyBeer-gg/blenderwright/releases)
|
|
65
|
-
2. Open Blender
|
|
65
|
+
2. Open Blender 5.2 LTS
|
|
66
66
|
3. Go to **Edit > Preferences > Get Extensions**, click the dropdown (▾) top-right, and choose **Install from Disk...**
|
|
67
67
|
4. Select the downloaded `.zip` file
|
|
68
68
|
5. Enable **"blenderwright"** in the extensions list
|
|
69
69
|
|
|
70
|
-
> **Blender
|
|
70
|
+
> **Blender 5.1 and earlier:** Not supported. blenderwright targets Blender 5.2 LTS, and Blender refuses to install it on older versions. Please upgrade Blender from [blender.org/download](https://www.blender.org/download/).
|
|
71
71
|
|
|
72
72
|
<details>
|
|
73
73
|
<summary><strong>Developer install (symlink)</strong></summary>
|
|
74
74
|
|
|
75
|
-
If you're developing on blenderwright, symlink the addon folder into Blender's user extensions directory instead. Replace `<ver>` with your Blender version (e.g. `
|
|
75
|
+
If you're developing on blenderwright, symlink the addon folder into Blender's user extensions directory instead. Replace `<ver>` with your Blender version (e.g. `5.2`).
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
78
|
# macOS
|
|
@@ -91,7 +91,7 @@ Then enable the extension in Blender preferences under **Get Extensions > User**
|
|
|
91
91
|
|
|
92
92
|
### 3. Start the server in Blender
|
|
93
93
|
|
|
94
|
-
In Blender's 3D Viewport, open the **N-panel** (press `N`), find the **blenderwright** tab. Set your preferred port (default: 9876), then click **Start Server**.
|
|
94
|
+
In Blender's 3D Viewport, open the **N-panel** (press `N`), find the **blenderwright** tab. Set your preferred port (default: 9876), then click **Start Server**. To skip this every time, tick **Start server when Blender opens** in Edit > Preferences > Add-ons > blenderwright (off by default).
|
|
95
95
|
|
|
96
96
|
### 4. Connect your AI assistant
|
|
97
97
|
|
|
@@ -179,7 +179,7 @@ python install_addon.py upgrade /Applications/Blender.app/Contents/MacOS/Blender
|
|
|
179
179
|
python install_addon.py upgrade /usr/local/bin/blender
|
|
180
180
|
|
|
181
181
|
# Windows
|
|
182
|
-
python install_addon.py upgrade "C:\Program Files\Blender Foundation\Blender
|
|
182
|
+
python install_addon.py upgrade "C:\Program Files\Blender Foundation\Blender 5.2\blender.exe"
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
It refuses to run while Blender is open, checks the path before touching anything,
|
|
@@ -239,37 +239,41 @@ blenderwright includes 13 MCP prompts that guide the LLM toward professional-qua
|
|
|
239
239
|
## Tool Domains
|
|
240
240
|
|
|
241
241
|
<details>
|
|
242
|
-
<summary><strong>All
|
|
242
|
+
<summary><strong>All 276 tools across 32 modules</strong></summary>
|
|
243
243
|
|
|
244
244
|
Full reference with every parameter: **[blenderwright.holdmybeer.gg](https://blenderwright.holdmybeer.gg/)**
|
|
245
245
|
|
|
246
246
|
| Domain | Tools | Highlights |
|
|
247
247
|
|--------|-------|-----------|
|
|
248
|
-
| Scene |
|
|
249
|
-
| Objects |
|
|
248
|
+
| Scene | 7 | Get scene info, set frame range, units, manage scenes, suggest helpful extensions |
|
|
249
|
+
| Objects | 16 | Create primitives and metaballs, duplicate, parent, join, visibility, origin, convert, auto-smooth |
|
|
250
250
|
| Transforms | 6 | Position, rotation (euler/quat), scale, apply, snap |
|
|
251
251
|
| Modeling | 13 | Modifiers, booleans, subdivide, extrude, bevel, loop cut, bridge edge loops |
|
|
252
|
-
| Mesh Editing |
|
|
252
|
+
| Mesh Editing | 20 | Inset, fill, grid fill, mark seam/sharp, normals, dissolve, knife project, spin, crease, symmetrize, bisect, loop tools (circle, space evenly, flatten), smooth vertices, poke, edge split, wireframe, solidify |
|
|
253
253
|
| Selection | 6 | Select by index, by axis, by face sides, by similarity; invert; report what is selected |
|
|
254
254
|
| Mesh Quality | 3 | Analyze mesh defects: non-manifold, loose verts, zero-area faces, duplicates and repair them; decimate to reduce polycount |
|
|
255
255
|
| Bool Tool | 4 | Auto union, difference, intersect, slice (via Blender's Bool Tool addon) |
|
|
256
256
|
| Materials | 25 | Principled BSDF, procedural and raster textures, textures, blend modes, shader node graph (add/connect/remove nodes, including 5.1 Raycast node) |
|
|
257
|
-
| Lighting |
|
|
257
|
+
| Lighting | 9 | Point/sun/spot/area lights, HDRIs, light rigs, shadows, Blender's built-in HDRIs, HDRI rotation, procedural sky with sun, light linking |
|
|
258
258
|
| Camera | 6 | Create, aim, DOF, viewport capture, active camera |
|
|
259
|
-
| Animation |
|
|
259
|
+
| Animation | 16 | Keyframes, interpolation, frame range, follow path, drivers with Python-free simple expressions, keyframe any property (material colours, light power, world, lens), actions and NLA strips (share, push down, repeat, layer), F-curve modifiers (cycles, noise, stepped, smooth) |
|
|
260
260
|
| Rendering | 7 | Engine, resolution, samples, output format, render, EEVEE light path intensity |
|
|
261
|
+
| Render settings | 13 | Color management (AgX, looks, exposure), film transparency, denoising, Cycles sampling and light paths, motion blur, render passes, ray visibility and shadow catcher, EEVEE quality, render performance, light groups, shader AOVs, Freestyle lines |
|
|
262
|
+
| Baking | 1 | Bake albedo, normal (high-poly to low-poly with cage), AO, roughness, emission or lit maps to PNG/EXR/TIFF with Cycles |
|
|
263
|
+
| Compositor | 5 | Post-processing chain: glare and bloom, lens distortion, colour balance, blur, Essentials vignette, film grain, chromatic aberration, split toning, sharpening |
|
|
264
|
+
| Deform | 14 | Vertex groups and weights (assign, normalize, smooth, clean, limit, mirror), shape keys (add, sculpt by offset with weighted falloff, blend, animate), color attributes (vertex colors), lattice cages (fit, move, taper, reset) |
|
|
261
265
|
| Curves | 10 | Bezier/NURBS/path, 3D text, convert, reverse, handle types, cyclic, subdivide |
|
|
262
266
|
| Sweep | 2 | Sweep a profile along a 3D path for tubes, hoses, cables and rails, with flip-free framing; check a path for bends too tight for the profile |
|
|
263
267
|
| 3D Printing | 1 | Reversed normals, self-intersection, thin walls, shells and overhangs via Blender's 3D Print Toolbox |
|
|
264
|
-
| Sequencer |
|
|
265
|
-
| Sculpting |
|
|
266
|
-
| UV Mapping |
|
|
267
|
-
| Physics |
|
|
268
|
-
| Geometry Nodes |
|
|
269
|
-
| Armature |
|
|
270
|
-
|
|
|
271
|
-
| Collections |
|
|
272
|
-
| File I/O |
|
|
268
|
+
| Sequencer | 8 | Image-sequence, sound, movie, text and colour strips, position, crop, blend, fades, list and remove strips, render to MP4, MKV or WebM with audio |
|
|
269
|
+
| Sculpting | 10 | Brushes, remesh, multires, symmetry, dynamic topology, stroke_method, masks, face sets |
|
|
270
|
+
| UV Mapping | 8 | Smart project, unwrap (ANGLE_BASED, CONFORMAL, MINIMUM_STRETCH), projection, pack islands, island operations (average scale, minimize stretch, randomize, arrange, weld), texel density, multiple UV maps (lightmaps) |
|
|
271
|
+
| Physics | 14 | Rigid body (constraints: hinge, slider, spring, motor, breakable; world substeps), cloth, fluid, particles (velocity, rendering, delete), bake, force fields, colliders, soft body |
|
|
272
|
+
| Geometry Nodes | 8 | Build a whole node graph in one call and read it back, create node trees, add/connect nodes, set inputs, Essentials modifiers (array, scatter on surface, instance on elements, curve to tube, ...) |
|
|
273
|
+
| Armature | 8 | Bones, constraints, auto weights, pose, bone collections, IK chains with pole targets, more constraint types |
|
|
274
|
+
| Grease Pencil | 9 | Grease Pencil v3 drawings (tapered, coloured strokes on layers and frames), Line Art inked outlines, annotation layers and strokes |
|
|
275
|
+
| Collections | 8 | Create, move objects, visibility, delete, collection instances, make instances real, view layers (holdout, indirect only, material override) |
|
|
276
|
+
| File I/O | 14 | Import/export (FBX, OBJ, glTF, USD, STL...), save/open, list/link/append from other .blend files, pack/unpack resources, check and relink external paths, asset libraries (list, place), linked data (make local, override, reload) |
|
|
273
277
|
| Viewport | 3 | Shading mode, overlays, focus on object |
|
|
274
278
|
| Screenshot | 1 | Fast viewport capture (OpenGL) or full render, base64 output |
|
|
275
279
|
| Code Exec | 1 | Sandboxed Python execution in Blender (dangerous imports blocked) |
|
|
@@ -313,7 +317,7 @@ AI Assistant <--stdio/MCP--> blenderwright server <--TCP socket--> Blender addon
|
|
|
313
317
|
- **MCP Server** (`src/blenderwright/`): Python process using the `mcp` SDK. Exposes tools, resources, and prompts over stdio. Validates all inputs before forwarding to Blender.
|
|
314
318
|
- **Blender Addon** (`addon/`): Runs a TCP socket server inside Blender on a background thread. Commands are queued and executed on the main thread via `bpy.app.timers` to respect Blender's threading model.
|
|
315
319
|
- **Render Guard**: Tracks render state via `bpy.app.handlers`. During renders, the server immediately returns a "busy" status. Automatically recovers from crashed renders via `load_post` handler. Can be force-reset via MCP command.
|
|
316
|
-
- **Protocol**: Length-prefixed JSON messages over TCP with SO_KEEPALIVE for stale connection detection. Each message is a 4-byte big-endian length header followed by a UTF-8 JSON payload.
|
|
320
|
+
- **Protocol**: Length-prefixed JSON messages over TCP with SO_KEEPALIVE for stale connection detection. Each message is a 4-byte big-endian length header followed by a UTF-8 JSON payload. A connection opens with a challenge-response handshake that also checks both sides speak the same protocol version, then every message is signed (see Security).
|
|
317
321
|
|
|
318
322
|
</details>
|
|
319
323
|
|
|
@@ -332,12 +336,13 @@ AI Assistant <--stdio/MCP--> blenderwright server <--TCP socket--> Blender addon
|
|
|
332
336
|
<summary><strong>Security</strong></summary>
|
|
333
337
|
|
|
334
338
|
- **Localhost only**: The TCP socket binds to `127.0.0.1`, never exposed to the network.
|
|
339
|
+
- **Authenticated socket**: any local program can reach `127.0.0.1`, so the connection is authenticated. Start Server writes a fresh random token to a file only your user can read (`~/Library/Application Support/blenderwright/token` on macOS, `%APPDATA%\blenderwright\token` on Windows, `~/.config/blenderwright/token` on Linux) and deletes it on Stop. The token never crosses the socket: Blender and the MCP server each prove they know it by signing fresh random nonces (HMAC-SHA256), and every command and reply after that is signed with a per-connection key and numbered, so commands cannot be injected, altered or replayed. The MCP server refuses to send anything to a process on the port that cannot prove itself. A failed check closes the connection and the N-panel shows the count. On Windows the port is claimed exclusively. If the MCP server runs where it can't see the token file (WSL, Docker), set `BLENDERWRIGHT_TOKEN_FILE` to its path. Each port has its own token file (`token` for 9876, `token-<port>` otherwise), so two Blenders on two ports never overwrite each other's; point an MCP server at the second one with `BLENDERWRIGHT_PORT`.
|
|
335
340
|
- **Raw Python is off by default**: `execute_blender_code` refuses to run until you tick "Allow raw Python" in the blenderwright N-panel. The switch is a `WindowManager` property, so it is per Blender session and is never written into a `.blend` file. Every run is echoed to the system console and the panel shows a count and the last snippet. The 191 structured tools do not need it.
|
|
336
341
|
- **The restricted namespace is not a sandbox**: when raw Python is on, the import hook refuses 25 imports (`os`, `subprocess`, `socket`, `shutil`, `sys`, `ctypes`, `importlib`, `pathlib`, `signal`, `multiprocessing`, `pickle`, `shelve`, `tempfile`, `http`, `urllib`, `ftplib`, `smtplib`, `xmlrpc`, `code`, `codeop`, `compileall`, `webbrowser`, `antigravity`, `turtle`, `tkinter`) and the builtins `__import__`, `exec`, `eval`, `compile`, `open`, `globals`, `locals`, `vars`, `input`, `breakpoint`, `exit`, `quit`, `help` and `memoryview` are removed. That catches a model making a mistake. It does not contain an adversary: the code runs in-process with full `bpy`, and `bpy` alone can save files anywhere and run any operator. Treat "Allow raw Python" the way you would treat running a script someone else wrote: read what the model is about to run, and turn it off when you are done.
|
|
337
342
|
- **Input validation**: All inputs pass through validators before reaching Blender: name sanitization, path traversal prevention, numeric range checks, enum allowlists.
|
|
338
343
|
- **File safety**: Import operations disable `use_scripts_auto_execute` to prevent script injection from imported files. File extensions are checked against allowlists.
|
|
339
344
|
- **Command allowlist**: The addon dispatcher only processes explicitly registered commands. Unknown commands are rejected.
|
|
340
|
-
- **Shader node allowlist**: Only
|
|
345
|
+
- **Shader node allowlist**: Only 93 known shader node types can be created, which prevents arbitrary type injection.
|
|
341
346
|
|
|
342
347
|
</details>
|
|
343
348
|
|
|
@@ -363,9 +368,12 @@ AI Assistant <--stdio/MCP--> blenderwright server <--TCP socket--> Blender addon
|
|
|
363
368
|
# Install with dev dependencies
|
|
364
369
|
uv pip install -e ".[dev]"
|
|
365
370
|
|
|
366
|
-
#
|
|
371
|
+
# Unit tests: validation and logic, Blender faked
|
|
367
372
|
uv run --extra dev pytest
|
|
368
373
|
|
|
374
|
+
# Live tests: every tool against a real headless Blender 5.2
|
|
375
|
+
BLENDER=/Applications/Blender.app/Contents/MacOS/Blender uv run --extra dev pytest tests_live
|
|
376
|
+
|
|
369
377
|
# Run tests with coverage
|
|
370
378
|
uv run --extra dev pytest --cov=blenderwright
|
|
371
379
|
|
|
@@ -385,11 +393,11 @@ blenderwright/
|
|
|
385
393
|
│ ├── server.py # FastMCP entry point
|
|
386
394
|
│ ├── connection.py # TCP client to Blender (with busy-retry)
|
|
387
395
|
│ ├── validators.py # Input validation
|
|
388
|
-
│ ├── tools/ #
|
|
396
|
+
│ ├── tools/ # 32 tool modules (276 tools)
|
|
389
397
|
│ ├── resources/ # MCP resources (scene, objects, materials)
|
|
390
398
|
│ └── prompts/ # 13 expert prompt templates
|
|
391
399
|
├── addon/ # Blender addon (zero external deps)
|
|
392
|
-
│ ├── blender_manifest.toml # Blender
|
|
400
|
+
│ ├── blender_manifest.toml # Blender 5.2+ Extension manifest
|
|
393
401
|
│ ├── __init__.py # bl_info (legacy fallback) + register/unregister
|
|
394
402
|
│ ├── server.py # TCP socket server (SO_KEEPALIVE)
|
|
395
403
|
│ ├── dispatcher.py # Command routing + allowlist
|
|
@@ -8,8 +8,8 @@ Blender's Python API.
|
|
|
8
8
|
bl_info = {
|
|
9
9
|
"name": "blenderwright",
|
|
10
10
|
"author": "blenderwright",
|
|
11
|
-
"version": (
|
|
12
|
-
"blender": (
|
|
11
|
+
"version": (3, 1, 0),
|
|
12
|
+
"blender": (5, 2, 0),
|
|
13
13
|
"location": "View3D > Sidebar > blenderwright",
|
|
14
14
|
"description": "MCP Server integration for AI-assisted 3D workflows",
|
|
15
15
|
"category": "Interface",
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""Auth for the addon's TCP socket.
|
|
2
|
+
|
|
3
|
+
Any local process can connect to 127.0.0.1, so the socket alone proves
|
|
4
|
+
nothing. On start the server writes a fresh random token to a file only this
|
|
5
|
+
user can read. The token itself never crosses the socket: each side proves it
|
|
6
|
+
knows it by signing fresh nonces, then signs every message with a session
|
|
7
|
+
key. The path and crypto are mirrored in src/blenderwright/connection.py and
|
|
8
|
+
tests keep the two in step.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import hashlib
|
|
12
|
+
import hmac
|
|
13
|
+
import json
|
|
14
|
+
import os
|
|
15
|
+
import secrets
|
|
16
|
+
import sys
|
|
17
|
+
|
|
18
|
+
ENV_TOKEN_FILE = "BLENDERWRIGHT_TOKEN_FILE"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
DEFAULT_PORT = 9876
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def token_path(port: int = DEFAULT_PORT) -> str:
|
|
25
|
+
"""Where the token lives: the env override, else the user's config dir."""
|
|
26
|
+
override = os.environ.get(ENV_TOKEN_FILE)
|
|
27
|
+
if override:
|
|
28
|
+
return override
|
|
29
|
+
home = os.path.expanduser("~")
|
|
30
|
+
if sys.platform == "win32":
|
|
31
|
+
base = os.environ.get("APPDATA") or os.path.join(home, "AppData", "Roaming")
|
|
32
|
+
elif sys.platform == "darwin":
|
|
33
|
+
base = os.path.join(home, "Library", "Application Support")
|
|
34
|
+
else:
|
|
35
|
+
base = os.environ.get("XDG_CONFIG_HOME") or os.path.join(home, ".config")
|
|
36
|
+
# One file per port so two Blenders cannot overwrite each other's token;
|
|
37
|
+
# the default port keeps the plain name older setups know
|
|
38
|
+
name = "token" if port == 9876 else f"token-{int(port)}"
|
|
39
|
+
return os.path.join(base, "blenderwright", name)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def new_token() -> str:
|
|
43
|
+
return secrets.token_hex(32)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def write_token(token: str, port: int = DEFAULT_PORT) -> None:
|
|
47
|
+
"""Write the token readable by this user only, replacing any old file."""
|
|
48
|
+
path = token_path(port)
|
|
49
|
+
directory = os.path.dirname(path)
|
|
50
|
+
os.makedirs(directory, mode=0o700, exist_ok=True)
|
|
51
|
+
if sys.platform != "win32":
|
|
52
|
+
os.chmod(directory, 0o700)
|
|
53
|
+
# A fresh 0600 file swapped in, so an old file's looser mode never applies
|
|
54
|
+
tmp = f"{path}.{os.getpid()}.tmp"
|
|
55
|
+
fd = os.open(tmp, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
|
|
56
|
+
try:
|
|
57
|
+
with os.fdopen(fd, "w", encoding="utf-8") as f:
|
|
58
|
+
f.write(token)
|
|
59
|
+
os.replace(tmp, path)
|
|
60
|
+
except BaseException:
|
|
61
|
+
try:
|
|
62
|
+
os.remove(tmp)
|
|
63
|
+
except OSError:
|
|
64
|
+
pass
|
|
65
|
+
raise
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def clear_token(port: int = DEFAULT_PORT) -> None:
|
|
69
|
+
try:
|
|
70
|
+
os.remove(token_path(port))
|
|
71
|
+
except FileNotFoundError:
|
|
72
|
+
pass
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# Challenge-response handshake (protocol 2). Mirrored in
|
|
76
|
+
# src/blenderwright/connection.py; tests/test_handshake.py keeps them equal.
|
|
77
|
+
PROTOCOL_VERSION = 2
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def proof(token: str, role: str, first_nonce: str, second_nonce: str) -> str:
|
|
81
|
+
"""HMAC proving knowledge of the token, bound to both nonces and a role."""
|
|
82
|
+
message = f"blenderwright-{role}|{first_nonce}|{second_nonce}".encode("utf-8")
|
|
83
|
+
return hmac.new(token.encode("utf-8"), message, hashlib.sha256).hexdigest()
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def session_key(token: str, client_nonce: str, server_nonce: str) -> bytes:
|
|
87
|
+
"""Per-connection key for signing commands and replies."""
|
|
88
|
+
message = f"blenderwright-session|{client_nonce}|{server_nonce}".encode("utf-8")
|
|
89
|
+
return hmac.new(token.encode("utf-8"), message, hashlib.sha256).digest()
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def message_mac(key: bytes, direction: str, seq: int, body: dict) -> str:
|
|
93
|
+
"""Signature over one message body, its direction and its sequence number."""
|
|
94
|
+
canonical = json.dumps(body, sort_keys=True, separators=(",", ":"))
|
|
95
|
+
message = f"{direction}|{seq}|".encode("utf-8") + canonical.encode("utf-8")
|
|
96
|
+
return hmac.new(key, message, hashlib.sha256).hexdigest()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
schema_version = "1.0.0"
|
|
2
2
|
|
|
3
3
|
id = "blenderwright"
|
|
4
|
-
version = "
|
|
4
|
+
version = "3.1.0"
|
|
5
5
|
name = "blenderwright"
|
|
6
6
|
tagline = "MCP server integration for AI-assisted 3D workflows"
|
|
7
7
|
maintainer = "jabberwock <88205+jabberwock@users.noreply.github.com>"
|
|
@@ -11,7 +11,7 @@ website = "https://github.com/HoldMyBeer-gg/blenderwright"
|
|
|
11
11
|
|
|
12
12
|
tags = ["Pipeline", "Development"]
|
|
13
13
|
|
|
14
|
-
blender_version_min = "
|
|
14
|
+
blender_version_min = "5.2.0"
|
|
15
15
|
|
|
16
16
|
license = [
|
|
17
17
|
"SPDX:MIT",
|
|
@@ -4,6 +4,7 @@ Routes incoming commands to their handler functions.
|
|
|
4
4
|
Only commands in the explicit allowlist are processed.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
+
import json
|
|
7
8
|
from typing import Any, Callable
|
|
8
9
|
|
|
9
10
|
# Registry of allowed commands -> handler functions
|
|
@@ -39,6 +40,13 @@ def dispatch(command: str, params: dict[str, Any] | None = None) -> dict[str, An
|
|
|
39
40
|
try:
|
|
40
41
|
handler = _handlers[command]
|
|
41
42
|
result = handler(params or {})
|
|
43
|
+
# An unencodable reply used to kill the client thread mid-send, which
|
|
44
|
+
# the MCP side saw as "Connection to Blender lost"
|
|
45
|
+
try:
|
|
46
|
+
json.dumps(result)
|
|
47
|
+
except (TypeError, ValueError) as e:
|
|
48
|
+
return {"status": "error",
|
|
49
|
+
"result": f"{command} returned a value that cannot be sent: {e}"}
|
|
42
50
|
return {"status": "ok", "result": result}
|
|
43
51
|
except Exception as e:
|
|
44
52
|
return {"status": "error", "result": f"{type(e).__name__}: {str(e)}"}
|