- check property name before setting up the primitive type for meshes.

- fix lookup for vertex attribute type lookup.

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
pull/521/head
Kim Kulling 2015-03-28 12:08:59 +01:00
parent 11b9d83d4c
commit aa9dd6a14b
1 changed files with 5 additions and 3 deletions

View File

@ -529,10 +529,12 @@ void OpenGEXImporter::handleMeshNode( ODDLParser::DDLNode *node, aiScene *pScene
if( NULL != prop ) {
std::string propName, propKey;
propId2StdString( prop, propName, propKey );
if( "triangles" == propName ) {
if( "primitive" == propName ) {
if( "triangles" == propKey ) {
m_currentMesh->mPrimitiveTypes |= aiPrimitiveType_TRIANGLE;
}
}
}
handleNodes( node, pScene );
}
@ -571,7 +573,7 @@ void OpenGEXImporter::handleVertexArrayNode( ODDLParser::DDLNode *node, aiScene
if( NULL != prop ) {
std::string propName, propKey;
propId2StdString( prop, propName, propKey );
MeshAttribute attribType( getAttributeByName( propName.c_str() ) );
MeshAttribute attribType( getAttributeByName( propKey.c_str() ) );
if( None == attribType ) {
return;
}