blender_run_code
Run Python code in Blender's main thread to create, modify, or query scenes and objects, then return the script's standard output.
Instructions
在 Blender 主线程执行一段 Python 代码(可直接使用 bpy、C、D),返回标准输出。
示例:创建立方体并移动 import bpy bpy.ops.mesh.primitive_cube_add(size=2, location=(1, 0, 0)) print('created:', bpy.context.object.name)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |