Add WIP version of the BLENDER importer. DO NOT USE FOR PRODUCTION YET!
Loads static meshes. Sometimes (it segfaults on the rest). No materials, cameras, fancy stuff. Works with all versions of blender. No compressed blend files yet. - StreamReader now uses shared_ptr's to manage ownership of the stream. - Adapt other loaders accordingly. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@717 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -72,170 +72,173 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// Importers
|
||||
// (include_new_importers_here)
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#ifndef AI_BUILD_NO_X_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_X_IMPORTER
|
||||
# include "XFileImporter.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_3DS_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_3DS_IMPORTER
|
||||
# include "3DSLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_MD3_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_MD3_IMPORTER
|
||||
# include "MD3Loader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_MDL_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_MDL_IMPORTER
|
||||
# include "MDLLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_MD2_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_MD2_IMPORTER
|
||||
# include "MD2Loader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_PLY_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_PLY_IMPORTER
|
||||
# include "PlyLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_ASE_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_ASE_IMPORTER
|
||||
# include "ASELoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_OBJ_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_OBJ_IMPORTER
|
||||
# include "ObjFileImporter.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_HMP_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_HMP_IMPORTER
|
||||
# include "HMPLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_SMD_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_SMD_IMPORTER
|
||||
# include "SMDLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_MDC_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_MDC_IMPORTER
|
||||
# include "MDCLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_MD5_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_MD5_IMPORTER
|
||||
# include "MD5Loader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_STL_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_STL_IMPORTER
|
||||
# include "STLLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_LWO_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_LWO_IMPORTER
|
||||
# include "LWOLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_DXF_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_DXF_IMPORTER
|
||||
# include "DXFLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_NFF_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_NFF_IMPORTER
|
||||
# include "NFFLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_RAW_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_RAW_IMPORTER
|
||||
# include "RawLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_OFF_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_OFF_IMPORTER
|
||||
# include "OFFLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_AC_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_AC_IMPORTER
|
||||
# include "ACLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_BVH_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_BVH_IMPORTER
|
||||
# include "BVHLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_IRRMESH_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_IRRMESH_IMPORTER
|
||||
# include "IRRMeshLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_IRR_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_IRR_IMPORTER
|
||||
# include "IRRLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_Q3D_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_Q3D_IMPORTER
|
||||
# include "Q3DLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_B3D_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_B3D_IMPORTER
|
||||
# include "B3DImporter.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_COLLADA_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_COLLADA_IMPORTER
|
||||
# include "ColladaLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_TERRAGEN_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_TERRAGEN_IMPORTER
|
||||
# include "TerragenLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_CSM_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_CSM_IMPORTER
|
||||
# include "CSMLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_3D_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_3D_IMPORTER
|
||||
# include "UnrealLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_LWS_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_LWS_IMPORTER
|
||||
# include "LWSLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_OGRE_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
|
||||
# include "OgreImporter.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_MS3D_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_MS3D_IMPORTER
|
||||
# include "MS3DLoader.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_COB_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_COB_IMPORTER
|
||||
# include "COBLoader.h"
|
||||
#endif
|
||||
#ifndef ASSIMP_BUILD_NO_COB_IMPORTER
|
||||
# include "BlenderLoader.h"
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Post processing-Steps
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#ifndef AI_BUILD_NO_CALCTANGENTS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_CALCTANGENTS_PROCESS
|
||||
# include "CalcTangentsProcess.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_JOINVERTICES_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_JOINVERTICES_PROCESS
|
||||
# include "JoinVerticesProcess.h"
|
||||
#endif
|
||||
#if !(defined AI_BUILD_NO_MAKELEFTHANDED_PROCESS && defined AI_BUILD_NO_FLIPUVS_PROCESS && defined AI_BUILD_NO_FLIPWINDINGORDER_PROCESS)
|
||||
#if !(defined ASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS && defined ASSIMP_BUILD_NO_FLIPUVS_PROCESS && defined ASSIMP_BUILD_NO_FLIPWINDINGORDER_PROCESS)
|
||||
# include "ConvertToLHProcess.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_TRIANGULATE_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_TRIANGULATE_PROCESS
|
||||
# include "TriangulateProcess.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_GENFACENORMALS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS
|
||||
# include "GenFaceNormalsProcess.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_GENVERTEXNORMALS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_GENVERTEXNORMALS_PROCESS
|
||||
# include "GenVertexNormalsProcess.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_REMOVEVC_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_REMOVEVC_PROCESS
|
||||
# include "RemoveVCProcess.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_SPLITLARGEMESHES_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS
|
||||
# include "SplitLargeMeshes.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_PRETRANSFORMVERTICES_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_PRETRANSFORMVERTICES_PROCESS
|
||||
# include "PretransformVertices.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_LIMITBONEWEIGHTS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_LIMITBONEWEIGHTS_PROCESS
|
||||
# include "LimitBoneWeightsProcess.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_VALIDATEDS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
|
||||
# include "ValidateDataStructure.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_IMPROVECACHELOCALITY_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_IMPROVECACHELOCALITY_PROCESS
|
||||
# include "ImproveCacheLocality.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_FIXINFACINGNORMALS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_FIXINFACINGNORMALS_PROCESS
|
||||
# include "FixNormalsStep.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS
|
||||
# include "RemoveRedundantMaterials.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_FINDINVALIDDATA_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_FINDINVALIDDATA_PROCESS
|
||||
# include "FindInvalidDataProcess.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_FINDDEGENERATES_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS
|
||||
# include "FindDegenerates.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_SORTBYPTYPE_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_SORTBYPTYPE_PROCESS
|
||||
# include "SortByPTypeProcess.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_GENUVCOORDS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_GENUVCOORDS_PROCESS
|
||||
# include "ComputeUVMappingProcess.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_TRANSFORMTEXCOORDS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_TRANSFORMTEXCOORDS_PROCESS
|
||||
# include "TextureTransform.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_FINDINSTANCES_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_FINDINSTANCES_PROCESS
|
||||
# include "FindInstancesProcess.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_OPTIMIZEMESHES_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_OPTIMIZEMESHES_PROCESS
|
||||
# include "OptimizeMeshes.h"
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_OPTIMIZEGRAPH_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS
|
||||
# include "OptimizeGraph.h"
|
||||
#endif
|
||||
|
||||
@@ -302,102 +305,105 @@ Importer::Importer()
|
||||
// (register_new_importers_here)
|
||||
// ----------------------------------------------------------------------------
|
||||
pimpl->mImporter.reserve(64);
|
||||
#if (!defined AI_BUILD_NO_X_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_X_IMPORTER)
|
||||
pimpl->mImporter.push_back( new XFileImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_OBJ_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_OBJ_IMPORTER)
|
||||
pimpl->mImporter.push_back( new ObjFileImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_3DS_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_3DS_IMPORTER)
|
||||
pimpl->mImporter.push_back( new Discreet3DSImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_MD3_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_MD3_IMPORTER)
|
||||
pimpl->mImporter.push_back( new MD3Importer());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_MD2_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_MD2_IMPORTER)
|
||||
pimpl->mImporter.push_back( new MD2Importer());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_PLY_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_PLY_IMPORTER)
|
||||
pimpl->mImporter.push_back( new PLYImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_MDL_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_MDL_IMPORTER)
|
||||
pimpl->mImporter.push_back( new MDLImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_ASE_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_ASE_IMPORTER)
|
||||
pimpl->mImporter.push_back( new ASEImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_HMP_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_HMP_IMPORTER)
|
||||
pimpl->mImporter.push_back( new HMPImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_SMD_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_SMD_IMPORTER)
|
||||
pimpl->mImporter.push_back( new SMDImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_MDC_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_MDC_IMPORTER)
|
||||
pimpl->mImporter.push_back( new MDCImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_MD5_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_MD5_IMPORTER)
|
||||
pimpl->mImporter.push_back( new MD5Importer());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_STL_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_STL_IMPORTER)
|
||||
pimpl->mImporter.push_back( new STLImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_LWO_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_LWO_IMPORTER)
|
||||
pimpl->mImporter.push_back( new LWOImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_DXF_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_DXF_IMPORTER)
|
||||
pimpl->mImporter.push_back( new DXFImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_NFF_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_NFF_IMPORTER)
|
||||
pimpl->mImporter.push_back( new NFFImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_RAW_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_RAW_IMPORTER)
|
||||
pimpl->mImporter.push_back( new RAWImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_OFF_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_OFF_IMPORTER)
|
||||
pimpl->mImporter.push_back( new OFFImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_AC_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_AC_IMPORTER)
|
||||
pimpl->mImporter.push_back( new AC3DImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_BVH_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_BVH_IMPORTER)
|
||||
pimpl->mImporter.push_back( new BVHLoader());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_IRRMESH_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_IRRMESH_IMPORTER)
|
||||
pimpl->mImporter.push_back( new IRRMeshImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_IRR_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_IRR_IMPORTER)
|
||||
pimpl->mImporter.push_back( new IRRImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_Q3D_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_Q3D_IMPORTER)
|
||||
pimpl->mImporter.push_back( new Q3DImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_B3D_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_B3D_IMPORTER)
|
||||
pimpl->mImporter.push_back( new B3DImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_COLLADA_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_COLLADA_IMPORTER)
|
||||
pimpl->mImporter.push_back( new ColladaLoader());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_TERRAGEN_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_TERRAGEN_IMPORTER)
|
||||
pimpl->mImporter.push_back( new TerragenImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_CSM_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_CSM_IMPORTER)
|
||||
pimpl->mImporter.push_back( new CSMImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_3D_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_3D_IMPORTER)
|
||||
pimpl->mImporter.push_back( new UnrealImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_LWS_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_LWS_IMPORTER)
|
||||
pimpl->mImporter.push_back( new LWSImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_OGRE_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_OGRE_IMPORTER)
|
||||
pimpl->mImporter.push_back( new Ogre::OgreImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_MS3D_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_MS3D_IMPORTER)
|
||||
pimpl->mImporter.push_back( new MS3DImporter());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_COB_IMPORTER)
|
||||
#if (!defined ASSIMP_BUILD_NO_COB_IMPORTER)
|
||||
pimpl->mImporter.push_back( new COBImporter());
|
||||
#endif
|
||||
#if (!defined ASSIMP_BUILD_NO_BLEND_IMPORTER)
|
||||
pimpl->mImporter.push_back( new BlenderImporter());
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Add an instance of each post processing step here in the order
|
||||
@@ -405,49 +411,49 @@ Importer::Importer()
|
||||
// validated - as RegisterPPStep() does - all dependencies must be given.
|
||||
// ----------------------------------------------------------------------------
|
||||
pimpl->mPostProcessingSteps.reserve(25);
|
||||
#if (!defined AI_BUILD_NO_REMOVEVC_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_REMOVEVC_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new RemoveVCProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new RemoveRedundantMatsProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_FINDINSTANCES_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_FINDINSTANCES_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new FindInstancesProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_OPTIMIZEGRAPH_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new OptimizeGraphProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_OPTIMIZEMESHES_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_OPTIMIZEMESHES_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new OptimizeMeshesProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_FINDDEGENERATES_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new FindDegeneratesProcess());
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_GENUVCOORDS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_GENUVCOORDS_PROCESS
|
||||
pimpl->mPostProcessingSteps.push_back( new ComputeUVMappingProcess());
|
||||
#endif
|
||||
#ifndef AI_BUILD_NO_TRANSFORMTEXCOORDS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_TRANSFORMTEXCOORDS_PROCESS
|
||||
pimpl->mPostProcessingSteps.push_back( new TextureTransformStep());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_PRETRANSFORMVERTICES_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_PRETRANSFORMVERTICES_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new PretransformVertices());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_TRIANGULATE_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_TRIANGULATE_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new TriangulateProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_SORTBYPTYPE_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_SORTBYPTYPE_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new SortByPTypeProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_FINDINVALIDDATA_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_FINDINVALIDDATA_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new FindInvalidDataProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_FIXINFACINGNORMALS_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_FIXINFACINGNORMALS_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new FixInfacingNormalsProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_SPLITLARGEMESHES_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new SplitLargeMeshesProcess_Triangle());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_GENFACENORMALS_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new GenFaceNormalsProcess());
|
||||
#endif
|
||||
|
||||
@@ -456,13 +462,13 @@ Importer::Importer()
|
||||
pimpl->mPostProcessingSteps.push_back( new ComputeSpatialSortProcess());
|
||||
// .........................................................................
|
||||
|
||||
#if (!defined AI_BUILD_NO_GENVERTEXNORMALS_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_GENVERTEXNORMALS_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new GenVertexNormalsProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_CALCTANGENTS_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_CALCTANGENTS_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new CalcTangentsProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_JOINVERTICES_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_JOINVERTICES_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new JoinVerticesProcess());
|
||||
#endif
|
||||
|
||||
@@ -470,22 +476,22 @@ Importer::Importer()
|
||||
pimpl->mPostProcessingSteps.push_back( new DestroySpatialSortProcess());
|
||||
// .........................................................................
|
||||
|
||||
#if (!defined AI_BUILD_NO_SPLITLARGEMESHES_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new SplitLargeMeshesProcess_Vertex());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_MAKELEFTHANDED_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new MakeLeftHandedProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_FLIPUVS_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_FLIPUVS_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new FlipUVsProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_FLIPWINDINGORDER_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_FLIPWINDINGORDER_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new FlipWindingOrderProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_LIMITBONEWEIGHTS_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_LIMITBONEWEIGHTS_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new LimitBoneWeightsProcess());
|
||||
#endif
|
||||
#if (!defined AI_BUILD_NO_IMPROVECACHELOCALITY_PROCESS)
|
||||
#if (!defined ASSIMP_BUILD_NO_IMPROVECACHELOCALITY_PROCESS)
|
||||
pimpl->mPostProcessingSteps.push_back( new ImproveCacheLocalityProcess());
|
||||
#endif
|
||||
|
||||
@@ -739,7 +745,7 @@ bool Importer::ValidateFlags(unsigned int pFlags)
|
||||
}
|
||||
|
||||
// ValidateDS does not anymore occur in the pp list, it plays an awesome extra role ...
|
||||
#ifdef AI_BUILD_NO_VALIDATEDS_PROCESS
|
||||
#ifdef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
|
||||
if (pFlags & aiProcess_ValidateDataStructure)
|
||||
return false;
|
||||
#endif
|
||||
@@ -873,7 +879,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
|
||||
// If successful, apply all active post processing steps to the imported data
|
||||
if( pimpl->mScene) {
|
||||
|
||||
#ifndef AI_BUILD_NO_VALIDATEDS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
|
||||
// The ValidateDS process is an exception. It is executed first, even before ScenePreprocessor is called.
|
||||
if (pFlags & aiProcess_ValidateDataStructure)
|
||||
{
|
||||
@@ -939,7 +945,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
|
||||
ai_assert(_ValidateFlags(pFlags));
|
||||
DefaultLogger::get()->info("Entering post processing pipeline");
|
||||
|
||||
#ifndef AI_BUILD_NO_VALIDATEDS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
|
||||
// The ValidateDS process plays an exceptional role. It isn't contained in the global
|
||||
// list of post-processing steps, so we need to call it manually.
|
||||
if (pFlags & aiProcess_ValidateDataStructure)
|
||||
@@ -954,7 +960,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
|
||||
#ifdef _DEBUG
|
||||
if (pimpl->bExtraVerbose)
|
||||
{
|
||||
#ifndef AI_BUILD_NO_VALIDATEDS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
|
||||
DefaultLogger::get()->error("Verbose Import is not available due to build settings");
|
||||
#endif // no validation
|
||||
pFlags |= aiProcess_ValidateDataStructure;
|
||||
@@ -976,7 +982,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
#ifndef AI_BUILD_NO_VALIDATEDS_PROCESS
|
||||
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
|
||||
continue;
|
||||
#endif // no validation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user