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

pull/3227/head
Yingying Wang 2020-06-08 14:32:23 -07:00
commit 12dc736d94
5 changed files with 6 additions and 2 deletions

View File

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

View File

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

View File

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

View File

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

View File

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