   [MDX] Skeletal Animation and Static MeshProblem
  Hi all,I've got the same problem as on this topic:http://www.gamedev.net/community/forums/topic.asp?topic_id=388848He wrotes:Quote:I render classic tiny skeletal animation alone with NO problem.And also I can render tiny.x with no animation alone with NO problem.But when I want to render both of them in same program, I get an error in Drawsubset() method of static model.I can not find the problem..How can i fix this problem?http://www.codersforcoders.com/Engine/animation_class.rtfhttp://www.codersforcoders.com/Engine/static_class.rtfStatic tiny mesh with no animationfor (int i = 0; i < prv_meshMaterials.Length; i++){Core.Device.Material = prv_meshMaterials;Core.Device.SetTexture(0, prv_meshTextures);prv_mesh.DrawSubset(i); // <-- THROWS AN EXCEPTION HERE}Classic tiny skeletal animationif (Core.Device.DeviceCaps.MaxVertexBlendMatrices >= numBlend + 1){Matrix[] offsetMatrices = mesh.GetOffsetMatrices();FrameDerived[] frameMatrices = mesh.GetFrames();for (int i = 0; i < mesh.NumberInfluences; i++){int matrixIndex = bones[iattrib].BoneId;if (matrixIndex != -1){Matrix tempMatrix = offsetMatrices[matrixIndex] * frameMatrices[matrixIndex].CombinedTransformationMatrix;  tempMatrix *= Matrix.RotationYawPitchRoll(0, 0, 0) * Matrix.Translation(0.0f, 0.0f, 0.0f);  tempMatrix *= Matrix.Scaling(0.01f, 0.01f, 0.01f);Core.Device.Transform.SetWorldMatrixByIndex(i, tempMatrix);}}Core.Device.RenderState.VertexBlend = (Direct3D.VertexBlend)numBlend;if ((attribIdPrev != bones[iattrib].AttributeId) || (attribIdPrev == -1)){Core.Device.Material = mesh.GetMaterials()[bones[iattrib].AttributeId].Material3D;Core.Device.SetTexture(0, mesh.GetTextures()[bones[iattrib].AttributeId]);attribIdPrev = bones[iattrib].AttributeId;}mesh.MeshData.Mesh.DrawSubset(iattrib);}Exception:Quote:A first chance exception of type 'Microsoft.DirectX.Direct3D.Direct3DXException' occurred in Microsoft.DirectX.Direct3DX.dll