MCPcopy Create free account
hub / github.com/assimp/assimp / ExecuteOnScene

Method ExecuteOnScene

code/Common/BaseProcess.cpp:61–93  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

59
60// ------------------------------------------------------------------------------------------------
61void BaseProcess::ExecuteOnScene(Importer *pImp) {
62 ai_assert( nullptr != pImp );
63 if (pImp == nullptr) {
64 return;
65 }
66
67 ai_assert(nullptr != pImp->Pimpl()->mScene);
68 if (pImp->Pimpl()->mScene == nullptr) {
69 return;
70 }
71
72 progress = pImp->GetProgressHandler();
73 ai_assert(nullptr != progress);
74 if (progress == nullptr) {
75 return;
76 }
77
78 SetupProperties(pImp);
79
80 // catch exceptions thrown inside the PostProcess-Step
81 try {
82 Execute(pImp->Pimpl()->mScene);
83 } catch (const std::exception &err) {
84
85 // extract error description
86 pImp->Pimpl()->mErrorString = err.what();
87 ASSIMP_LOG_ERROR(pImp->Pimpl()->mErrorString);
88
89 // and kill the partially imported data
90 delete pImp->Pimpl()->mScene;
91 pImp->Pimpl()->mScene = nullptr;
92 }
93}
94
95// ------------------------------------------------------------------------------------------------
96void BaseProcess::SetupProperties(const Importer * /*pImp*/) {

Callers 4

TEST_FFunction · 0.80
ReadFileMethod · 0.80
ApplyPostProcessingMethod · 0.80

Calls 2

GetProgressHandlerMethod · 0.80
whatMethod · 0.45

Tested by

no test coverage detected