Skip to content

Commit 526e0f9

Browse files
committed
fix: correct spelling of TachieTypeText and update related bindings; refactor LipSyncOption to include layer management
1 parent 4f97b37 commit 526e0f9

File tree

9 files changed

+340
-160
lines changed

9 files changed

+340
-160
lines changed

KuchiPaku.Core/Models/LipSyncOption.cs

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,23 @@ namespace KuchiPaku.Models;
66
public class LipSyncOption
77
{
88
public string? CharacterName { get; set; }
9-
public string? MouseDir { get; set; }
9+
public string? TargetDir { get; set; }
10+
public string TachieType { get; set; } = YmmpTachieType.AnimationTachie;
1011

1112
/// <summary>
1213
/// 音素と画像名のtupleペアCollection
1314
/// "音素文字列":"画像名"
15+
/// 動く立ち絵用
1416
/// </summary>
1517
public Dictionary<string, string> MousePhonemeImagePair { get; set; } = [];
1618

19+
/// <summary>
20+
/// 音素と有効レイヤーリストのCollection
21+
/// "音素文字列":"有効レイヤー名リスト"
22+
/// PSD立ち絵用
23+
/// </summary>
24+
public Dictionary<string, IEnumerable<string>> MousePhonemeLayerPair { get; set; } = [];
25+
1726
/// <summary>
1827
/// 子音処理オプション
1928
/// * 0 - すべて「ん」として処理する
@@ -26,13 +35,16 @@ public class LipSyncOption
2635
public static LipSyncOption GetDefault(
2736
string name,
2837
string dirPath,
29-
string? imgPath
38+
string tachieType,
39+
string? imgPath = null,
40+
IEnumerable<string>? layers = null
3041
)
3142
{
3243
return new LipSyncOption
3344
{
3445
CharacterName = name,
35-
MouseDir = dirPath,
46+
TargetDir = dirPath,
47+
TachieType = tachieType,
3648
MousePhonemeImagePair = new Dictionary<string, string>
3749
{
3850
{ "a", imgPath ?? "" },
@@ -42,6 +54,15 @@ public static LipSyncOption GetDefault(
4254
{ "o", imgPath ?? "" },
4355
{ "N", imgPath ?? "" },
4456
},
57+
MousePhonemeLayerPair = new()
58+
{
59+
{ "a", layers ?? []},
60+
{ "i", layers ?? []},
61+
{ "u", layers ?? []},
62+
{ "e", layers ?? []},
63+
{ "o", layers ?? []},
64+
{ "N", layers ?? []},
65+
}
4566
};
4667
}
4768
}

KuchiPaku.Core/Models/YmmItem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ public partial class VoiceParameter
125125
[JsonProperty("SentensePause")]
126126
public int? SentensePause { get; set; }
127127

128-
[JsonProperty("Preset")]
129-
public string? Preset { get; set; }
128+
//[JsonProperty("Preset")]
129+
//public string? Preset { get; set; }
130130
}
131131

132132
public partial class TachieFaceParameter{

0 commit comments

Comments
 (0)