Merge branch 'master' into acloader_enums
This commit is contained in:
@@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "MMDPmxParser.h"
|
||||
#include <assimp/StringUtils.h>
|
||||
#ifdef ASSIMP_USE_HUNTER
|
||||
# include <utf8/utf8.h>
|
||||
# include <utf8.h>
|
||||
#else
|
||||
# include "../contrib/utf8cpp/source/utf8.h"
|
||||
#endif
|
||||
|
||||
@@ -59,7 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <assimp/StreamReader.h>
|
||||
#include <assimp/TinyFormatter.h>
|
||||
#ifdef ASSIMP_USE_HUNTER
|
||||
#include <utf8/utf8.h>
|
||||
#include <utf8.h>
|
||||
#else
|
||||
//# include "../contrib/ConvertUTF/ConvertUTF.h"
|
||||
#include "../contrib/utf8cpp/source/utf8.h"
|
||||
|
||||
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "STEPFileEncoding.h"
|
||||
#include <assimp/fast_atof.h>
|
||||
#ifdef ASSIMP_USE_HUNTER
|
||||
# include <utf8/utf8.h>
|
||||
# include <utf8.h>
|
||||
#else
|
||||
# include <contrib/utf8cpp/source/utf8.h>
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <assimp/MemoryIOWrapper.h>
|
||||
#include <assimp/irrXMLWrapper.h>
|
||||
#ifdef ASSIMP_USE_HUNTER
|
||||
# include <utf8/utf8.h>
|
||||
# include <utf8.h>
|
||||
#else
|
||||
# include "../contrib/utf8cpp/source/utf8.h"
|
||||
#endif
|
||||
|
||||
@@ -836,8 +836,8 @@ inline void Mesh::Read(Value &pJSON_Object, Asset &pAsset_Root) {
|
||||
|
||||
if (json_extensions == nullptr) goto mr_skip_extensions;
|
||||
|
||||
for (Value::MemberIterator it_memb = json_extensions->MemberBegin(); it_memb != json_extensions->MemberEnd(); it_memb++) {
|
||||
#ifdef ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC
|
||||
for (Value::MemberIterator it_memb = json_extensions->MemberBegin(); it_memb != json_extensions->MemberEnd(); it_memb++) {
|
||||
if (it_memb->name.GetString() == std::string("Open3DGC-compression")) {
|
||||
// Search for compressed data.
|
||||
// Compressed data contain description of part of "buffer" which is encoded. This part must be decoded and
|
||||
@@ -887,11 +887,11 @@ inline void Mesh::Read(Value &pJSON_Object, Asset &pAsset_Root) {
|
||||
Extension.push_back(ext_o3dgc); // store info in mesh extensions list.
|
||||
} // if(it_memb->name.GetString() == "Open3DGC-compression")
|
||||
else
|
||||
#endif
|
||||
{
|
||||
throw DeadlyImportError(std::string("GLTF: Unknown mesh extension: \"") + it_memb->name.GetString() + "\".");
|
||||
}
|
||||
} // for(Value::MemberIterator it_memb = json_extensions->MemberBegin(); it_memb != json_extensions->MemberEnd(); json_extensions++)
|
||||
#endif
|
||||
|
||||
mr_skip_extensions:
|
||||
|
||||
|
||||
@@ -305,11 +305,11 @@ namespace glTF {
|
||||
Value json_extensions;
|
||||
|
||||
json_extensions.SetObject();
|
||||
#ifdef ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC
|
||||
for(Mesh::SExtension* ptr_ext : m.Extension)
|
||||
{
|
||||
switch(ptr_ext->Type)
|
||||
{
|
||||
#ifdef ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC
|
||||
case Mesh::SExtension::EType::Compression_Open3DGC:
|
||||
{
|
||||
Value json_comp_data;
|
||||
@@ -339,11 +339,11 @@ namespace glTF {
|
||||
}
|
||||
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
throw DeadlyImportError("GLTF: Can not write mesh: unknown mesh extension, only Open3DGC is supported.");
|
||||
}// switch(ptr_ext->Type)
|
||||
}// for(Mesh::SExtension* ptr_ext : m.Extension)
|
||||
#endif
|
||||
|
||||
// Add extensions to mesh
|
||||
obj.AddMember("extensions", json_extensions, w.mAl);
|
||||
|
||||
@@ -215,8 +215,8 @@ void glTFImporter::ImportMeshes(glTF::Asset &r) {
|
||||
|
||||
// Check if mesh extensions is used
|
||||
if (mesh.Extension.size() > 0) {
|
||||
for (Mesh::SExtension *cur_ext : mesh.Extension) {
|
||||
#ifdef ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC
|
||||
for (Mesh::SExtension *cur_ext : mesh.Extension) {
|
||||
if (cur_ext->Type == Mesh::SExtension::EType::Compression_Open3DGC) {
|
||||
// Limitations for meshes when using Open3DGC-compression.
|
||||
// It's a current limitation of sp... Specification have not this part still - about mesh compression. Why only one primitive?
|
||||
@@ -233,12 +233,12 @@ void glTFImporter::ImportMeshes(glTF::Asset &r) {
|
||||
|
||||
buf->EncodedRegion_SetCurrent(mesh.id);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
throw DeadlyImportError("GLTF: Can not import mesh: unknown mesh extension (code: \"" + to_string(cur_ext->Type) +
|
||||
"\"), only Open3DGC is supported.");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} // if(mesh.Extension.size() > 0)
|
||||
|
||||
meshOffsets.push_back(k);
|
||||
|
||||
+2
-2
@@ -899,7 +899,7 @@ ENDIF()
|
||||
# utf8
|
||||
IF(ASSIMP_HUNTER_ENABLED)
|
||||
hunter_add_package(utf8)
|
||||
find_package(utf8 CONFIG REQUIRED)
|
||||
find_package(utf8cpp CONFIG REQUIRED)
|
||||
ELSE()
|
||||
# utf8 is header-only, so Assimp doesn't need to do anything.
|
||||
ENDIF()
|
||||
@@ -1159,7 +1159,7 @@ IF(ASSIMP_HUNTER_ENABLED)
|
||||
minizip::minizip
|
||||
ZLIB::zlib
|
||||
RapidJSON::rapidjson
|
||||
utf8::utf8
|
||||
utf8cpp
|
||||
zip::zip
|
||||
)
|
||||
ELSE()
|
||||
|
||||
@@ -343,7 +343,7 @@ std::string BaseImporter::GetExtension(const std::string &file) {
|
||||
}
|
||||
|
||||
#ifdef ASSIMP_USE_HUNTER
|
||||
#include <utf8/utf8.h>
|
||||
#include <utf8.h>
|
||||
#else
|
||||
#include "../contrib/utf8cpp/source/utf8.h"
|
||||
#endif
|
||||
|
||||
@@ -100,7 +100,6 @@ size_t DefaultIOStream::Write(const void *pvBuffer,
|
||||
size_t pCount) {
|
||||
ai_assert(nullptr != pvBuffer);
|
||||
ai_assert(0 != pSize);
|
||||
ai_assert(0 != pCount);
|
||||
|
||||
return (mFile ? ::fwrite(pvBuffer, pSize, pCount, mFile) : 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user