Fix for IQM skeletons with multiple root bones (#218)
Fix case where skeleton contains multiple root bones with no parent bone
This commit is contained in:
parent
510f50789c
commit
25e1db29bf
1 changed files with 7 additions and 5 deletions
|
@ -4577,6 +4577,7 @@ void calcanimdata()
|
||||||
pose &j = poses.add();
|
pose &j = poses.add();
|
||||||
j.name = p.bonename;
|
j.name = p.bonename;
|
||||||
j.parent = -1;
|
j.parent = -1;
|
||||||
|
if(p.boneparent >= 0) {
|
||||||
loopk(p.remap)
|
loopk(p.remap)
|
||||||
{
|
{
|
||||||
if (!strcmp(poses[k].name, fr.pose[p.boneparent].bonename))
|
if (!strcmp(poses[k].name, fr.pose[p.boneparent].bonename))
|
||||||
|
@ -4585,6 +4586,7 @@ void calcanimdata()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
loopk(10) { j.offset[k] = 1e16f; j.scale[k] = -1e16f; }
|
loopk(10) { j.offset[k] = 1e16f; j.scale[k] = -1e16f; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue