ConvertToBlendedMesh Problem

Revian

Newcomer
Joined
Nov 16, 2003
Messages
1
Location
Holland
The following is a code snipper I have which is returning a 'Object reference not set to instance of object.' Now I can't see why this would be the case.

Int32[] temp, temp2 = null;
GraphicsStream tempgs = null;

Mesh tmpMesh = container.MeshData.Mesh;
GraphicsStream tmpgs = container.GetAdjacencyStream();
if (tmpMesh == null)
return;
if (tmpgs == null)
return;

UM.BlendedMesh = container.SkinInformation.ConvertToBlendedMesh(
tmpMesh,
MeshFlags.Managed,
tmpgs,
out temp, out temp2, out tmpgs,
out UM.maxFaceInfluence,
out UM.boneCombination
);

The oddest thing is that if I replace that by a ConvertToIndexedBlendedMesh and put a random number in the PaletteSize parameter and leave the rest the same. It runs fine(The mesh looks wrong though :P)

Any ideas? Or how I would get the Indexed one to look right?


Thanks.
 
Back
Top