Pose Mode fixes
Eyebrow draw order change
This commit is contained in:
@@ -53,7 +53,7 @@ public class UIPoseContainer : MonoBehaviour
|
||||
|
||||
File.WriteAllText(fullpath, JsonConvert.SerializeObject(poseData));
|
||||
|
||||
UmaViewerUI.Instance.ShowMessage($"Saved pose: {fullpath}", UIMessageType.Success);
|
||||
//UmaViewerUI.Instance.ShowMessage($"Saved pose: {fullpath}", UIMessageType.Success);
|
||||
|
||||
var poseContainers = UmaViewerUI.Instance.PoseManager.SavedPoseList.content.GetComponentsInChildren<UIPoseContainer>();
|
||||
var poseContainer = poseContainers.FirstOrDefault(c => c.NameLabel.text == "AutoBackup");
|
||||
|
||||
@@ -782,6 +782,7 @@ public class UmaContainerCharacter : UmaContainer
|
||||
break;
|
||||
case "Gallop/3D/Chara/ToonMayu":
|
||||
m.shader = UmaAssetManager.EyebrowShader;
|
||||
m.renderQueue += 1; //fix eyebrows disappearing sometimes
|
||||
break;
|
||||
default:
|
||||
Debug.Log(m.shader.name);
|
||||
@@ -1365,6 +1366,7 @@ public class UmaContainerCharacter : UmaContainer
|
||||
|
||||
public void SetupBoneHandles()
|
||||
{
|
||||
if (IsLive) return;
|
||||
UIHandleCharacterRoot rootHandle = UIHandleCharacterRoot.CreateAsChild(this);
|
||||
|
||||
var humanBones = GetHumanBones();
|
||||
@@ -1512,7 +1514,7 @@ public class UmaContainerCharacter : UmaContainer
|
||||
};
|
||||
}
|
||||
|
||||
return _humanoidBones;
|
||||
return _humanoidBones.Where(b => b != null).ToList();
|
||||
}
|
||||
|
||||
public List<SerializableMorph> SaveMorphs(bool changedOnly)
|
||||
|
||||
@@ -46,8 +46,6 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
|
||||
public IEnumerator LoadUma(CharaEntry chara, string costumeId, bool mini)
|
||||
{
|
||||
PoseManager.SetPoseModeStatic(false);
|
||||
|
||||
int id = chara.Id;
|
||||
var umaContainer = new GameObject($"Chara_{id}_{costumeId}").AddComponent<UmaContainerCharacter>();
|
||||
CurrentUMAContainer = umaContainer;
|
||||
@@ -526,6 +524,7 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
umaContainer.Initialize(!UI.isTPose);
|
||||
|
||||
umaContainer.Position = umaContainer.transform.Find("Position");
|
||||
umaContainer.SetupBoneHandles();
|
||||
|
||||
if (!UI.isTPose && loadMotion)
|
||||
{
|
||||
@@ -638,7 +637,10 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
var eyebrowRmat = matList.FirstOrDefault(a => a.gameObject.name.Equals("M_Mayu_R"));
|
||||
UI.LoadFacialPanelsMini(eyemat.material, eyebrowLmat.material, eyebrowRmat.material, mouthmat.material);
|
||||
|
||||
if(Main.AbList.TryGetValue($"3d/motion/mini/event/body/chara/chr{id}_00/anm_min_eve_chr{id}_00_idle01_loop",out asset))
|
||||
umaContainer.Position = umaContainer.transform.Find("Position");
|
||||
umaContainer.SetupBoneHandles();
|
||||
|
||||
if (Main.AbList.TryGetValue($"3d/motion/mini/event/body/chara/chr{id}_00/anm_min_eve_chr{id}_00_idle01_loop",out asset))
|
||||
{
|
||||
umaContainer.LoadAnimation(asset);
|
||||
}
|
||||
@@ -932,6 +934,8 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
|
||||
public void UnloadUma()
|
||||
{
|
||||
PoseManager.SetPoseModeStatic(false);
|
||||
|
||||
if (CurrentUMAContainer != null)
|
||||
{
|
||||
//It seems that OnDestroy will executed after new model loaded, which cause new FacialPanels empty...
|
||||
|
||||
@@ -599,6 +599,7 @@ public class UmaViewerUI : MonoBehaviour
|
||||
public void PlayLive()
|
||||
{
|
||||
if (currentLive == null) return;
|
||||
PoseManager.SetPoseMode(false);
|
||||
var selectlist = LiveSelectList.content.GetComponentsInChildren<LiveCharacterSelect>();
|
||||
if (selectlist != null)
|
||||
{
|
||||
@@ -701,7 +702,6 @@ public class UmaViewerUI : MonoBehaviour
|
||||
list.Add(Main.AbList["3d/animator/drivenkeylocator"]);
|
||||
list.Add(Main.AbList[$"3d/motion/event/body/chara/chr{achara.Id}_00/anm_eve_chr{achara.Id}_00_idle01_loop"]);
|
||||
|
||||
|
||||
Builder.UnloadUma();
|
||||
//UmaAssetManager.UnloadAllBundle(true);
|
||||
UmaAssetManager.PreLoadAndRun(list , delegate {
|
||||
|
||||
Reference in New Issue
Block a user