Merge branch 'master' into patch-1

This commit is contained in:
Kim Kulling
2020-10-27 16:20:33 +01:00
committed by GitHub
24 changed files with 2390 additions and 1990 deletions

View File

@@ -139,7 +139,6 @@ void DNAParser::Parse() {
dna.structures.push_back(Structure());
Structure &s = dna.structures.back();
s.name = types[n].name;
//s.index = dna.structures.size()-1;
n = stream.GetI2();
s.fields.reserve(n);

View File

@@ -83,10 +83,9 @@ class ObjectCache;
* ancestry. */
// -------------------------------------------------------------------------------
struct Error : DeadlyImportError {
template<typename... T>
explicit Error(T&&... args)
: DeadlyImportError(args...)
{
template <typename... T>
explicit Error(T &&...args) :
DeadlyImportError(args...) {
}
};
@@ -187,7 +186,7 @@ struct Field {
};
// -------------------------------------------------------------------------------
/** Range of possible behaviours for fields absend in the input file. Some are
/** Range of possible behaviors for fields absence in the input file. Some are
* mission critical so we need them, while others can silently be default
* initialized and no animations are harmed. */
// -------------------------------------------------------------------------------
@@ -395,7 +394,7 @@ private:
// --------------------------------------------------------
template <>
struct Structure ::_defaultInitializer<ErrorPolicy_Warn> {
struct Structure::_defaultInitializer<ErrorPolicy_Warn> {
template <typename T>
void operator()(T &out, const char *reason = "<add reason>") {
@@ -407,7 +406,7 @@ struct Structure ::_defaultInitializer<ErrorPolicy_Warn> {
};
template <>
struct Structure ::_defaultInitializer<ErrorPolicy_Fail> {
struct Structure::_defaultInitializer<ErrorPolicy_Fail> {
template <typename T>
void operator()(T & /*out*/, const char * = "") {

View File

@@ -106,51 +106,18 @@ class BlenderImporter : public BaseImporter, public LogFunctions<BlenderImporter
public:
BlenderImporter();
~BlenderImporter();
public:
// --------------------
bool CanRead( const std::string& pFile,
IOSystem* pIOHandler,
bool checkSig
) const;
bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const;
protected:
// --------------------
const aiImporterDesc* GetInfo () const;
// --------------------
void GetExtensionList(std::set<std::string>& app);
// --------------------
void SetupProperties(const Importer* pImp);
// --------------------
void InternReadFile( const std::string& pFile,
aiScene* pScene,
IOSystem* pIOHandler
);
// --------------------
void ParseBlendFile(Blender::FileDatabase& out,
std::shared_ptr<IOStream> stream
);
// --------------------
void ExtractScene(Blender::Scene& out,
const Blender::FileDatabase& file
);
// --------------------
void ConvertBlendFile(aiScene* out,
const Blender::Scene& in,
const Blender::FileDatabase& file
);
void InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler);
void ParseBlendFile(Blender::FileDatabase& out, std::shared_ptr<IOStream> stream);
void ExtractScene(Blender::Scene& out, const Blender::FileDatabase& file);
void ConvertBlendFile(aiScene* out, const Blender::Scene& in, const Blender::FileDatabase& file);
private:
// --------------------
aiNode* ConvertNode(const Blender::Scene& in,
const Blender::Object* obj,
Blender::ConversionData& conv_info,

View File

@@ -155,7 +155,7 @@ struct World : ElemBase {
// -------------------------------------------------------------------------------
struct MVert : ElemBase {
float co[3] FAIL;
float no[3] FAIL; // readed as short and divided through / 32767.f
float no[3] FAIL; // read as short and divided through / 32767.f
char flag;
int mat_nr WARN;
int bweight;
@@ -228,7 +228,10 @@ struct TFace : ElemBase {
// -------------------------------------------------------------------------------
struct MTFace : ElemBase {
MTFace() :
flag(0), mode(0), tile(0), unwrap(0) {
flag(0),
mode(0),
tile(0),
unwrap(0) {
}
float uv[4][2] FAIL;

File diff suppressed because it is too large Load Diff

View File

@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------------
*/
// Actually just a dummy, used by the compiler to build the precompiled header.
// Actually just a dummy, used by the compiler to build the pre-compiled header.
#include "ScenePrivate.h"
#include <assimp/scene.h>
@@ -51,13 +51,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// --------------------------------------------------------------------------------
// Legal information string - don't remove this.
static const char *LEGAL_INFORMATION =
"Open Asset Import Library (Assimp).\n"
"A free C/C++ library to import various 3D file formats into applications\n\n"
"(c) 2006-2020, assimp team\n"
"License under the terms and conditions of the 3-clause BSD license\n"
"http://assimp.org\n";
"https://www.assimp.org\n";
// ------------------------------------------------------------------------------------------------
// Get legal string