diff --git a/code/OgreImporter.hpp b/code/OgreImporter.hpp index a2bf65d11..357bee4eb 100644 --- a/code/OgreImporter.hpp +++ b/code/OgreImporter.hpp @@ -5,6 +5,13 @@ #include "OgreXmlHelper.hpp" #include "irrXMLWrapper.h" +/// Ogre Importer TODO +/* - Read Vertex Colors + - Read multiple TexCoords +*/ + + + namespace Assimp { namespace Ogre diff --git a/code/OgreMesh.cpp b/code/OgreMesh.cpp index b02641f4d..683034279 100644 --- a/code/OgreMesh.cpp +++ b/code/OgreMesh.cpp @@ -193,7 +193,8 @@ void OgreImporter::ReadVertexBuffer(SubMesh &theSubMesh, XmlReader *Reader, unsi ||Reader->getNodeName()==string("position") ||Reader->getNodeName()==string("normal") ||Reader->getNodeName()==string("tangent") - ||Reader->getNodeName()==string("texcoord")) + ||Reader->getNodeName()==string("texcoord") + ||Reader->getNodeName()==string("colour_diffuse")) { if(Reader->getNodeName()==string("vertex")) XmlRead(Reader);//Read an attribute tag @@ -242,6 +243,13 @@ void OgreImporter::ReadVertexBuffer(SubMesh &theSubMesh, XmlReader *Reader, unsi continue;//don't read another line at the end of the loop } + //Color: + //TODO: actually save this data! + else if(Reader->getNodeName()==string("colour_diffuse")) + { + //do nothing, because we not yet support them + } + //Attribute could not be read else { diff --git a/code/OgreSkeleton.cpp b/code/OgreSkeleton.cpp index 47e2e2e11..e82d88f54 100644 --- a/code/OgreSkeleton.cpp +++ b/code/OgreSkeleton.cpp @@ -244,7 +244,7 @@ void OgreImporter::LoadSkeleton(std::string FileName, vector &Bones, vecto RotationAxis.y=GetAttribute(SkeletonFile, "y"); RotationAxis.z=GetAttribute(SkeletonFile, "z"); - if(0==RotationAxis.x==RotationAxis.y==RotationAxis.z)//we have an invalid rotation axis + if(0==RotationAxis.x && 0==RotationAxis.y && 0==RotationAxis.z)//we have an invalid rotation axis { RotationAxis.x=1.0f; if(0!=RotationAngle)//if we don't rotate at all, the axis does not matter