Update migrateSceneDocument to handle materials and brushes
This commit is contained in:
@@ -327,6 +327,9 @@ export function migrateSceneDocument(source: unknown): SceneDocument {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (source.version === FOUNDATION_SCENE_DOCUMENT_VERSION) {
|
if (source.version === FOUNDATION_SCENE_DOCUMENT_VERSION) {
|
||||||
|
expectEmptyCollection(source.materials, "materials");
|
||||||
|
expectEmptyCollection(source.brushes, "brushes");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
version: SCENE_DOCUMENT_VERSION,
|
version: SCENE_DOCUMENT_VERSION,
|
||||||
name: expectString(source.name, "name"),
|
name: expectString(source.name, "name"),
|
||||||
@@ -342,6 +345,7 @@ export function migrateSceneDocument(source: unknown): SceneDocument {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (source.version === BOX_BRUSH_SCENE_DOCUMENT_VERSION) {
|
if (source.version === BOX_BRUSH_SCENE_DOCUMENT_VERSION) {
|
||||||
|
expectEmptyCollection(source.materials, "materials");
|
||||||
const materials = createStarterMaterialRegistry();
|
const materials = createStarterMaterialRegistry();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user