Merge branch 'master' into master
commit
b1c336799c
|
@ -40,6 +40,9 @@ SET(CMAKE_POLICY_DEFAULT_CMP0092 NEW)
|
|||
|
||||
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
|
||||
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
|
||||
#ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
|
||||
#define M3D_NODUP
|
||||
#endif
|
||||
|
||||
|
||||
// Header files, standard library.
|
||||
#include <memory> // shared_ptr
|
||||
|
@ -437,6 +437,6 @@ void M3DExporter::NodeWalk(const M3DWrapper &m3d, const aiNode *pNode, aiMatrix4
|
|||
}
|
||||
}
|
||||
} // namespace Assimp
|
||||
|
||||
#endif
|
||||
#endif // ASSIMP_BUILD_NO_M3D_EXPORTER
|
||||
#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
|
||||
#define AI_M3DEXPORTER_H_INC
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
|
||||
#ifndef ASSIMP_BUILD_NO_M3D_EXPORTER
|
||||
|
||||
#include <assimp/types.h>
|
||||
//#include <assimp/material.h>
|
||||
#include <assimp/StreamWriter.h> // StreamWriterLE
|
||||
#include <assimp/Exceptional.h> // DeadlyExportError
|
||||
|
||||
|
@ -60,8 +60,7 @@ struct aiNode;
|
|||
struct aiMaterial;
|
||||
struct aiFace;
|
||||
|
||||
namespace Assimp
|
||||
{
|
||||
namespace Assimp {
|
||||
class IOSystem;
|
||||
class IOStream;
|
||||
class ExportProperties;
|
||||
|
@ -71,8 +70,7 @@ namespace Assimp
|
|||
// ---------------------------------------------------------------------
|
||||
/** Helper class to export a given scene to an M3D file. */
|
||||
// ---------------------------------------------------------------------
|
||||
class M3DExporter
|
||||
{
|
||||
class M3DExporter {
|
||||
public:
|
||||
/// Constructor for a specific scene to export
|
||||
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 // AI_M3DEXPORTER_H_INC
|
||||
|
|
|
@ -39,8 +39,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#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 "M3DWrapper.h"
|
||||
|
||||
|
@ -141,10 +141,12 @@ unsigned char *M3DWrapper::Save(int quality, int flags, unsigned int &size) {
|
|||
}
|
||||
|
||||
void M3DWrapper::ClearSave() {
|
||||
if (saved_output_)
|
||||
if (saved_output_) {
|
||||
M3D_FREE(saved_output_);
|
||||
}
|
||||
saved_output_ = nullptr;
|
||||
}
|
||||
} // namespace Assimp
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -47,7 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef 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 <vector>
|
||||
|
@ -128,5 +129,6 @@ inline m3d_t *M3DWrapper::M3D() const {
|
|||
} // namespace Assimp
|
||||
|
||||
#endif
|
||||
#endif // ASSIMP_BUILD_NO_M3D_IMPORTER
|
||||
|
||||
#endif // AI_M3DWRAPPER_H_INC
|
||||
|
|
|
@ -138,7 +138,7 @@ SET( IMPORTERS
|
|||
unit/utColladaImportExport.cpp
|
||||
unit/utCSMImportExport.cpp
|
||||
unit/utB3DImportExport.cpp
|
||||
unit/utM3DImportExport.cpp
|
||||
#unit/utM3DImportExport.cpp
|
||||
unit/utMDCImportExport.cpp
|
||||
unit/utAssbinImportExport.cpp
|
||||
unit/ImportExport/utAssjsonImportExport.cpp
|
||||
|
@ -149,14 +149,13 @@ SET( IMPORTERS
|
|||
unit/ImportExport/utNFFImportExport.cpp
|
||||
unit/ImportExport/utXGLImportExport.cpp
|
||||
unit/ImportExport/utMD2Importer.cpp
|
||||
unit/ImportExport/utMD3Importer.cpp
|
||||
#unit/ImportExport/utMD3Importer.cpp
|
||||
unit/ImportExport/utMD5Importer.cpp
|
||||
unit/ImportExport/utMDLImporter.cpp
|
||||
unit/ImportExport/MDL/MDLHL1TestFiles.h
|
||||
unit/ImportExport/MDL/utMDLImporter_HL1_ImportSettings.cpp
|
||||
unit/ImportExport/MDL/utMDLImporter_HL1_Materials.cpp
|
||||
unit/ImportExport/MDL/utMDLImporter_HL1_Nodes.cpp
|
||||
#unit/ImportExport/IRR/utIrrImportExport.cpp
|
||||
unit/ImportExport/RAW/utRAWImportExport.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/Importer.hpp>
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
TEST(utMD3Importer, importWatercan) {
|
||||
|
|
Loading…
Reference in New Issue