From 080f28c5e192ae49999c6f1795adc98fc758d918 Mon Sep 17 00:00:00 2001 From: FromTheLOLAshes <153381408+FromTheLOLAshes@users.noreply.github.com> Date: Sun, 19 May 2024 19:50:44 -0400 Subject: [PATCH] Fix bug expressions not being added to timeline on load (#395) Co-authored-by: Christopher Oliphant --- .../characterGroups/loadCharacterData.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/pages/PageEnigma/signals/characterGroups/loadCharacterData.ts b/app/pages/PageEnigma/signals/characterGroups/loadCharacterData.ts index 66bc221c37..3f1d0a0597 100644 --- a/app/pages/PageEnigma/signals/characterGroups/loadCharacterData.ts +++ b/app/pages/PageEnigma/signals/characterGroups/loadCharacterData.ts @@ -58,6 +58,23 @@ export function loadCharacterData(item: ClipUI) { (clipA, clipB) => clipA.offset - clipB.offset, ); } + if (item.type === ClipType.EXPRESSION) { + const newItem = { + version: item.version, + clip_uuid: item.clip_uuid, + type: item.type, + group: item.group, + object_uuid: item.object_uuid, + media_id: item.media_id, + name: item.name, + offset: item.offset, + length: item.length, + } as Clip; + existingCharacter.expressionClips.push(newItem); + existingCharacter.expressionClips.sort( + (clipA, clipB) => clipA.offset - clipB.offset, + ); + } if (item.type === ClipType.TRANSFORM) { const newKeyframe = { version: item.version,