diff --git a/src/osgPlugins/fbx/WriterCompareTriangle.cpp b/src/osgPlugins/fbx/WriterCompareTriangle.cpp index 90344365d..66b2eb6e0 100644 --- a/src/osgPlugins/fbx/WriterCompareTriangle.cpp +++ b/src/osgPlugins/fbx/WriterCompareTriangle.cpp @@ -30,7 +30,7 @@ WriterCompareTriangle::operator()(const std::pair& t1, int val2 = inWhichBox(x2,y2,z2); return (val1 < val2); -}; +} void WriterCompareTriangle::setMaxMin(unsigned int& nbVerticesX, diff --git a/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.cpp b/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.cpp index 653b8db03..88e76a45b 100644 --- a/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.cpp +++ b/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.cpp @@ -17,7 +17,6 @@ FbxMaterialToOsgStateSet::convert(const KFbxSurfaceMaterial* pFbxMat) FbxMaterialMap::const_iterator it = _fbxMaterialMap.find(pFbxMat); if (it != _fbxMaterialMap.end()) return it->second; - static int nbMat = 0; osg::ref_ptr pOsgMat = new osg::Material; pOsgMat->setName(pFbxMat->GetName()); diff --git a/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.h b/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.h index 2e2bc97cc..3d9bd4fea 100644 --- a/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.h +++ b/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.h @@ -62,7 +62,7 @@ struct StateSetContent DIFFUSE_TEXTURE_UNIT = 0, OPACITY_TEXTURE_UNIT, REFLECTION_TEXTURE_UNIT, - EMISSIVE_TEXTURE_UNIT, + EMISSIVE_TEXTURE_UNIT // more texture units here... }; }; diff --git a/src/osgPlugins/fbx/fbxRAnimation.cpp b/src/osgPlugins/fbx/fbxRAnimation.cpp index 5c273efb2..44a1d17e9 100644 --- a/src/osgPlugins/fbx/fbxRAnimation.cpp +++ b/src/osgPlugins/fbx/fbxRAnimation.cpp @@ -344,7 +344,7 @@ void readFbxRotationAnimation(osgAnimation::Channel* channels[3], } else { - char* curveNames[3] = {KFCURVENODE_R_X, KFCURVENODE_R_Y, KFCURVENODE_R_Z}; + const char* curveNames[3] = {KFCURVENODE_R_X, KFCURVENODE_R_Y, KFCURVENODE_R_Z}; fbxDouble3 fbxPropValue = pNode->LclRotation.Get(); fbxPropValue[0] = osg::DegreesToRadians(fbxPropValue[0]); @@ -472,9 +472,8 @@ std::string OsgFbxReader::readFbxAnimation(KFbxNode* pNode, const char* targetNa for (int j = 0; j < nbAnimLayers; j++) { KFbxAnimLayer* pAnimLayer = pAnimStack->GetMember(FBX_TYPE(KFbxAnimLayer), j); - - if (osgAnimation::Animation* pAnimation = ::readFbxAnimation( - pNode, pAnimLayer, pTakeName, targetName, pAnimationManager)) + osgAnimation::Animation* pAnimation = ::readFbxAnimation(pNode, pAnimLayer, pTakeName, targetName, pAnimationManager); + if (pAnimation) { result = targetName; } diff --git a/src/osgPlugins/fbx/fbxRMesh.cpp b/src/osgPlugins/fbx/fbxRMesh.cpp index c1fb79efa..9cf3a5494 100644 --- a/src/osgPlugins/fbx/fbxRMesh.cpp +++ b/src/osgPlugins/fbx/fbxRMesh.cpp @@ -725,7 +725,7 @@ osgDB::ReaderWriter::ReadResult OsgFbxReader::readMesh( { geomType = GEOMETRY_RIG; } - else if (nMorphShapeCount = fbxMesh->GetShapeCount()) + else if ((nMorphShapeCount = fbxMesh->GetShapeCount())) { geomType = GEOMETRY_MORPH; } diff --git a/src/osgPlugins/fbx/fbxRNode.cpp b/src/osgPlugins/fbx/fbxRNode.cpp index 9f6586548..baa82ab0e 100644 --- a/src/osgPlugins/fbx/fbxRNode.cpp +++ b/src/osgPlugins/fbx/fbxRNode.cpp @@ -216,7 +216,7 @@ void readRotationElement(KFbxTypedProperty& prop, } else { - char* curveNames[3] = {KFCURVENODE_R_X, KFCURVENODE_R_Y, KFCURVENODE_R_Z}; + const char* curveNames[3] = {KFCURVENODE_R_X, KFCURVENODE_R_Y, KFCURVENODE_R_Z}; osg::Vec3 axes[3] = {osg::Vec3(1,0,0), osg::Vec3(0,1,0), osg::Vec3(0,0,1)}; fbxDouble3 fbxPropValue = prop.Get(); diff --git a/src/osgPlugins/fbx/fbxReader.h b/src/osgPlugins/fbx/fbxReader.h index b9e4fb605..982682661 100644 --- a/src/osgPlugins/fbx/fbxReader.h +++ b/src/osgPlugins/fbx/fbxReader.h @@ -50,9 +50,9 @@ public: fbxMaterialToOsgStateSet(fbxMaterialToOsgStateSet1), fbxSkeletons(fbxSkeletons1), options(options1), - authoringTool(authoringTool1), lightmapTextures(lightmapTextures1), - tessellatePolygons(tessellatePolygons1) + tessellatePolygons(tessellatePolygons1), + authoringTool(authoringTool1) {} osgDB::ReaderWriter::ReadResult readFbxNode(