cutin pos update

This commit is contained in:
左右看
2022-11-06 16:02:55 +08:00
parent 23947fb175
commit 7878620f91
4 changed files with 73 additions and 16 deletions
+12
View File
@@ -988,6 +988,11 @@ public class UmaViewerBuilder : MonoBehaviour
CurrentUMAContainer.FaceOverrideController["clip_2"] = clip;
CurrentUMAContainer.UmaFaceAnimator.Play("motion_1", 1, 0);
}
else if (clip.name.Contains("pos"))
{
CurrentUMAContainer.OverrideController["clip_p"] = clip;
CurrentUMAContainer.UmaFaceAnimator.Play("motion_1", 1, 0);
}
else if (clip.name.Contains("cam"))
{
var overrideController = Instantiate(CameraOverrideController);
@@ -1006,6 +1011,7 @@ public class UmaViewerBuilder : MonoBehaviour
var facialMotion = Main.AbMotions.FirstOrDefault(a => a.Name.EndsWith(clip.name + "_face"));
var cameraMotion = Main.AbMotions.FirstOrDefault(a => a.Name.EndsWith(clip.name + "_cam"));
var earMotion = Main.AbMotions.FirstOrDefault(a => a.Name.EndsWith(clip.name + "_ear"));
var posMotion = Main.AbMotions.FirstOrDefault(a => a.Name.EndsWith(clip.name + "_pos"));
if (facialMotion != null)
{
@@ -1022,6 +1028,12 @@ public class UmaViewerBuilder : MonoBehaviour
RecursiveLoadAsset(cameraMotion);
}
if (posMotion != null)
{
Debug.Log("Has Pos!");
RecursiveLoadAsset(posMotion);
}
if (CurrentUMAContainer.IsMini)
{
SetPreviewCamera(null);
-16
View File
@@ -242,22 +242,6 @@ public class UmaViewerUI : MonoBehaviour
InstantiateFacialPart(UmaContainerSliderPrefab, target, target.EyeMorphs, EyeList);
InstantiateFacialPart(UmaContainerSliderPrefab, target, target.MouthMorphs, MouthList);
/*
List<FacialMorph> tempMorph = new List<FacialMorph>();
tempMorph.AddRange(target.EarMorphs);
tempMorph.AddRange(target.EyeBrowMorphs);
tempMorph.AddRange(target.EyeMorphs);
tempMorph.AddRange(target.MouthMorphs);
foreach (FacialMorph morph in tempMorph)
{
var container = Instantiate(UmaContainerSliderPrefab, FacialList.content).GetComponent<UmaUIContainer>();
container.Name.text = morph.name + " (" + morph.tag + ")";
container.Slider.value = morph.weight;
container.Slider.maxValue = 1;
container.Slider.minValue = 0;
container.Slider.onValueChanged.AddListener((a) => {target.ChangeMorphWeight(morph, a);});
}
*/
}
public void UpdateFacialPanels()