AI & Integration v1.0.0

blender-bpy

Blender Python scripting via bpy API. Use for scene automation, procedural modeling, batch rendering, and object...

flayzz 更新于 2026-03-15 1 浏览
下载 SKILL

技能说明

Blender Python scripting via bpy API. Use for scene automation, procedural modeling, batch rendering, and object manipulation.

使用场景

Blender Python scripting via bpy API. Use for scene automation, procedural modeling, batch rendering, and object manipulation.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/blender-bpy
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 15 kB
SKILL.md text/markdown
---
name: blender_bpy
description: Blender Python scripting via bpy API. Use for scene automation, procedural modeling, batch rendering, and object manipulation.
metadata: { "openclaw": { "requires": { "bins": ["blender"] }, "user-invocable": true } }
---

# Blender Python Automation (bpy)

## Prerequisites
- Blender must be installed and accessible from the CLI (`blender --version`).
- Scripts run via: `blender --background --python <script.py>`
- For interactive use: connect via Blender's built-in Python console or the REST server addon.

## Common Snippets

### Create an object
```python
import bpy
bpy.ops.mesh.primitive_cube_add(location=(0, 0, 0))
obj = bpy.context.object
obj.name = "MyCube"
```

### Batch render all frames
```python
import bpy
scene = bpy.context.scene
scene.render.filepath = "//renders/frame_"
bpy.ops.render.render(animation=True)
```

### Apply a material by name
```python
import bpy
mat = bpy.data.materials.get("MyMaterial")
if mat is None:
    mat = bpy.data.materials.new(name="MyMaterial")
obj = bpy.context.object
if obj.data.materials:
    obj.data.materials[0] = mat
else:
    obj.data.materials.append(mat)
```

## Tips
- Always use `--background` when running headless (no UI).
- Use `bpy.data` (global access) vs `bpy.context` (active selection) correctly.
- For long renders, consider Cron jobs in OpenClaw so main chat isn't blocked.

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。