------------------------------------------------------------------------------------------------
| 883 | |
| 884 | // ------------------------------------------------------------------------------------------------ |
| 885 | const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess, bool requestValidation ) { |
| 886 | ai_assert(nullptr != pimpl); |
| 887 | |
| 888 | ASSIMP_BEGIN_EXCEPTION_REGION(); |
| 889 | |
| 890 | // Return immediately if no scene is active |
| 891 | if ( nullptr == pimpl->mScene ) { |
| 892 | return nullptr; |
| 893 | } |
| 894 | |
| 895 | // If no flags are given, return the current scene with no further action |
| 896 | if (nullptr == rootProcess) { |
| 897 | return pimpl->mScene; |
| 898 | } |
| 899 | |
| 900 | // In debug builds: run basic flag validation |
| 901 | ASSIMP_LOG_INFO( "Entering customized post processing pipeline" ); |
| 902 | |
| 903 | #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS |
| 904 | // The ValidateDS process plays an exceptional role. It isn't contained in the global |
| 905 | // list of post-processing steps, so we need to call it manually. |
| 906 | if ( requestValidation ) |
| 907 | { |
| 908 | ValidateDSProcess ds; |
| 909 | ds.ExecuteOnScene( this ); |
| 910 | if ( !pimpl->mScene ) { |
| 911 | return nullptr; |
| 912 | } |
| 913 | } |
| 914 | #endif // no validation |
| 915 | #ifdef ASSIMP_BUILD_DEBUG |
| 916 | if ( pimpl->bExtraVerbose ) |
| 917 | { |
| 918 | #ifdef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS |
| 919 | ASSIMP_LOG_ERROR( "Verbose Import is not available due to build settings" ); |
| 920 | #endif // no validation |
| 921 | } |
| 922 | #else |
| 923 | if ( pimpl->bExtraVerbose ) { |
| 924 | ASSIMP_LOG_WARN( "Not a debug build, ignoring extra verbose setting" ); |
| 925 | } |
| 926 | #endif // ! DEBUG |
| 927 | |
| 928 | std::unique_ptr<Profiler> profiler(GetPropertyInteger(AI_CONFIG_GLOB_MEASURE_TIME, 0) ? new Profiler() : nullptr); |
| 929 | |
| 930 | if ( profiler ) { |
| 931 | profiler->BeginRegion( "postprocess" ); |
| 932 | } |
| 933 | |
| 934 | rootProcess->ExecuteOnScene( this ); |
| 935 | |
| 936 | if ( profiler ) { |
| 937 | profiler->EndRegion( "postprocess" ); |
| 938 | } |
| 939 | |
| 940 | #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS |
| 941 | // If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step |
| 942 | if ( pimpl->bExtraVerbose || requestValidation ) { |
no test coverage detected