add KeyReduction setting

This commit is contained in:
CroakFang
2023-08-03 21:11:04 +08:00
parent 0a996184d1
commit fc10540182
4 changed files with 9 additions and 5 deletions
+5 -1
View File
@@ -18,7 +18,11 @@ public class Config
public string WorkModeTip = "Affects how application work, options: 0 - work with game client, 1 - work without game client(slow), Database needs to be updated manually";
public WorkMode WorkMode = WorkMode.Default;
public List<MorphConvertConfig> MorphConvertSetting = new List<MorphConvertConfig>
public string VmdKeyReductionLevelTip = " Affects the recording quality: 1 = record every frame, 2 = record every two frames, and so on.";
public int VmdKeyReductionLevel = 2;
public string VmdMorphConvertSettingTip = "The mapping of MMD mprphs to UMA mprphs during VMD recording, multiple UMA expression weights will be combined (not exceeding 1)";
public List<MorphConvertConfig> VmdMorphConvertSetting = new List<MorphConvertConfig>
{
new MorphConvertConfig("にこり右", new string[] { "EyeBrow_1_R" }),
new MorphConvertConfig("にこり左", new string[] { "EyeBrow_1_L" }),
@@ -819,9 +819,9 @@ public class UnityHumanoidVMDRecorder : MonoBehaviour
public string ConvertMorphName(string name)
{
if (Config.Instance.MorphConvertSetting.Count > 0)
if (Config.Instance.VmdMorphConvertSetting.Count > 0)
{
var setting = Config.Instance.MorphConvertSetting;
var setting = Config.Instance.VmdMorphConvertSetting;
foreach (var val in setting)
{
foreach (var v in val.UMAMorph)
+1 -1
View File
@@ -1285,7 +1285,7 @@ public class UmaViewerUI : MonoBehaviour
}
recorder.StopRecording();
buttonText.text = "Saving";
recorder.SaveVMD(container.name);
recorder.SaveVMD(container.name, Config.Instance.VmdKeyReductionLevel);
buttonText.text = "Record VMD";
}
}
@@ -747,7 +747,7 @@ namespace Gallop.Live
if (recorder.IsRecording)
{
recorder.StopRecording();
recorder.SaveLiveVMD(live, ExitTime, $"Live{live.MusicId}_Pos{CharaContainerScript.IndexOf(container)}");
recorder.SaveLiveVMD(live, ExitTime, $"Live{live.MusicId}_Pos{CharaContainerScript.IndexOf(container)}", Config.Instance.VmdKeyReductionLevel);
}
}
}