---
id: TASK-26
title: Port folk-blender-gen shape (3D procedural generation)
status: To Do
assignee: []
created_date: '2026-02-18 19:49'
labels:
  - shape-port
  - phase-2
  - ai
milestone: m-0
dependencies:
  - TASK-24
  - TASK-25
references:
  - canvas-website/src/shapes/BlenderGenShapeUtil.tsx
  - rspace-online/lib/folk-image-gen.ts (pattern reference)
priority: medium
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Port BlenderGenShapeUtil from canvas-website to rspace-online as a FolkShape Web Component.

Source: canvas-website/src/shapes/BlenderGenShapeUtil.tsx (693 lines)
Target: rspace-online/lib/folk-blender-gen.ts

Features to implement:
- Blender script editor textarea
- LLM code generation (prompt → Blender Python script)
- 3D preview iframe/canvas
- Model download button
- Loading/error states

Follow folk-image-gen.ts pattern for API-calling shape with loading/result states.
Needs /api/blender-gen server endpoint (TASK-25).
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Shape renders with script editor and 3D preview
- [ ] #2 LLM code generation produces valid Blender scripts
- [ ] #3 Results sync across clients via Automerge
- [ ] #4 Toolbar button added to canvas.html
<!-- AC:END -->
