Add allowMissingTimeSettings check in migrateProjectDocument
This commit is contained in:
@@ -3106,6 +3106,8 @@ export function migrateProjectDocument(source: unknown): ProjectDocument {
|
|||||||
source.version < PROJECT_NAME_SCENE_DOCUMENT_VERSION;
|
source.version < PROJECT_NAME_SCENE_DOCUMENT_VERSION;
|
||||||
const allowMissingEditorPreferences =
|
const allowMissingEditorPreferences =
|
||||||
source.version < SCENE_EDITOR_PREFERENCES_SCENE_DOCUMENT_VERSION;
|
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)) {
|
for (const [sceneKey, sceneValue] of Object.entries(source.scenes)) {
|
||||||
scenes[sceneKey] = readProjectScene(
|
scenes[sceneKey] = readProjectScene(
|
||||||
@@ -3125,6 +3127,9 @@ export function migrateProjectDocument(source: unknown): ProjectDocument {
|
|||||||
name: readProjectName(source.name, "name", {
|
name: readProjectName(source.name, "name", {
|
||||||
allowMissing: allowMissingProjectName
|
allowMissing: allowMissingProjectName
|
||||||
}),
|
}),
|
||||||
|
time: readProjectTimeSettings(source.time, "time", {
|
||||||
|
allowMissing: allowMissingTimeSettings
|
||||||
|
}),
|
||||||
activeSceneId: expectString(source.activeSceneId, "activeSceneId"),
|
activeSceneId: expectString(source.activeSceneId, "activeSceneId"),
|
||||||
scenes,
|
scenes,
|
||||||
materials,
|
materials,
|
||||||
|
|||||||
Reference in New Issue
Block a user