Merge pull request #1883 from ousttrue/fix/export_no_active

Fix/export no active
This commit is contained in:
ousttrue 2022-10-25 19:38:37 +09:00 committed by GitHub
commit f4115cacd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -168,9 +168,9 @@ namespace VRM
{
// copy元
var animator = exportRoot.GetComponent<Animator>();
var beforeTransforms = exportRoot.GetComponentsInChildren<Transform>();
var beforeTransforms = exportRoot.GetComponentsInChildren<Transform>(true);
// copy先
var afterTransforms = target.GetComponentsInChildren<Transform>();
var afterTransforms = target.GetComponentsInChildren<Transform>(true);
// copy先のhumanoidBoneのリストを得る
var humanTransforms = CachedEnum.GetValues<HumanBodyBones>()
.Where(x => x != HumanBodyBones.LastBone)

View File

@ -26,17 +26,17 @@ namespace VRM
var springRoot = sb.RootBones[i];
if (springRoot == null)
{
yield return Validation.Error($"[VRMSpringBone]{sb.name}.RootBones[{i}] is null");
yield return Validation.Error($"[VRMSpringBone]{sb.name}.RootBones[{i}] is null", ValidationContext.Create(sb));
continue;
}
if (!hierarchy.Contains(springRoot))
{
yield return Validation.Error($"[VRMSpringBone]{sb.name}.RootBones[{i}] is out of hierarchy");
yield return Validation.Error($"[VRMSpringBone]{sb.name}.RootBones[{i}] is out of hierarchy", ValidationContext.Create(sb));
continue;
}
if (!springRoot.transform.EnableForExport())
{
yield return Validation.Error($"[VRMSpringBone]{sb.name}.RootBones[{i}] is not active");
yield return Validation.Error($"[VRMSpringBone]{sb.name}.RootBones[{i}] is not active", ValidationContext.Create(sb));
continue;
}