Merge pull request #4172 from assimp/kimkulling-diable_m3m_issue-4126
Disable m3d for 5.1pull/4174/head^2
commit
4fa3648132
|
@ -40,6 +40,9 @@ SET(CMAKE_POLICY_DEFAULT_CMP0092 NEW)
|
||||||
|
|
||||||
CMAKE_MINIMUM_REQUIRED( VERSION 3.10 )
|
CMAKE_MINIMUM_REQUIRED( VERSION 3.10 )
|
||||||
|
|
||||||
|
# Disabled importers: m3d for 5.1
|
||||||
|
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_IMPORTER)
|
||||||
|
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_EXPORTER)
|
||||||
# Toggles the use of the hunter package manager
|
# Toggles the use of the hunter package manager
|
||||||
option(ASSIMP_HUNTER_ENABLED "Enable Hunter package manager support" OFF)
|
option(ASSIMP_HUNTER_ENABLED "Enable Hunter package manager support" OFF)
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define M3D_EXPORTER
|
#define M3D_EXPORTER
|
||||||
#ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
|
#ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
|
||||||
#define M3D_NODUP
|
#define M3D_NODUP
|
||||||
#endif
|
|
||||||
|
|
||||||
// Header files, standard library.
|
// Header files, standard library.
|
||||||
#include <memory> // shared_ptr
|
#include <memory> // shared_ptr
|
||||||
|
@ -437,6 +437,6 @@ void M3DExporter::NodeWalk(const M3DWrapper &m3d, const aiNode *pNode, aiMatrix4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace Assimp
|
} // namespace Assimp
|
||||||
|
#endif
|
||||||
#endif // ASSIMP_BUILD_NO_M3D_EXPORTER
|
#endif // ASSIMP_BUILD_NO_M3D_EXPORTER
|
||||||
#endif // ASSIMP_BUILD_NO_EXPORT
|
#endif // ASSIMP_BUILD_NO_EXPORT
|
||||||
|
|
|
@ -46,10 +46,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef AI_M3DEXPORTER_H_INC
|
#ifndef AI_M3DEXPORTER_H_INC
|
||||||
#define AI_M3DEXPORTER_H_INC
|
#define AI_M3DEXPORTER_H_INC
|
||||||
|
|
||||||
|
#ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
|
||||||
#ifndef ASSIMP_BUILD_NO_M3D_EXPORTER
|
#ifndef ASSIMP_BUILD_NO_M3D_EXPORTER
|
||||||
|
|
||||||
#include <assimp/types.h>
|
#include <assimp/types.h>
|
||||||
//#include <assimp/material.h>
|
|
||||||
#include <assimp/StreamWriter.h> // StreamWriterLE
|
#include <assimp/StreamWriter.h> // StreamWriterLE
|
||||||
#include <assimp/Exceptional.h> // DeadlyExportError
|
#include <assimp/Exceptional.h> // DeadlyExportError
|
||||||
|
|
||||||
|
@ -60,8 +60,7 @@ struct aiNode;
|
||||||
struct aiMaterial;
|
struct aiMaterial;
|
||||||
struct aiFace;
|
struct aiFace;
|
||||||
|
|
||||||
namespace Assimp
|
namespace Assimp {
|
||||||
{
|
|
||||||
class IOSystem;
|
class IOSystem;
|
||||||
class IOStream;
|
class IOStream;
|
||||||
class ExportProperties;
|
class ExportProperties;
|
||||||
|
@ -71,8 +70,7 @@ namespace Assimp
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
/** Helper class to export a given scene to an M3D file. */
|
/** Helper class to export a given scene to an M3D file. */
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
class M3DExporter
|
class M3DExporter {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
/// Constructor for a specific scene to export
|
/// Constructor for a specific scene to export
|
||||||
M3DExporter(const aiScene* pScene, const ExportProperties* pProperties);
|
M3DExporter(const aiScene* pScene, const ExportProperties* pProperties);
|
||||||
|
@ -89,6 +87,7 @@ namespace Assimp
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
|
||||||
#endif // ASSIMP_BUILD_NO_M3D_EXPORTER
|
#endif // ASSIMP_BUILD_NO_M3D_EXPORTER
|
||||||
|
|
||||||
#endif // AI_M3DEXPORTER_H_INC
|
#endif // AI_M3DEXPORTER_H_INC
|
||||||
|
|
|
@ -39,8 +39,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
#ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
|
||||||
#if !(ASSIMP_BUILD_NO_EXPORT || ASSIMP_BUILD_NO_M3D_EXPORTER) || !ASSIMP_BUILD_NO_M3D_IMPORTER
|
#if !(ASSIMP_BUILD_NO_EXPORT || ASSIMP_BUILD_NO_M3D_EXPORTER)
|
||||||
|
|
||||||
#include "M3DWrapper.h"
|
#include "M3DWrapper.h"
|
||||||
|
|
||||||
|
@ -141,10 +141,12 @@ unsigned char *M3DWrapper::Save(int quality, int flags, unsigned int &size) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void M3DWrapper::ClearSave() {
|
void M3DWrapper::ClearSave() {
|
||||||
if (saved_output_)
|
if (saved_output_) {
|
||||||
M3D_FREE(saved_output_);
|
M3D_FREE(saved_output_);
|
||||||
|
}
|
||||||
saved_output_ = nullptr;
|
saved_output_ = nullptr;
|
||||||
}
|
}
|
||||||
} // namespace Assimp
|
} // namespace Assimp
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
|
@ -47,7 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef AI_M3DWRAPPER_H_INC
|
#ifndef AI_M3DWRAPPER_H_INC
|
||||||
#define AI_M3DWRAPPER_H_INC
|
#define AI_M3DWRAPPER_H_INC
|
||||||
|
|
||||||
#if !(ASSIMP_BUILD_NO_EXPORT || ASSIMP_BUILD_NO_M3D_EXPORTER) || !ASSIMP_BUILD_NO_M3D_IMPORTER
|
#ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
|
||||||
|
#if !(ASSIMP_BUILD_NO_EXPORT || ASSIMP_BUILD_NO_M3D_EXPORTER)
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -128,5 +129,6 @@ inline m3d_t *M3DWrapper::M3D() const {
|
||||||
} // namespace Assimp
|
} // namespace Assimp
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif // ASSIMP_BUILD_NO_M3D_IMPORTER
|
||||||
|
|
||||||
#endif // AI_M3DWRAPPER_H_INC
|
#endif // AI_M3DWRAPPER_H_INC
|
||||||
|
|
|
@ -138,7 +138,7 @@ SET( IMPORTERS
|
||||||
unit/utColladaImportExport.cpp
|
unit/utColladaImportExport.cpp
|
||||||
unit/utCSMImportExport.cpp
|
unit/utCSMImportExport.cpp
|
||||||
unit/utB3DImportExport.cpp
|
unit/utB3DImportExport.cpp
|
||||||
unit/utM3DImportExport.cpp
|
#unit/utM3DImportExport.cpp
|
||||||
unit/utMDCImportExport.cpp
|
unit/utMDCImportExport.cpp
|
||||||
unit/utAssbinImportExport.cpp
|
unit/utAssbinImportExport.cpp
|
||||||
unit/ImportExport/utAssjsonImportExport.cpp
|
unit/ImportExport/utAssjsonImportExport.cpp
|
||||||
|
@ -149,14 +149,13 @@ SET( IMPORTERS
|
||||||
unit/ImportExport/utNFFImportExport.cpp
|
unit/ImportExport/utNFFImportExport.cpp
|
||||||
unit/ImportExport/utXGLImportExport.cpp
|
unit/ImportExport/utXGLImportExport.cpp
|
||||||
unit/ImportExport/utMD2Importer.cpp
|
unit/ImportExport/utMD2Importer.cpp
|
||||||
unit/ImportExport/utMD3Importer.cpp
|
#unit/ImportExport/utMD3Importer.cpp
|
||||||
unit/ImportExport/utMD5Importer.cpp
|
unit/ImportExport/utMD5Importer.cpp
|
||||||
unit/ImportExport/utMDLImporter.cpp
|
unit/ImportExport/utMDLImporter.cpp
|
||||||
unit/ImportExport/MDL/MDLHL1TestFiles.h
|
unit/ImportExport/MDL/MDLHL1TestFiles.h
|
||||||
unit/ImportExport/MDL/utMDLImporter_HL1_ImportSettings.cpp
|
unit/ImportExport/MDL/utMDLImporter_HL1_ImportSettings.cpp
|
||||||
unit/ImportExport/MDL/utMDLImporter_HL1_Materials.cpp
|
unit/ImportExport/MDL/utMDLImporter_HL1_Materials.cpp
|
||||||
unit/ImportExport/MDL/utMDLImporter_HL1_Nodes.cpp
|
unit/ImportExport/MDL/utMDLImporter_HL1_Nodes.cpp
|
||||||
#unit/ImportExport/IRR/utIrrImportExport.cpp
|
|
||||||
unit/ImportExport/RAW/utRAWImportExport.cpp
|
unit/ImportExport/RAW/utRAWImportExport.cpp
|
||||||
unit/ImportExport/Terragen/utTerragenImportExport.cpp
|
unit/ImportExport/Terragen/utTerragenImportExport.cpp
|
||||||
)
|
)
|
||||||
|
|
|
@ -45,6 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/Importer.hpp>
|
#include <assimp/Importer.hpp>
|
||||||
|
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
TEST(utMD3Importer, importWatercan) {
|
TEST(utMD3Importer, importWatercan) {
|
||||||
|
|
Loading…
Reference in New Issue