Update migrateSceneDocument to handle materials and brushes

This commit is contained in:
2026-03-31 02:40:21 +02:00
parent e16ff9b2c5
commit 4fcdf4871f

View File

@@ -327,6 +327,9 @@ export function migrateSceneDocument(source: unknown): SceneDocument {
}
if (source.version === FOUNDATION_SCENE_DOCUMENT_VERSION) {
expectEmptyCollection(source.materials, "materials");
expectEmptyCollection(source.brushes, "brushes");
return {
version: SCENE_DOCUMENT_VERSION,
name: expectString(source.name, "name"),
@@ -342,6 +345,7 @@ export function migrateSceneDocument(source: unknown): SceneDocument {
}
if (source.version === BOX_BRUSH_SCENE_DOCUMENT_VERSION) {
expectEmptyCollection(source.materials, "materials");
const materials = createStarterMaterialRegistry();
return {