Merge pull request #2037 from aavenel/fix/FBXImportRegression
Fix fbx import regressionpull/1508/head^2
commit
bca41ceba5
|
@ -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
|
||||
// now it seems unavoidable.
|
||||
if (MappingInformationType == "ByVertice" && isDirect) {
|
||||
if (!HasElement(source, indexDataElementName)) {
|
||||
return;
|
||||
}
|
||||
std::vector<T> tempData;
|
||||
ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));
|
||||
|
||||
|
|
|
@ -70,6 +70,10 @@ TEST_F( utFBXImporterExporter, importBareBoxWithoutColorsAndTextureCoords ) {
|
|||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/FBX/box.fbx", aiProcess_ValidateDataStructure );
|
||||
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 ) {
|
||||
|
|
Loading…
Reference in New Issue