Merge branch 'master' into fix/xcode-compile-20201018
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 * = "") {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -130,6 +130,7 @@ void FBXImporter::SetupProperties(const Importer *pImp) {
|
||||
settings.readCameras = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_READ_CAMERAS, true);
|
||||
settings.readLights = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_READ_LIGHTS, true);
|
||||
settings.readAnimations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS, true);
|
||||
settings.readWeights = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_READ_WEIGHTS, true);
|
||||
settings.strictMode = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_STRICT_MODE, false);
|
||||
settings.preservePivots = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS, true);
|
||||
settings.optimizeEmptyAnimationCurves = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES, true);
|
||||
|
||||
@@ -86,7 +86,7 @@ Material::Material(uint64_t id, const Element& element, const Document& doc, con
|
||||
std::string templateName;
|
||||
|
||||
// lower-case shading because Blender (for example) writes "Phong"
|
||||
std::transform(shading.begin(), shading.end(), shading.begin(), Assimp::ToLower<char>);
|
||||
std::transform(shading.data(), shading.data() + shading.size(), std::addressof(shading[0]), Assimp::ToLower<char>);
|
||||
if(shading == "phong") {
|
||||
templateName = "Material.FbxSurfacePhong";
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user