Merge commit '6d630bec50fe7767296b0e5184a9c6c7b915df24' into contrib
commit
41175dacca
|
@ -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 ###
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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() ) ) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue