Add allowMissingTimeSettings check in migrateProjectDocument

This commit is contained in:
2026-04-12 04:31:41 +02:00
parent 30a0a77468
commit 2f8b95a7e2

View File

@@ -3106,6 +3106,8 @@ export function migrateProjectDocument(source: unknown): ProjectDocument {
source.version < PROJECT_NAME_SCENE_DOCUMENT_VERSION;
const allowMissingEditorPreferences =
source.version < SCENE_EDITOR_PREFERENCES_SCENE_DOCUMENT_VERSION;
const allowMissingTimeSettings =
source.version < PROJECT_TIME_SYSTEM_SCENE_DOCUMENT_VERSION;
for (const [sceneKey, sceneValue] of Object.entries(source.scenes)) {
scenes[sceneKey] = readProjectScene(
@@ -3125,6 +3127,9 @@ export function migrateProjectDocument(source: unknown): ProjectDocument {
name: readProjectName(source.name, "name", {
allowMissing: allowMissingProjectName
}),
time: readProjectTimeSettings(source.time, "time", {
allowMissing: allowMissingTimeSettings
}),
activeSceneId: expectString(source.activeSceneId, "activeSceneId"),
scenes,
materials,