From Per Fahlberg, "Attached is a fix for loading the same file multiple times with the
COLLADA plugin. dae->load will not return DAE_OK the second time a model is loaded, so a second check for DAE_ERR_COLLECTION_ALREADY_EXISTS has been added."
This commit is contained in:
parent
3bfa8a27a8
commit
e3478069b4
@ -19,11 +19,11 @@
|
||||
using namespace osgdae;
|
||||
|
||||
daeReader::daeReader(DAE *dae_) : dae(dae_),
|
||||
rootNode(NULL),
|
||||
m_numlights(0),
|
||||
currentEffect(NULL),
|
||||
geometryMap(),
|
||||
materialMap()
|
||||
rootNode(NULL),
|
||||
m_numlights(0),
|
||||
currentEffect(NULL),
|
||||
geometryMap(),
|
||||
materialMap()
|
||||
{
|
||||
}
|
||||
|
||||
@ -42,7 +42,9 @@ bool daeReader::convert( const std::string &fileURI )
|
||||
{
|
||||
fURI = fileURI;
|
||||
}
|
||||
if( dae->load( fURI.c_str() ) != DAE_OK )
|
||||
daeInt res = dae->load( fURI.c_str() );
|
||||
|
||||
if( res != DAE_OK && res != DAE_ERR_COLLECTION_ALREADY_EXISTS)
|
||||
{
|
||||
osg::notify( osg::WARN ) << "Load failed in COLLADA DOM" << std::endl;
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user