フォーラム: 開発者 (スレッド #32608)

A very very small patch for some models (2012-08-03 22:30 by urz9999 #64895)

Hi, i made a very little correction to a part of the code in the SkinningHelper.cs file in MMDPipeline project, i found it could be useful for some not so well made models which have false IK's (e.g. bones with IK identifier wrong in PMDEditor) which produce an array exception the line is 75 and this is the code:

if (ik.IKChildBones.Count > 0 && mmdBones[ik.IKTargetBoneIndex].SkeletonHierarchy != ik.IKChildBones[0])
throw new InvalidContentException("IKTargetBoneの親がIKChildの0番目になっていません。モデル構造に問題がある可能性があります");

ik.IKChildBones.Count > 0 && is the addition in the if statement which prevents array exception in IKChildBones.

I know it is a modeler fault but i think it's better to leave this error transparent to the end user, hope this can help a little on your work.

Thx for your hard work
Alessandro

RE: A very very small patch for some models (2012-08-05 01:29 by wilfrem #64921)

Thanks to notify.
I fix it.
http://sourceforge.jp/projects/mmdx/scm/svn/commits/928
#64895 への返信