Can the lib handle partly meshed models?

Topics: Developer Forum
Nov 1, 2009 at 9:41 PM

Having trouble with the animation of a 3D model I traced through the code and found that the constructor of the ModelAnimator class checks for every sub-mesh whether it is skinned or not and sets the palette member accordingly:

palette = new Matrix[model.Meshes.Count][];
            for (int i = 0; i < skinInfo.Length; i++)
                if (Util.IsSkinned(model.Meshes[i]))
                    palette[i] = new Matrix[skinInfo[i].Count];
                    palette[i] = null;

For the model I am using the first mesh is skinned, whereas the other 20 meshes are not.

The draw method seems not to be prepared that some members of the the palette array are null and thus throws an exception when executing the line:



As I am a novice to 3D modelling I wonder whether there is a bug in the model (it was a free available model that I have downloaded), or whether there is a bug in the library.