Visual Studio v3 — layered projects and artwork import¶
Status: shipped in main. No earlier version doc existed for v3; this page
records what the code provides, so the version history is complete.
What v3 adds¶
Visual Studio keeps an editable, layered project alongside a finished export, instead of flattening everything to pixels.
- Editable layers + file: choosing
Editable layers + file(output modelayered) saves a.design.jsondraft next to the export. Native scenes keep individually editable text, icons, cards, shapes and connectors, including hidden/locked/group/animation state, up to 40 layers. The draft reopens in the editor exactly as designed. - Import artwork: any PNG, JPEG, WebP or BMP inside the user's own workspace (max 24 MB, max 36 megapixels, single frame only) opens as one protected image layer on a canvas fitted to the image, never stretched. No hidden AI layers are reconstructed: an imported photograph is a single raster layer, and further text, shapes and icons are added as separate editable layers.
- Reopen generated artwork: if a Mewlith-generated image has a provenance
manifest (
.visual.json) whose recorded output hash still matches the file, opening it recovers the original editable project instead of flattening it to a single image layer.
Guarantees and limits¶
- Drafts are validated through the same scene compiler as any editor canvas, so a saved project is guaranteed to reopen.
- Image sources must stay inside the authenticated user's workspace; absolute paths and paths outside the workspace are rejected.
- A GIF is multiple raster frames, not editable vector art: importing one extracts its first frame as a PNG.
- Layered projects support one canvas; multi-page documents use the v8
schema:2draft format instead. - This is not a Figma/PSD interchange format:
.design.jsonis Mewlith's own native project format.
Implementation¶
mewlith/visual_projects.py (image_project, scene_project,
save_project), wired through mewlith/visual_art_tools.py
(visual_create, output mode layered) and the editor import endpoint
(POST /api/visual/studio/import).
Tests¶
tests/test_visual_studio.py (layered export preserves the editable draft and
provenance), tests/test_visual_design.py and tests/test_visual_documents.py.