From a9299371afed1e9b339123e1148a5095c7583e80 Mon Sep 17 00:00:00 2001
From: Asgard <95163444+AsgardXIV@users.noreply.github.com>
Date: Sat, 14 May 2022 20:54:05 -0600
Subject: [PATCH] Voice support
---
Anamnesis/Actor/Pages/ActionPage.xaml | 2 -
Anamnesis/Actor/Pages/ActionPage.xaml.cs | 11 ++-
Anamnesis/Actor/Pages/CharacterPage.xaml | 79 +++++++--------
Anamnesis/Actor/Pages/CharacterPage.xaml.cs | 96 ++++++++++++++-----
.../Actor/Views/CharacterModelEditor.xaml | 4 +-
Anamnesis/Actor/Views/ItemView.xaml.cs | 2 +-
Anamnesis/GameData/Excel/CharaMakeType.cs | 9 ++
Anamnesis/Languages/en.json | 1 +
Anamnesis/Memory/ActorBasicMemory.cs | 4 +
Anamnesis/Memory/ActorMemory.cs | 7 +-
Anamnesis/Memory/ActorModelMemory.cs | 4 +-
11 files changed, 139 insertions(+), 80 deletions(-)
diff --git a/Anamnesis/Actor/Pages/ActionPage.xaml b/Anamnesis/Actor/Pages/ActionPage.xaml
index 5678a7e53..01fd40303 100644
--- a/Anamnesis/Actor/Pages/ActionPage.xaml
+++ b/Anamnesis/Actor/Pages/ActionPage.xaml
@@ -84,8 +84,6 @@
Style="{StaticResource Label}" />
-
-
diff --git a/Anamnesis/Actor/Pages/ActionPage.xaml.cs b/Anamnesis/Actor/Pages/ActionPage.xaml.cs
index 326f32525..90328190b 100644
--- a/Anamnesis/Actor/Pages/ActionPage.xaml.cs
+++ b/Anamnesis/Actor/Pages/ActionPage.xaml.cs
@@ -27,8 +27,7 @@ public ActionPage()
this.ContentArea.DataContext = this;
- // Grab "no animation" and all "speak/" animations, which are the only ones valid in this slot
- this.LipSyncTypes = GameDataService.ActionTimelines.Where(x => x.AnimationId == 0 || (x.Key?.StartsWith("speak/") ?? false));
+ this.LipSyncTypes = this.GenerateLipList();
}
public GposeService GposeService => GposeService.Instance;
@@ -36,6 +35,7 @@ public ActionPage()
public PoseService PoseService => PoseService.Instance;
public ActorMemory? Actor { get; private set; }
public IEnumerable LipSyncTypes { get; private set; }
+
public UserAnimationOverride AnimationOverride { get; private set; } = new();
public ConditionalWeakTable UserAnimationOverrides { get; private set; } = new();
@@ -78,6 +78,13 @@ private void OnActorChanged(ActorMemory? actor)
}
}
+ private IEnumerable GenerateLipList()
+ {
+ // Grab "no animation" and all "speak/" animations, which are the only ones valid in this slot
+ IEnumerable lips = GameDataService.ActionTimelines.Where(x => x.AnimationId == 0 || (x.Key?.StartsWith("speak/") ?? false));
+ return lips;
+ }
+
private void OnBaseAnimationSearchClicked(object sender, RoutedEventArgs e)
{
if (this.Actor == null)
diff --git a/Anamnesis/Actor/Pages/CharacterPage.xaml b/Anamnesis/Actor/Pages/CharacterPage.xaml
index 64fb307f4..a3b7c38a2 100644
--- a/Anamnesis/Actor/Pages/CharacterPage.xaml
+++ b/Anamnesis/Actor/Pages/CharacterPage.xaml
@@ -57,7 +57,7 @@