From b87a3b33dd2268472b8973a5a855e34832deb6b6 Mon Sep 17 00:00:00 2001 From: Alexander Gessler Date: Thu, 5 Dec 2013 22:53:14 +0100 Subject: [PATCH 1/4] Update Readme.md --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index bc63b5e84..978584ab1 100644 --- a/Readme.md +++ b/Readme.md @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) Open Asset Import Library is a Open Source library designed to load various __3d file formats and convert them into a single, in-memory format__. It supports more than __30 file formats__ for import and a growing selection of file formats for export. Additionally, assimp features various __post processing tools__ to refine the imported data: _normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials_ and many more. -Its abbreviated name under which it is commonly known is __assimp__. +Its short name under which it is commonly known is __assimp__. This is the development trunk of assimp containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [assimp.sf.net](http://assimp.sf.net) or from *nix package repositories. According to [Travis-CI] (https://travis-ci.org/), the current build status of the trunk is [![Build Status](https://travis-ci.org/assimp/assimp.png)](https://travis-ci.org/assimp/assimp) @@ -88,7 +88,7 @@ C++ish interface). The directory structure is: ### Building ### -Take a look into the `INSTALL` file. Or fire up CMake with the usual steps. +Take a look into the `INSTALL` file. Our build system is CMake, if you already used CMake before there is a good chance you know what to do. ### Where to get help ### From 9186911da044047745ae4f5253e0ee1dd0182547 Mon Sep 17 00:00:00 2001 From: Alexander Gessler Date: Wed, 11 Dec 2013 17:44:46 +0100 Subject: [PATCH 2/4] Fix build exclude define in BlenderScene.cpp, fixes #205 --- code/BlenderScene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/BlenderScene.cpp b/code/BlenderScene.cpp index e99c856bb..77b9f5f66 100644 --- a/code/BlenderScene.cpp +++ b/code/BlenderScene.cpp @@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief MACHINE GENERATED BY ./scripts/BlenderImporter/genblenddna.py */ #include "AssimpPCH.h" -#ifndef AI_BUILD_NO_BLEND_IMPORTER +#ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER #include "BlenderDNA.h" #include "BlenderScene.h" From f433746bfaac05fe463c27fc52cec303af6a5d90 Mon Sep 17 00:00:00 2001 From: Nick Overdijk Date: Fri, 29 Mar 2013 16:12:22 +0100 Subject: [PATCH 3/4] Add support for emissive and gloss-maps Conflicts: code/ObjFileMtlImporter.cpp Someone added support for loading more bump maps, I added support for emmissive-maps. Easy merge. --- code/ObjFileData.h | 2 ++ code/ObjFileImporter.cpp | 3 +++ code/ObjFileMtlImporter.cpp | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/code/ObjFileData.h b/code/ObjFileData.h index 7b2b6cf12..79605ef00 100755 --- a/code/ObjFileData.h +++ b/code/ObjFileData.h @@ -156,6 +156,7 @@ struct Material aiString texture; aiString textureSpecular; aiString textureAmbient; + aiString textureEmissive; aiString textureBump; aiString textureNormal; aiString textureSpecularity; @@ -166,6 +167,7 @@ struct Material TextureDiffuseType = 0, TextureSpecularType, TextureAmbientType, + TextureEmissiveType, TextureBumpType, TextureNormalType, TextureSpecularityType, diff --git a/code/ObjFileImporter.cpp b/code/ObjFileImporter.cpp index 13dfee203..1eec92f70 100644 --- a/code/ObjFileImporter.cpp +++ b/code/ObjFileImporter.cpp @@ -575,6 +575,9 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc } } + if ( 0 != pCurrentMaterial->textureEmissive.length ) + mat->AddProperty( &pCurrentMaterial->textureEmissive, AI_MATKEY_TEXTURE_EMISSIVE(0)); + if ( 0 != pCurrentMaterial->textureSpecular.length ) { mat->AddProperty( &pCurrentMaterial->textureSpecular, AI_MATKEY_TEXTURE_SPECULAR(0)); diff --git a/code/ObjFileMtlImporter.cpp b/code/ObjFileMtlImporter.cpp index f0d2f1795..8ba19efd2 100644 --- a/code/ObjFileMtlImporter.cpp +++ b/code/ObjFileMtlImporter.cpp @@ -302,6 +302,10 @@ void ObjFileMtlImporter::getTexture() { // Ambient texture out = & m_pModel->m_pCurrentMaterial->textureAmbient; clampIndex = ObjFile::Material::TextureAmbientType; + } else if (!ASSIMP_strincmp(&(*m_DataIt),"map_emissive",6)) { + // Emissive texture + out = & m_pModel->m_pCurrentMaterial->textureEmissive; + clampIndex = ObjFile::Material::TextureEmissiveType; } else if ( !ASSIMP_strincmp( pPtr, BumpTexture1.c_str(), BumpTexture1.size() ) || !ASSIMP_strincmp( pPtr, BumpTexture2.c_str(), BumpTexture2.size() ) || !ASSIMP_strincmp( pPtr, BumpTexture3.c_str(), BumpTexture3.size() ) ) { From 5b076fe234bbb222da091a9175212d2b92ba2f50 Mon Sep 17 00:00:00 2001 From: Nick Overdijk Date: Sat, 14 Dec 2013 01:40:00 +0100 Subject: [PATCH 4/4] Fixes warnings in clang for unrecognized attribute 'gcc_struct' --- include/assimp/Compiler/pushpack1.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/assimp/Compiler/pushpack1.h b/include/assimp/Compiler/pushpack1.h index 71e6089bd..8bdb71293 100644 --- a/include/assimp/Compiler/pushpack1.h +++ b/include/assimp/Compiler/pushpack1.h @@ -8,6 +8,7 @@ // MSVC 7,8,9 // GCC // BORLAND (complains about 'pack state changed but not reverted', but works) +// Clang // // // USAGE: @@ -25,7 +26,11 @@ # pragma pack(push,1) # define PACK_STRUCT #elif defined( __GNUC__ ) -# define PACK_STRUCT __attribute__((gcc_struct, __packed__)) +# if defined(__clang__) +# define PACK_STRUCT __attribute__((__packed__)) +# else +# define PACK_STRUCT __attribute__((gcc_struct, __packed__)) +# endif #else # error Compiler not supported #endif