closes https://github.com/assimp/assimp/issues/1460: skip uv- and color-components if these are not defined.

This commit is contained in:
Kim Kulling
2018-01-04 12:37:35 +01:00
parent 840416831d
commit 9efa4282fe
3 changed files with 18 additions and 1 deletions

View File

@@ -1197,6 +1197,14 @@ std::string ParseTokenAsString(const Token& t)
return i;
}
bool HasElement( const Scope& sc, const std::string& index ) {
const Element* el = sc[ index ];
if ( nullptr == el ) {
return false;
}
return true;
}
// ------------------------------------------------------------------------------------------------
// extract a required element from a scope, abort if the element cannot be found