Added validation step, added helper macro AI_BUILD_KEY to the material system.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@59 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2008-06-15 10:27:08 +00:00
parent d6fc5de7d5
commit 758e092449
25 changed files with 1287 additions and 182 deletions

View File

@@ -41,9 +41,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file Implementation of the few default functions of the base importer class */
#include "BaseImporter.h"
#include "BaseProcess.h"
#include "../include/DefaultLogger.h"
#include "../include/aiScene.h"
#include "../include/aiAssert.h"
#include "../include/assimp.hpp"
using namespace Assimp;
// ------------------------------------------------------------------------------------------------
@@ -88,3 +91,28 @@ aiScene* BaseImporter::ReadFile( const std::string& pFile, IOSystem* pIOHandler)
// return what we gathered from the import.
return scene;
}
// ------------------------------------------------------------------------------------------------
void BaseProcess::ExecuteOnScene( Importer* pImp)
{
ai_assert(NULL != pImp && NULL != pImp->mScene);
// catch exceptions thrown inside the PostProcess-Step
try
{
this->Execute(pImp->mScene);
} catch( ImportErrorException* exception)
{
// extract error description
pImp->mErrorString = exception->GetErrorText();
DefaultLogger::get()->error(pImp->mErrorString);
delete exception;
// and kill the partially imported data
delete pImp->mScene;
pImp->mScene = NULL;
}
}