Fix bug expressions not being added to timeline on load (#395)

Co-authored-by: Christopher Oliphant <RALifeCoach@users.noreply.github.com>
This commit is contained in:
FromTheLOLAshesandChristopher Oliphant authored and GitHub committed 2024-05-19 19:50:44 -04:00
1 parent e65b94405a
commit 080f28c5e1
1 file changed
+17
@@ -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,