diff --git a/src/lib/studio-scene-data.ts b/src/lib/studio-scene-data.ts index f453aab..5deca1f 100644 --- a/src/lib/studio-scene-data.ts +++ b/src/lib/studio-scene-data.ts @@ -90,7 +90,15 @@ function layersFromContents(contents: unknown[]): Layer[] { function parseScene(value: unknown): Scene | null { if (!isRecord(value)) return null; - if (typeof value.id !== "string") return null; + // Studio's own save format uses string ids; the V2 relational assembly uses numeric + // ids — accept both (coerce to string). + const id = + typeof value.id === "string" + ? value.id + : typeof value.id === "number" + ? String(value.id) + : null; + if (id === null) return null; const name = typeof value.name === "string" ? value.name @@ -120,7 +128,7 @@ function parseScene(value: unknown): Scene | null { : "none"; return { - id: value.id, + id, name, duration: typeof value.duration === "number"