Merge branch 'master' into master
commit
a17e788808
|
@ -437,6 +437,9 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
|
||||||
// deal with this more elegantly and with less redundancy, but right
|
// deal with this more elegantly and with less redundancy, but right
|
||||||
// now it seems unavoidable.
|
// now it seems unavoidable.
|
||||||
if (MappingInformationType == "ByVertice" && isDirect) {
|
if (MappingInformationType == "ByVertice" && isDirect) {
|
||||||
|
if (!HasElement(source, indexDataElementName)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
std::vector<T> tempData;
|
std::vector<T> tempData;
|
||||||
ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));
|
ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,10 @@ TEST_F( utFBXImporterExporter, importBareBoxWithoutColorsAndTextureCoords ) {
|
||||||
Assimp::Importer importer;
|
Assimp::Importer importer;
|
||||||
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/FBX/box.fbx", aiProcess_ValidateDataStructure );
|
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/FBX/box.fbx", aiProcess_ValidateDataStructure );
|
||||||
EXPECT_NE( nullptr, scene );
|
EXPECT_NE( nullptr, scene );
|
||||||
|
EXPECT_EQ(scene->mNumMeshes, 1);
|
||||||
|
aiMesh* mesh = scene->mMeshes[0];
|
||||||
|
EXPECT_EQ(mesh->mNumFaces, 12);
|
||||||
|
EXPECT_EQ(mesh->mNumVertices, 36);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F( utFBXImporterExporter, importPhongMaterial ) {
|
TEST_F( utFBXImporterExporter, importPhongMaterial ) {
|
||||||
|
|
Loading…
Reference in New Issue