diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b09ff1ec..9ebf26d29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,7 @@ add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/c # Globally enbale Boost resp. the Boost workaround – it is also needed by the # tools which include the Assimp headers. -SET ( ASSIMP_ENABLE_BOOST_WORKAROUND OFF CACHE BOOL +SET ( ASSIMP_ENABLE_BOOST_WORKAROUND ON CACHE BOOL "If a simple implementation of the used Boost functions is used. Slightly reduces functionality, but enables builds without Boost available." ) IF ( ASSIMP_ENABLE_BOOST_WORKAROUND ) diff --git a/Readme.md b/Readme.md index 4f5ab1d7f..66b754819 100644 --- a/Readme.md +++ b/Readme.md @@ -1,7 +1,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. It also supports exporting files to a few selected file formats. +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. It also supports exporting files to a growing selection of file formats. Its abbreviated name under which it is commonly known is __assimp__. @@ -13,7 +13,7 @@ The library provides importers for a lot of file formats, including: - 3DS - BLEND (Blender 3D) -- DAE (Collada) +- DAE/Collada - FBX - IFC-STEP - ASE @@ -61,7 +61,7 @@ See [the full list here](http://assimp.sourceforge.net/main_features_formats.htm -#### 1.2 Repository structure #### +#### Repository structure #### Open Asset Import Library is implemented in C++ (but provides both a C and a @@ -71,48 +71,50 @@ C++ish interface). The directory structure is: /code Source code /contrib Third-party libraries /doc Documentation (doxysource and pre-compiled docs) - /include Public header C and C++ header files. - /lib Static library location for Windows. - /obj Object file location for Windows. - /port Ports to other languages and scripts to maintain those. - /test Unit- and regression tests, test suite of models. - /tools Tools (viewer, command line `assimp`). + /include Public header C and C++ header files + /lib Static library location for Windows + /obj Object file location for Windows + /scripts Scripts used to generate the loading code for some formats + /port Ports to other languages and scripts to maintain those. + /test Unit- and regression tests, test suite of models + /tools Tools (viewer, command line `assimp`) /samples A small number of samples to illustrate possible - use cases for Assimp. + use cases for Assimp /workspaces Build enviroments for vc,xcode,... (deprecated, CMake has superseeded all legacy build options!) -### 2. Build the library ### +### Building ### Take a look into the `INSTALL` file. Or fire up CMake with the usual steps. - -### 3. Where to get help ### +### Where to get help ### For more information, visit [our website](http://assimp.sourceforge.net/). Or check out the `./doc`- folder, which contains the official documentation in HTML format. (CHMs for Windows are included in some release packages and should be located right here in the root folder). -If the documentation doesn't solve your problems, try our forums at SF.net +If the documentation doesn't solve your problems, +[try our forums at SF.net](http://sourceforge.net/p/assimp/discussion/817654) or ask on +[StackOverflow](http://stackoverflow.com/questions/tagged/assimp?sort=newest). - -- [Open Discussion](http://sourceforge.net/projects/assimp/forums/forum/817653) -- [General Help](http://sourceforge.net/projects/assimp/forums/forum/817654) - - -For development stuff, there is also a mailing list, _assimp-discussions_ +For development discussions, there is also a mailing list, _assimp-discussions_ [(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions) +### Contributing ### + +Contributions to assimp are highly appreciated. The easiest way to get involved is to submit +a pull request with your changes against the main repository's `master` branch. -### 4. License ### +### License ### -The license of the Asset Import Library is based on the modified, __3-clause BSD__-License, which is a very liberal license. An _informal_ summary is: do whatever you want, but include Assimp's license text with your product - and don't sue us if our code doesn't work. +Our license is based on the modified, __3-clause BSD__-License, which is very liberal. -Note that, unlike LGPLed code, you may link statically to Assimp. -For the formal details, see the `LICENSE` file. +An _informal_ summary is: do whatever you want, but include Assimp's license text with your product - +and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp. +For the legal details, see the `LICENSE` file. diff --git a/code/AssimpCExport.cpp b/code/AssimpCExport.cpp index 9483eb2d3..053e1b9f4 100644 --- a/code/AssimpCExport.cpp +++ b/code/AssimpCExport.cpp @@ -73,6 +73,7 @@ ASSIMP_API void aiCopyScene(const aiScene* pIn, aiScene** pOut) } SceneCombiner::CopyScene(pOut,pIn,true); + ScenePriv(*pOut)->mIsCopy = true; } diff --git a/code/BlenderDNA.h b/code/BlenderDNA.h index 2eeaee97a..b4733f385 100644 --- a/code/BlenderDNA.h +++ b/code/BlenderDNA.h @@ -278,19 +278,23 @@ public: // -------------------------------------------------------- // field parsing for pointer or dynamic array types // (boost::shared_ptr or boost::shared_array) + // The return value indicates whether the data was already cached. template class TOUT, typename T> - void ReadFieldPtr(TOUT& out, const char* name, - const FileDatabase& db) const; + bool ReadFieldPtr(TOUT& out, const char* name, + const FileDatabase& db, + bool non_recursive = false) const; // -------------------------------------------------------- // field parsing for static arrays of pointer or dynamic // array types (boost::shared_ptr[] or boost::shared_array[]) + // The return value indicates whether the data was already cached. template class TOUT, typename T, size_t N> - void ReadFieldPtr(TOUT (&out)[N], const char* name, + bool ReadFieldPtr(TOUT (&out)[N], const char* name, const FileDatabase& db) const; // -------------------------------------------------------- // field parsing for `normal` values + // The return value indicates whether the data was already cached. template void ReadField(T& out, const char* name, const FileDatabase& db) const; @@ -299,17 +303,18 @@ private: // -------------------------------------------------------- template