Ignored the .opencode folder as local-only
This commit is contained in:
parent
a205f37028
commit
81211c2040
2 changed files with 3 additions and 92 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -14,3 +14,6 @@ src/editor/
|
||||||
|
|
||||||
# Local Pi Forgejo credentials; never commit.
|
# Local Pi Forgejo credentials; never commit.
|
||||||
pi-forgejo-credentials.md
|
pi-forgejo-credentials.md
|
||||||
|
|
||||||
|
# Local OpenCode agent config and skills; never pushed.
|
||||||
|
.opencode/
|
||||||
|
|
|
||||||
|
|
@ -1,92 +0,0 @@
|
||||||
---
|
|
||||||
name: blender-mcp-iterative
|
|
||||||
description: Use when creating or revising Blender assets through Blender MCP. Covers small-step modeling, viewport verification, export, and in-engine validation.
|
|
||||||
---
|
|
||||||
|
|
||||||
# Iterative Blender MCP workflow
|
|
||||||
|
|
||||||
Use Blender MCP as a visual feedback loop, not a one-shot code dump. Every visual change must be observed before the next edit.
|
|
||||||
|
|
||||||
## Preconditions
|
|
||||||
- Blender is running with the MCP addon enabled on port 9877.
|
|
||||||
- Run `get_addon_status` first. If `up_to_date` is false, stop and update the addon.
|
|
||||||
- Run `get_scene_info` before editing. Record object count, active object, mode, and selected objects.
|
|
||||||
- For repo assets, use the repo scripts and helpers rather than ad hoc meshes when possible.
|
|
||||||
|
|
||||||
## Core loop
|
|
||||||
1. Inspect: `get_scene_info`.
|
|
||||||
2. Make one small change with `execute_blender_code`.
|
|
||||||
3. Inspect visually with `look`.
|
|
||||||
4. Decide: keep, adjust, or undo.
|
|
||||||
5. Repeat until the asset reads correctly from the intended camera angle.
|
|
||||||
6. Export only after visual approval.
|
|
||||||
7. Validate the exported file and integrate it into the project.
|
|
||||||
8. Run the project build and a screenshot smoke test.
|
|
||||||
|
|
||||||
## One change per code call
|
|
||||||
- Do not batch unrelated mesh edits, material edits, and exports in one call.
|
|
||||||
- Each `execute_blender_code` call should do one logical operation:
|
|
||||||
- create one primitive or helper object;
|
|
||||||
- adjust one proportion;
|
|
||||||
- apply one material/color change;
|
|
||||||
- merge/export.
|
|
||||||
- Print enough diagnostics in code: triangle count, object names, export path, file size.
|
|
||||||
- If a call fails, fix only that failure. Do not continue stacking edits on a broken state.
|
|
||||||
|
|
||||||
## Visual verification
|
|
||||||
- Call `look` after every meaningful visual change.
|
|
||||||
- Compare against the intended reference: silhouette, scale, facing, Hiss/Mold color language, and readability at tactical distance.
|
|
||||||
- Check from more than one angle when shape ambiguity matters.
|
|
||||||
- For actors, verify feet at origin and +Z-facing after export conventions.
|
|
||||||
- Do not trust triangle counts or successful exports as proof of appearance.
|
|
||||||
|
|
||||||
## Repository conventions for actors
|
|
||||||
- Origin at feet.
|
|
||||||
- Facing +Z in engine after glTF Y-up conversion.
|
|
||||||
- One merged mesh.
|
|
||||||
- One material.
|
|
||||||
- Vertex colors stored in the `Color` attribute.
|
|
||||||
- Use `actor_kit.py` helpers (`loft`, `tube`, `blob`, `crystal`, `plate`, `ring`) instead of raw primitive spam.
|
|
||||||
- Keep triangle budget explicit and under the declared cap.
|
|
||||||
- Hiss assets use red/black-red growths; Mold uses sickly green; Taken uses near-black with rim.
|
|
||||||
|
|
||||||
## Export checklist
|
|
||||||
- Remove or exclude temporary/helper objects from export selection.
|
|
||||||
- Merge meshes before export.
|
|
||||||
- Apply transforms before export.
|
|
||||||
- Export as GLB.
|
|
||||||
- Confirm output path and file size.
|
|
||||||
- Re-run the owning generator script so the asset is reproducible, not just a manual Blender edit.
|
|
||||||
|
|
||||||
## Integration checklist
|
|
||||||
- Add or update the matching enum value in C++.
|
|
||||||
- Add model path, height, rig, and fallback.
|
|
||||||
- Update presenter mapping.
|
|
||||||
- Update director spawn card if the enemy is meant to spawn.
|
|
||||||
- Add enemy definition with stats and XP.
|
|
||||||
- Build with `cmake --build build -j6`.
|
|
||||||
- Run `./build/cntrl --seed 42 --screenshot /tmp/opencode/check.png --screenshot-at 8`.
|
|
||||||
- Inspect the screenshot and logs for missing-model fallbacks or crashes.
|
|
||||||
|
|
||||||
## Common failure modes
|
|
||||||
- `NameError`: missing imports in `execute_blender_code`; always import `math`, `os`, `bpy`, and helpers explicitly.
|
|
||||||
- Addon protocol mismatch: stop and update before continuing.
|
|
||||||
- Exported mesh has multiple primitives: merge did not run or selection was wrong.
|
|
||||||
- Wrong scale: compare world bounding box against an existing actor.
|
|
||||||
- Model not found in game: path mismatch between `models.cpp` and exported filename.
|
|
||||||
- Fallback primitive appears in game: GLB failed to load or enum/path mapping is wrong.
|
|
||||||
- Scene state drift: record and reset state between unrelated experiments.
|
|
||||||
|
|
||||||
## Recovery
|
|
||||||
- If a viewport result is wrong, revert only the last small edit.
|
|
||||||
- If the scene becomes inconsistent, clear and rebuild from the owning script.
|
|
||||||
- If an export is bad, do not integrate it. Fix and re-export first.
|
|
||||||
- If integration fails, keep the model work separate from C++ changes until the GLB is stable.
|
|
||||||
|
|
||||||
## Minimum validation before declaring done
|
|
||||||
- `look` screenshot reviewed.
|
|
||||||
- Triangle budget within cap.
|
|
||||||
- GLB exists at expected path.
|
|
||||||
- Owning generator script rebuilds the asset successfully.
|
|
||||||
- Project builds.
|
|
||||||
- Automated screenshot smoke test runs without model-load errors.
|
|
||||||
Loading…
Add table
Reference in a new issue