Browse Source

Merge branch 'master' of https://github.com/thomasbiang/assimp into gltf2_sparseAccessor_export

Yingying Wang 5 years ago
parent
commit
12dc736d94

+ 2 - 1
code/AssetLib/Blender/BlenderDNA.inl

@@ -4,7 +4,6 @@ Open Asset Import Library (assimp)
 
 Copyright (c) 2006-2020, assimp team
 
-
 All rights reserved.
 
 Redistribution and use of this software in source and binary forms,
@@ -239,11 +238,13 @@ bool Structure :: ReadFieldPtr(TOUT<T> (&out)[N], const char* name,
     try {
         f = &(*this)[name];
 
+#ifdef _DEBUG
         // sanity check, should never happen if the genblenddna script is right
         if ((FieldFlag_Pointer|FieldFlag_Pointer) != (f->flags & (FieldFlag_Pointer|FieldFlag_Pointer))) {
             throw Error((Formatter::format(),"Field `",name,"` of structure `",
                 this->name,"` ought to be a pointer AND an array"));
         }
+#endif // _DEBUG
 
         db.reader->IncPtr(f->offset);
 

+ 1 - 1
code/AssetLib/M3D/m3d.h

@@ -5071,7 +5071,7 @@ unsigned char *m3d_save(m3d_t *model, int quality, int flags, unsigned int *size
             ptr += sprintf(ptr, "\r\n");
         }
         /* mathematical shapes face */
-        if (model->numshape && model->numshape && !(flags & M3D_EXP_NOFACE)) {
+        if (model->numshape !(flags & M3D_EXP_NOFACE)) {
             for (j = 0; j < model->numshape; j++) {
                 sn = _m3d_safestr(model->shape[j].name, 0);
                 if (!sn) {

+ 1 - 0
code/AssetLib/glTF/glTFAsset.h

@@ -62,6 +62,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <stdexcept>
 
 #define RAPIDJSON_HAS_STDSTRING 1
+#define RAPIDJSON_NOMEMBERITERATORCLASS
 #include <rapidjson/rapidjson.h>
 #include <rapidjson/document.h>
 #include <rapidjson/error/en.h>

+ 1 - 0
code/AssetLib/glTF/glTFCommon.h

@@ -53,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <vector>
 
 #define RAPIDJSON_HAS_STDSTRING 1
+#define RAPIDJSON_NOMEMBERITERATORCLASS
 #include <rapidjson/document.h>
 #include <rapidjson/error/en.h>
 #include <rapidjson/rapidjson.h>

+ 1 - 0
code/AssetLib/glTF2/glTF2Asset.h

@@ -64,6 +64,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <vector>
 
 #define RAPIDJSON_HAS_STDSTRING 1
+#define RAPIDJSON_NOMEMBERITERATORCLASS
 #include <rapidjson/document.h>
 #include <rapidjson/error/en.h>
 #include <rapidjson/rapidjson.h>