Merge branch 'bdunderscore:main' into main

This commit is contained in:
夜嵐蝶Alma 2024-03-07 09:18:55 +08:00 committed by GitHub
commit 9bd54a6a78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 6 deletions

View File

@ -154,7 +154,7 @@ namespace nadena.dev.modular_avatar.core.editor
var parentTransform = subConfig.transform.parent;
var parentConfig = parentTransform.GetComponentInParent<ModularAvatarMergeArmature>();
var parentMapping = parentConfig.MapBone(parentTransform);
subConfig.mergeTarget = new AvatarObjectReference();
subConfig.mergeTarget.referencePath =
RuntimeUtil.RelativePath(avatarRoot, parentMapping.gameObject);
@ -316,7 +316,7 @@ namespace nadena.dev.modular_avatar.core.editor
};
return false;
}
if (nearestAvatarTransform == xform)
{
errorMessageGroups = new string[]
@ -386,6 +386,14 @@ namespace nadena.dev.modular_avatar.core.editor
outfitHips = outfitAnimator.isHuman
? outfitAnimator.GetBoneTransform(HumanBodyBones.Hips)?.gameObject
: null;
if (outfitHips.transform.parent == outfitRoot.transform)
{
// Sometimes broken rigs can have the hips as a direct child of the root, instead of having
// an intermediate Armature object. We do not currently support this kind of rig, and so we'll
// assume the outfit's humanoid rig is broken and move on to heuristic matching.
outfitHips = null;
}
}
var hipsCandidates = new List<string>();

View File

@ -44,7 +44,7 @@ namespace nadena.dev.modular_avatar.core.editor
return;
}
foreach (var smr in context.AvatarRootObject.GetComponentsInChildren<SkinnedMeshRenderer>())
foreach (var smr in context.AvatarRootObject.GetComponentsInChildren<SkinnedMeshRenderer>(true))
{
var bones = smr.bones;
for (int i = 0; i < bones.Length; i++)

View File

@ -280,7 +280,7 @@ namespace nadena.dev.modular_avatar.core
CopyRendererStates(original, proxy);
statesToRestore.Add((original, original.enabled));
original.enabled = false;
original.forceRenderingOff = true;
}
}
}
@ -328,7 +328,7 @@ namespace nadena.dev.modular_avatar.core
{
foreach (var (original, state) in statesToRestore)
{
original.enabled = state;
original.forceRenderingOff = false;
}
statesToRestore.Clear();

View File

@ -1,7 +1,7 @@
{
"name": "nadena.dev.modular-avatar",
"displayName": "Modular Avatar",
"version": "1.9.5-rc.1",
"version": "1.9.5",
"unity": "2019.4",
"description": "A suite of tools for assembling your avatar out of reusable components",
"author": {