diff --git a/include/osgAnimation/RigTransform b/include/osgAnimation/RigTransform index 7be592035..9a6a0e367 100644 --- a/include/osgAnimation/RigTransform +++ b/include/osgAnimation/RigTransform @@ -35,7 +35,7 @@ namespace osgAnimation /// to call manually when a skeleton is reacheable from the rig /// in order to prepare technic data before rendering - virtual bool prepareData(RigGeometry&){} + virtual bool prepareData(RigGeometry&){return true;} protected: virtual ~RigTransform() {} diff --git a/src/osgAnimation/RigTransformHardware.cpp b/src/osgAnimation/RigTransformHardware.cpp index 90c684669..8751455e5 100644 --- a/src/osgAnimation/RigTransformHardware.cpp +++ b/src/osgAnimation/RigTransformHardware.cpp @@ -390,11 +390,11 @@ bool RigTransformHardware::buildPalette(BoneMap&boneMap ,RigGeometry&rig) { VertexIndexWeightList vertexIndexWeight; vertexIndexWeight.resize(_nbVertexes); - for (osgAnimation::VertexInfluenceMap::iterator it = vertexInfluenceMap->begin(); - it != vertexInfluenceMap->end(); - ++it) + for (osgAnimation::VertexInfluenceMap::iterator mapit = vertexInfluenceMap->begin(); + mapit != vertexInfluenceMap->end(); + ++mapit) { - const BoneInfluenceList& boneinflist = it->second; + const BoneInfluenceList& boneinflist = mapit->second; for(BoneInfluenceList::const_iterator infit = boneinflist.begin(); infit!=boneinflist.end(); ++infit) { const IndexWeight& iw = *infit; @@ -402,8 +402,6 @@ bool RigTransformHardware::buildPalette(BoneMap&boneMap ,RigGeometry&rig) { const float &weight = iw.getWeight(); FloatInt &sum=sums[index]; - unsigned int arrayid=sum.second/2; - unsigned short inx=2*(sum.second&1); if (boneinflist.getBoneName().empty()) { OSG_WARN << "VertexInfluenceSet::buildVertex2BoneList warning vertex " << index << " is not assigned to a bone" << std::endl;