1
0
Fork 0
forked from fte/fteqw

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:
Luis Gutierrez 2023-08-28 20:29:55 -07:00 committed by GitHub
parent 510f50789c
commit 25e1db29bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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; }
} }