mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-14 14:29:52 -05:00
parent
155acf3547
commit
c27848a093
|
|
@ -184,7 +184,7 @@ namespace VRM
|
|||
.Select(x =>
|
||||
{
|
||||
Transform dstBone;
|
||||
if (boneMap.TryGetValue(x.x, out dstBone))
|
||||
if (x.x != null && boneMap.TryGetValue(x.x, out dstBone))
|
||||
{
|
||||
return dstBones.IndexOf(dstBone);
|
||||
}
|
||||
|
|
@ -199,7 +199,15 @@ namespace VRM
|
|||
{
|
||||
if (indexMap[i] < 0)
|
||||
{
|
||||
Debug.LogWarningFormat("{0} is removed", srcBones[i].name);
|
||||
var srcBone = srcBones[i];
|
||||
if (srcBone == null)
|
||||
{
|
||||
Debug.LogWarningFormat("bones[{0}] is null", i);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarningFormat("{0} is removed", srcBone.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -289,9 +297,10 @@ namespace VRM
|
|||
}
|
||||
|
||||
var dstBones = srcRenderer.bones
|
||||
.Where(x => boneMap.ContainsKey(x))
|
||||
.Where(x => x != null && boneMap.ContainsKey(x))
|
||||
.Select(x => boneMap[x])
|
||||
.ToArray();
|
||||
|
||||
var hasBoneWeight = srcRenderer.bones != null && srcRenderer.bones.Length > 0;
|
||||
if (!hasBoneWeight)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user