FIX: ColladaLoader now ignores missing 'meter' attribute in Collada files produced by C4D. Adding a c4ddae test file. Thanks to Tobias Rittig to point it out.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@483 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
aramis_acg 2009-09-26 21:54:56 +00:00
parent f318352ce4
commit 1452a7a83d
3 changed files with 229 additions and 2 deletions

View File

@ -64,3 +64,6 @@ Contributed several bugfixes fixing memory leaks and improving float parsing
- sueastside - sueastside
Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date. Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date.
- Tobias Rittig
Collada testing with Cinema 4D

View File

@ -202,8 +202,13 @@ void ColladaParser::ReadAssetInfo()
if( IsElement( "unit")) if( IsElement( "unit"))
{ {
// read unit data from the element's attributes // read unit data from the element's attributes
int attrIndex = GetAttribute( "meter"); const int attrIndex = TestAttribute( "meter");
mUnitSize = mReader->getAttributeValueAsFloat( attrIndex); if (attrIndex == -1) {
mUnitSize = 1.f;
}
else {
mUnitSize = mReader->getAttributeValueAsFloat( attrIndex);
}
// consume the trailing stuff // consume the trailing stuff
if( !mReader->isEmptyElement()) if( !mReader->isEmptyElement())

File diff suppressed because one or more lines are too long