diff --git a/src/document/migrate-scene-document.ts b/src/document/migrate-scene-document.ts index 4b62b2b5..c57b78e8 100644 --- a/src/document/migrate-scene-document.ts +++ b/src/document/migrate-scene-document.ts @@ -5678,6 +5678,26 @@ function readScenePathValue(value: unknown, label: string): ScenePath { visible: expectBoolean(value.visible, `${label}.visible`), enabled: expectBoolean(value.enabled, `${label}.enabled`), loop: expectBoolean(value.loop, `${label}.loop`), + curveMode: + value.curveMode === undefined + ? DEFAULT_SCENE_PATH_CURVE_MODE + : isScenePathCurveMode(value.curveMode) + ? value.curveMode + : expectLiteralString( + value.curveMode, + DEFAULT_SCENE_PATH_CURVE_MODE, + `${label}.curveMode` + ), + sampledResolution: + value.sampledResolution === undefined + ? DEFAULT_SCENE_PATH_SAMPLED_RESOLUTION + : normalizeScenePathSampledResolution( + readOptionalPositiveInteger( + value.sampledResolution, + `${label}.sampledResolution`, + DEFAULT_SCENE_PATH_SAMPLED_RESOLUTION + ) + ), points: value.points.map((pointValue, index) => readScenePathPointValue(pointValue, `${label}.points.${index}`) ) diff --git a/src/document/scene-document.ts b/src/document/scene-document.ts index 4677fc4a..6093443b 100644 --- a/src/document/scene-document.ts +++ b/src/document/scene-document.ts @@ -35,7 +35,8 @@ import { type FoliagePrototypeRegistry } from "../foliage/foliage"; -export const SCENE_DOCUMENT_VERSION = 99 as const; +export const SCENE_DOCUMENT_VERSION = 100 as const; +export const SPLINE_PATH_SCENE_DOCUMENT_VERSION = 100 as const; export const NPC_TARGET_ANCHOR_SCENE_DOCUMENT_VERSION = 99 as const; export const NPC_TARGETING_DEFAULT_SCENE_DOCUMENT_VERSION = 98 as const; export const NPC_TARGETING_SCENE_DOCUMENT_VERSION = 97 as const;