From f4675a56482eeea6d9663adbf3b711c354be86fb Mon Sep 17 00:00:00 2001 From: Julien Valentin Date: Wed, 30 Aug 2017 23:01:21 +0200 Subject: [PATCH] I found the damn bug in RigTransformHW --- src/osgAnimation/RigTransformHardware.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osgAnimation/RigTransformHardware.cpp b/src/osgAnimation/RigTransformHardware.cpp index ef690d5fb..f2fac8c43 100644 --- a/src/osgAnimation/RigTransformHardware.cpp +++ b/src/osgAnimation/RigTransformHardware.cpp @@ -104,7 +104,7 @@ void createVertexAttribList(RigTransformHardware& rig, unsigned int boneIndexInVec4 = b*2; (*array)[j][0 + boneIndexInVec4] = 0; (*array)[j][1 + boneIndexInVec4] = 0; - if (boneIndexInList < maxbonepervertex) + if (boneIndexInList < perVertexInfluences[j].size()) { float boneIndex = static_cast(perVertexInfluences[j][boneIndexInList].getIndex()); float boneWeight = perVertexInfluences[j][boneIndexInList].getWeight(); @@ -214,7 +214,7 @@ bool RigTransformHardware::buildPalette(const BoneMap&boneMap ,const RigGeometry } else { - OSG_INFO << "RigTransformHardware::buildPalette Bone " << bonename << " has a weight " << weight << " for vertex " << index << " this bone will not be in the palette" << std::endl; + OSG_WARN << "RigTransformHardware::buildPalette Bone " << bonename << " has a weight " << weight << " for vertex " << index << " this bone will not be in the palette" << std::endl; } maxBonePerVertex = osg::maximum(maxBonePerVertex, iwlist.size());