Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
kimkulling authored Oct 27, 2020
2 parents aee2e9a + 753503a commit df768bd
Show file tree
Hide file tree
Showing 24 changed files with 2,415 additions and 2,015 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,6 @@ ELSE ()
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_C4D_IMPORTER )
ENDIF ()

#IF(NOT ASSIMP_HUNTER_ENABLED)
ADD_SUBDIRECTORY(contrib)
#ENDIF()

ADD_SUBDIRECTORY( code/ )
IF ( ASSIMP_BUILD_ASSIMP_TOOLS )
# The viewer for windows only
Expand Down
1 change: 0 additions & 1 deletion code/AssetLib/Blender/BlenderDNA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
13 changes: 6 additions & 7 deletions code/AssetLib/Blender/BlenderDNA.h
Original file line number Diff line number Diff line change
Expand Up @@ -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...) {
}
};

Expand Down Expand Up @@ -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. */
// -------------------------------------------------------------------------------
Expand Down Expand Up @@ -395,7 +394,7 @@ class Structure {

// --------------------------------------------------------
template <>
struct Structure ::_defaultInitializer<ErrorPolicy_Warn> {
struct Structure::_defaultInitializer<ErrorPolicy_Warn> {

template <typename T>
void operator()(T &out, const char *reason = "<add reason>") {
Expand All @@ -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 * = "") {
Expand Down
43 changes: 5 additions & 38 deletions code/AssetLib/Blender/BlenderLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 5 additions & 2 deletions code/AssetLib/Blender/BlenderScene.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit df768bd

Please sign in to comment.