#146 sid resolving incomplete?

open
Andy Lorino
5
2010-11-07
2010-11-07
Rosen Diankov
No

For some reason we're having a very hard time with the daeSIDResolve class finding all the correct references. In order to make it work correct, we add the following code in daeSIDResolve.cpp findWithDots function:

if ( strncmp( container->getElementName(), "instance_", 9 ) == 0 ) {
daeURI *uri = (daeURI*)container->getAttributeValue("url");
if ( uri != NULL && uri->getElement() != NULL ) {
daeElement *e = findWithDots( uri->getElement(), s, profile, finder, remainingPart );
if ( e != NULL ) {
//found it
return e;
}
}
}

The function basically looks for "instance" tags and tracks their url. Without it, we have to specially search for instance tags in the collada parsing code.

Any feedback on this patch would be appreciated.

Discussion

  • Rosen Diankov
    Rosen Diankov
    2010-11-07

    the patched findWithDots function

     
    Attachments