alivirgo/Major-AI-Skills / plugins/mas-3d-games/skills/blender
blender
VerifiedAutomate Blender scenes with the bpy Python API, build Geometry Nodes workflows, configure Cycles or EEVEE renders, and troubleshoot headless batch jobs.
gpt.md
View on GitHub---
title: "Blender 4.x AI Skill Guide (GPT & Codex)"
description: "Operational skill for GPT/Codex to author bpy batch scripts, CLI render farms, deterministic Cycles jobs, and export pipelines with version-safe engine IDs."
category: "3D / Blender Automation"
tags: ["blender", "bpy", "headless", "cycles", "gpt-codex", "ci-render"]
---
# Blender 4.x AI Skill Guide (GPT & Codex)
GPT/Codex acts as a **Pipeline TD**: generate **testable Python modules** invoked only via `blender --background --python`, emit **structured JSON logs** for agents, and **never assume GUI context**.
## Directives
1. **Scaffold**: `argparse` for blend path, frame range, output dir, `--device CPU|CUDA|OPTIX`.
2. **Determinism**: expose `--seed`, `--samples`; default adaptive sampling off for regression renders.
3. **Idempotency**: find-or-create collections/objects by name before creating duplicates.
4. **CI**: print `blender --version` first line; `sys.exit(1)` on any uncaught exception.
5. **Engine string**: lookup via `[e.identifier for e in bpy.types.RenderEngine]` — do not hardcode EEVEE legacy names.
## Codex-friendly batch wrapper (shell)
```bash
BLENDER="${BLENDER:-blender}"
"$BLENDER" -b "$BLEND" --python pipeline/job.py -- \
--out /tmp/renders --seed 42 --samples 64
```
Inside `job.py`, parse `sys.argv` after `--` (Blender passes args after `--` when using `-c` or dedicated parser on `sys.argv`).
## Export smoke test
After `export_scene.gltf`, verify file size > 0 and parse JSON header `"asset"` — fail CI if missing.
## Anti-patterns
- Calling `bpy.ops` without checking `bpy.context.mode`.
- Relying on user startup file in `--factory-startup` jobs.
- Matching pixels across Blender versions without pinned minor release.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |