diff --git a/code/FBXMeshGeometry.cpp b/code/FBXMeshGeometry.cpp index d482ab833..28ce924cb 100644 --- a/code/FBXMeshGeometry.cpp +++ b/code/FBXMeshGeometry.cpp @@ -471,32 +471,38 @@ void MeshGeometry::ReadVertexDataColors(std::vector& colors_out, cons mappings); } - // ------------------------------------------------------------------------------------------------ +static const std::string TangentIndexToken = "TangentIndex"; +static const std::string TangentsIndexToken = "TangentsIndex"; + void MeshGeometry::ReadVertexDataTangents(std::vector& tangents_out, const Scope& source, const std::string& MappingInformationType, const std::string& ReferenceInformationType) { const char * str = source.Elements().count( "Tangents" ) > 0 ? "Tangents" : "Tangent"; + const char * strIdx = source.Elements().count( "Tangents" ) > 0 ? TangentsIndexToken.c_str() : TangentIndexToken.c_str(); ResolveVertexDataArray(tangents_out,source,MappingInformationType,ReferenceInformationType, str, - "TangentIndex", + strIdx, vertices.size(), mapping_counts, mapping_offsets, mappings); } - // ------------------------------------------------------------------------------------------------ +static const std::string BinormalIndexToken = "BinormalIndex"; +static const std::string BinormalsIndexToken = "BinormalsIndex"; + void MeshGeometry::ReadVertexDataBinormals(std::vector& binormals_out, const Scope& source, const std::string& MappingInformationType, const std::string& ReferenceInformationType) { const char * str = source.Elements().count( "Binormals" ) > 0 ? "Binormals" : "Binormal"; + const char * strIdx = source.Elements().count( "Binormals" ) > 0 ? BinormalsIndexToken.c_str() : BinormalIndexToken.c_str(); ResolveVertexDataArray(binormals_out,source,MappingInformationType,ReferenceInformationType, str, - "BinormalIndex", + strIdx, vertices.size(), mapping_counts, mapping_offsets,