US-1: Asset Import Pipeline — glTF upload endpoint with metadata extraction #27

Merged
reviewer-bot merged 5 commits from agent/25d5046bb30c into main 2026-08-19 13:58:16 +00:00
Collaborator

Auto-opened by architect for task 25d5046bb30c.

Dashboard: http://cloudbison:7070/task/25d5046bb30c

User Story: As a creator, I can import glTF models and textures into my experience so that I can use custom 3D assets.

Task: Extend the existing asset upload endpoint (POST /api/assets/{id}/upload) to detect glTF/GLB files and extract metadata (mesh_count, vertex_count, has_animation, texture_refs, bounding_box). Add glTF-specific fields to the Asset model and response schema.

Files:

  • backend/app/models/asset.py — add glTF metadata fields (mesh_count: int, vertex_count: int, has_animation: bool, texture_refs: list[str], bounding_box_min: list[float], bounding_box_max: list[float])
  • backend/app/routers/assets.py — add glTF detection in upload endpoint, metadata extraction using a lightweight glTF parser (e.g., gltf or trimesh), store metadata in metadata_json column
  • backend/app/config.py — add GLTF_MAX_FILE_SIZE_MB setting if needed

Acceptance Criteria:

  • POST /api/assets/{id}/upload with a .glb/.gltf file extracts mesh_count, vertex_count, has_animation, texture_refs, and bounding box
  • Non-glTF files upload normally without error (no regression)
  • Metadata is stored in metadata_json and returned in GET response
  • File stored on disk at configured upload directory
  • Unit tests for metadata extraction (mock glTF binary)

Dependencies: None (builds on existing asset infrastructure)

Auto-opened by architect for task `25d5046bb30c`. Dashboard: http://cloudbison:7070/task/25d5046bb30c **User Story:** As a creator, I can import glTF models and textures into my experience so that I can use custom 3D assets. **Task:** Extend the existing asset upload endpoint (`POST /api/assets/{id}/upload`) to detect glTF/GLB files and extract metadata (mesh_count, vertex_count, has_animation, texture_refs, bounding_box). Add glTF-specific fields to the Asset model and response schema. **Files:** - `backend/app/models/asset.py` — add glTF metadata fields (mesh_count: int, vertex_count: int, has_animation: bool, texture_refs: list[str], bounding_box_min: list[float], bounding_box_max: list[float]) - `backend/app/routers/assets.py` — add glTF detection in upload endpoint, metadata extraction using a lightweight glTF parser (e.g., `gltf` or `trimesh`), store metadata in `metadata_json` column - `backend/app/config.py` — add `GLTF_MAX_FILE_SIZE_MB` setting if needed **Acceptance Criteria:** - POST `/api/assets/{id}/upload` with a `.glb`/`.gltf` file extracts mesh_count, vertex_count, has_animation, texture_refs, and bounding box - Non-glTF files upload normally without error (no regression) - Metadata is stored in `metadata_json` and returned in GET response - File stored on disk at configured upload directory - Unit tests for metadata extraction (mock glTF binary) **Dependencies:** None (builds on existing asset infrastructure)
architect-bot added 5 commits 2026-08-19 12:51:08 +00:00
reviewer-bot merged commit a29cfc74af into main 2026-08-19 13:58:16 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: daddy/modbison#27