Browse Source

Merge branch 'master' into kimkulling-patch-1

Kim Kulling 5 years ago
parent
commit
6c95ee145c
100 changed files with 1105 additions and 947 deletions
  1. 1 1
      .travis.sh
  2. 3 0
      .travis.yml
  3. 58 50
      CMakeLists.txt
  4. 1 1
      LICENSE
  5. 8 6
      appveyor.yml
  6. 1 1
      assimp-config-version.cmake.in
  7. 1 1
      code/3DS/3DSConverter.cpp
  8. 1 1
      code/3DS/3DSExporter.cpp
  9. 1 1
      code/3DS/3DSExporter.h
  10. 1 1
      code/3DS/3DSHelper.h
  11. 1 1
      code/3DS/3DSLoader.cpp
  12. 1 1
      code/3DS/3DSLoader.h
  13. 1 1
      code/3MF/3MFXmlTags.h
  14. 1 1
      code/3MF/D3MFExporter.cpp
  15. 1 1
      code/3MF/D3MFExporter.h
  16. 1 1
      code/3MF/D3MFImporter.cpp
  17. 1 1
      code/3MF/D3MFImporter.h
  18. 1 1
      code/3MF/D3MFOpcPackage.cpp
  19. 1 1
      code/3MF/D3MFOpcPackage.h
  20. 1 1
      code/AC/ACLoader.cpp
  21. 1 1
      code/AC/ACLoader.h
  22. 1 1
      code/AMF/AMFImporter.cpp
  23. 1 1
      code/AMF/AMFImporter.hpp
  24. 1 1
      code/AMF/AMFImporter_Geometry.cpp
  25. 1 1
      code/AMF/AMFImporter_Macro.hpp
  26. 1 1
      code/AMF/AMFImporter_Material.cpp
  27. 1 1
      code/AMF/AMFImporter_Node.hpp
  28. 1 1
      code/AMF/AMFImporter_Postprocess.cpp
  29. 1 1
      code/ASE/ASELoader.cpp
  30. 1 1
      code/ASE/ASELoader.h
  31. 1 1
      code/ASE/ASEParser.cpp
  32. 1 1
      code/ASE/ASEParser.h
  33. 10 787
      code/Assbin/AssbinExporter.cpp
  34. 1 1
      code/Assbin/AssbinExporter.h
  35. 858 0
      code/Assbin/AssbinFileWriter.cpp
  36. 66 0
      code/Assbin/AssbinFileWriter.h
  37. 2 2
      code/Assbin/AssbinLoader.cpp
  38. 1 1
      code/Assbin/AssbinLoader.h
  39. 5 5
      code/Assjson/cencode.c
  40. 1 1
      code/Assxml/AssxmlExporter.cpp
  41. 1 1
      code/Assxml/AssxmlExporter.h
  42. 1 1
      code/B3D/B3DImporter.cpp
  43. 1 1
      code/B3D/B3DImporter.h
  44. 1 1
      code/BVH/BVHLoader.cpp
  45. 1 1
      code/BVH/BVHLoader.h
  46. 1 1
      code/Blender/BlenderBMesh.cpp
  47. 1 1
      code/Blender/BlenderBMesh.h
  48. 1 1
      code/Blender/BlenderDNA.cpp
  49. 1 1
      code/Blender/BlenderDNA.h
  50. 1 1
      code/Blender/BlenderDNA.inl
  51. 1 1
      code/Blender/BlenderIntermediate.h
  52. 1 1
      code/Blender/BlenderLoader.cpp
  53. 1 1
      code/Blender/BlenderLoader.h
  54. 1 1
      code/Blender/BlenderModifier.cpp
  55. 1 1
      code/Blender/BlenderModifier.h
  56. 1 1
      code/Blender/BlenderScene.cpp
  57. 1 1
      code/Blender/BlenderScene.h
  58. 1 1
      code/Blender/BlenderSceneGen.h
  59. 1 1
      code/Blender/BlenderTessellator.cpp
  60. 1 1
      code/Blender/BlenderTessellator.h
  61. 1 1
      code/C4D/C4DImporter.cpp
  62. 1 1
      code/C4D/C4DImporter.h
  63. 1 1
      code/CApi/AssimpCExport.cpp
  64. 1 1
      code/CApi/CInterfaceIOWrapper.cpp
  65. 1 1
      code/CApi/CInterfaceIOWrapper.h
  66. 3 5
      code/CMakeLists.txt
  67. 1 1
      code/COB/COBLoader.cpp
  68. 1 1
      code/COB/COBLoader.h
  69. 1 1
      code/COB/COBScene.h
  70. 2 2
      code/CSM/CSMLoader.cpp
  71. 1 1
      code/CSM/CSMLoader.h
  72. 1 1
      code/Collada/ColladaExporter.cpp
  73. 1 1
      code/Collada/ColladaExporter.h
  74. 1 1
      code/Collada/ColladaHelper.cpp
  75. 1 1
      code/Collada/ColladaHelper.h
  76. 1 1
      code/Collada/ColladaLoader.cpp
  77. 1 1
      code/Collada/ColladaLoader.h
  78. 1 1
      code/Collada/ColladaParser.cpp
  79. 1 1
      code/Collada/ColladaParser.h
  80. 1 1
      code/Common/Assimp.cpp
  81. 1 1
      code/Common/BaseImporter.cpp
  82. 1 1
      code/Common/BaseProcess.cpp
  83. 1 1
      code/Common/BaseProcess.h
  84. 1 1
      code/Common/Bitmap.cpp
  85. 1 1
      code/Common/CreateAnimMesh.cpp
  86. 1 1
      code/Common/DefaultIOStream.cpp
  87. 1 1
      code/Common/DefaultIOSystem.cpp
  88. 1 1
      code/Common/DefaultLogger.cpp
  89. 1 1
      code/Common/DefaultProgressHandler.h
  90. 1 1
      code/Common/Exporter.cpp
  91. 1 1
      code/Common/FileLogStream.h
  92. 1 1
      code/Common/FileSystemFilter.h
  93. 1 1
      code/Common/Importer.cpp
  94. 1 1
      code/Common/Importer.h
  95. 1 1
      code/Common/ImporterRegistry.cpp
  96. 1 1
      code/Common/PolyTools.h
  97. 1 1
      code/Common/PostStepRegistry.cpp
  98. 1 1
      code/Common/RemoveComments.cpp
  99. 1 1
      code/Common/SGSpatialSort.cpp
  100. 1 1
      code/Common/SceneCombiner.cpp

+ 1 - 1
.travis.sh

@@ -1,7 +1,7 @@
 #---------------------------------------------------------------------------
 #---------------------------------------------------------------------------
 #Open Asset Import Library (assimp)
 #Open Asset Import Library (assimp)
 #---------------------------------------------------------------------------
 #---------------------------------------------------------------------------
-# Copyright (c) 2006-2017, assimp team
+# Copyright (c) 2006-2020, assimp team
 #
 #
 # License see LICENSE file
 # License see LICENSE file
 #
 #

+ 3 - 0
.travis.yml

@@ -30,6 +30,9 @@ env:
     - secure: "lZ7pHQvl5dpZWzBQAaIMf0wqrvtcZ4wiZKeIZjf83TEsflW8+z0uTpIuN30ZV6Glth/Sq1OhLnTP5+N57fZU/1ebA5twHdvP4bS5CIUUg71/CXQZNl36xeaqvxsG/xRrdpKOsPdjAOsQ9KPTQulsX43XDLS7CasMiLvYOpqKcPc="
     - secure: "lZ7pHQvl5dpZWzBQAaIMf0wqrvtcZ4wiZKeIZjf83TEsflW8+z0uTpIuN30ZV6Glth/Sq1OhLnTP5+N57fZU/1ebA5twHdvP4bS5CIUUg71/CXQZNl36xeaqvxsG/xRrdpKOsPdjAOsQ9KPTQulsX43XDLS7CasMiLvYOpqKcPc="
     - PV=r8e PLATF=linux-x86_64 NDK_HOME=${TRAVIS_BUILD_DIR}/android-ndk-${PV} PATH=${PATH}:${NDK_HOME}
     - PV=r8e PLATF=linux-x86_64 NDK_HOME=${TRAVIS_BUILD_DIR}/android-ndk-${PV} PATH=${PATH}:${NDK_HOME}
 
 
+git:
+  depth: 1
+
 matrix:
 matrix:
   include:
   include:
     - os: linux
     - os: linux

+ 58 - 50
CMakeLists.txt

@@ -1,6 +1,6 @@
 # Open Asset Import Library (assimp)
 # Open Asset Import Library (assimp)
 # ----------------------------------------------------------------------
 # ----------------------------------------------------------------------
-# Copyright (c) 2006-2019, assimp team
+# Copyright (c) 2006-2020, assimp team
 #
 #
 # All rights reserved.
 # All rights reserved.
 #
 #
@@ -51,7 +51,7 @@ IF(HUNTER_ENABLED)
   add_definitions(-DASSIMP_USE_HUNTER)
   add_definitions(-DASSIMP_USE_HUNTER)
 ENDIF(HUNTER_ENABLED)
 ENDIF(HUNTER_ENABLED)
 
 
-PROJECT( Assimp VERSION 5.0.0 )
+PROJECT( Assimp VERSION 5.0.1 )
 
 
 # All supported options ###############################################
 # All supported options ###############################################
 
 
@@ -100,6 +100,10 @@ OPTION ( ASSIMP_COVERALLS
   "Enable this to measure test coverage."
   "Enable this to measure test coverage."
   OFF
   OFF
 )
 )
+OPTION( ASSIMP_INSTALL
+  "DIsable this if you want to use assimp as a submodule."
+  ON
+)
 OPTION ( ASSIMP_ERROR_MAX
 OPTION ( ASSIMP_ERROR_MAX
   "Enable all warnings."
   "Enable all warnings."
   OFF
   OFF
@@ -601,55 +605,59 @@ ENDIF ( ASSIMP_BUILD_TESTS )
 
 
 # Generate a pkg-config .pc for the Assimp library.
 # Generate a pkg-config .pc for the Assimp library.
 CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/assimp.pc.in" "${PROJECT_BINARY_DIR}/assimp.pc" @ONLY )
 CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/assimp.pc.in" "${PROJECT_BINARY_DIR}/assimp.pc" @ONLY )
-INSTALL( FILES "${PROJECT_BINARY_DIR}/assimp.pc" DESTINATION ${ASSIMP_LIB_INSTALL_DIR}/pkgconfig/ COMPONENT ${LIBASSIMP-DEV_COMPONENT})
-
-IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
-  # Packing information
-  SET(CPACK_PACKAGE_NAME                    "assimp{ASSIMP_VERSION_MAJOR}.{ASSIMP_VERSION_MINOR}")
-  SET(CPACK_PACKAGE_CONTACT "" CACHE STRING "Package maintainer and PGP signer.")
-  SET(CPACK_PACKAGE_VENDOR                  "https://github.com/assimp")
-  SET(CPACK_PACKAGE_DISPLAY_NAME            "Assimp ${ASSIMP_VERSION}")
-  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY     " - Open Asset Import Library ${ASSIMP_VERSION}")
-  SET(CPACK_PACKAGE_VERSION                 "${ASSIMP_VERSION}.${ASSIMP_PACKAGE_VERSION}" )
-  SET(CPACK_PACKAGE_VERSION_MAJOR           "${ASSIMP_VERSION_MAJOR}")
-  SET(CPACK_PACKAGE_VERSION_MINOR           "${ASSIMP_VERSION_MINOR}")
-  SET(CPACK_PACKAGE_VERSION_PATCH           "${ASSIMP_VERSION_PATCH}")
-  SET(CPACK_PACKAGE_INSTALL_DIRECTORY       "assimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}")
-  SET(CPACK_RESOURCE_FILE_LICENSE           "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
-
-  STRING(TOUPPER ${LIBASSIMP_COMPONENT}     "LIBASSIMP_COMPONENT_UPPER")
-  STRING(TOUPPER ${LIBASSIMP-DEV_COMPONENT} "LIBASSIMP-DEV_COMPONENT_UPPER")
-
-  SET(CPACK_COMPONENT_ASSIMP-BIN_DISPLAY_NAME                       "tools")
-  SET(CPACK_COMPONENT_ASSIMP-BIN_DEPENDS                            "${LIBASSIMP_COMPONENT}" )
-  SET(CPACK_COMPONENT_${LIBASSIMP_COMPONENT_UPPER}_DISPLAY_NAME     "libraries")
-  SET(CPACK_COMPONENT_${LIBASSIMP-DEV_COMPONENT_UPPER}_DISPLAY_NAME "common headers and installs")
-  SET(CPACK_COMPONENT_${LIBASSIMP-DEV_COMPONENT_UPPER}_DEPENDS $    "{LIBASSIMP_COMPONENT}" )
-  SET(CPACK_COMPONENT_ASSIMP-DEV_DISPLAY_NAME                       "${CPACK_COMPONENT_${LIBASSIMP-DEV_COMPONENT}_DISPLAY_NAME}" )
-  SET(CPACK_COMPONENT_ASSIMP-DEV_DEPENDS                            "${LIBASSIMP-DEV_COMPONENT}" )
-  SET(CPACK_DEBIAN_BUILD_DEPENDS debhelper cmake zlib1g-dev pkg-config)
-
-  # debian
-  SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
-  SET(CPACK_DEBIAN_CMAKE_OPTIONS    "-DBUILD_ASSIMP_SAMPLES:BOOL=${ASSIMP_BUILD_SAMPLES}")
-  SET(CPACK_DEBIAN_PACKAGE_SECTION  "libs" )
-  SET(CPACK_DEBIAN_PACKAGE_DEPENDS  "${CPACK_COMPONENTS_ALL}")
-  SET(CPACK_DEBIAN_PACKAGE_SUGGESTS)
-  set(cPACK_DEBIAN_PACKAGE_NAME     "assimp")
-  SET(CPACK_DEBIAN_PACKAGE_REMOVE_SOURCE_FILES contrib/gtest contrib/zlib workspaces test doc obj samples packaging)
-  SET(CPACK_DEBIAN_PACKAGE_SOURCE_COPY svn export --force)
-  SET(CPACK_DEBIAN_CHANGELOG)
-  execute_process(COMMAND lsb_release -is
-    OUTPUT_VARIABLE _lsb_distribution OUTPUT_STRIP_TRAILING_WHITESPACE
-    RESULT_VARIABLE _lsb_release_failed)
-  SET(CPACK_DEBIAN_DISTRIBUTION_NAME ${_lsb_distribution} CACHE STRING "Name of the distrubiton")
-  STRING(TOLOWER ${CPACK_DEBIAN_DISTRIBUTION_NAME} CPACK_DEBIAN_DISTRIBUTION_NAME)
-  IF( ${CPACK_DEBIAN_DISTRIBUTION_NAME} STREQUAL "ubuntu" )
-    SET(CPACK_DEBIAN_DISTRIBUTION_RELEASES lucid maverick natty oneiric precise CACHE STRING "Release code-names of the distrubiton release")
+IF ( ASSIMP_INSTALL )
+  INSTALL( FILES "${PROJECT_BINARY_DIR}/assimp.pc" DESTINATION ${ASSIMP_LIB_INSTALL_DIR}/pkgconfig/ COMPONENT ${LIBASSIMP-DEV_COMPONENT})
+ENDIF( ASSIMP_INSTALL )
+
+IF ( ASSIMP_INSTALL )
+  IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
+    # Packing information
+    SET(CPACK_PACKAGE_NAME                    "assimp{ASSIMP_VERSION_MAJOR}.{ASSIMP_VERSION_MINOR}")
+    SET(CPACK_PACKAGE_CONTACT "" CACHE STRING "Package maintainer and PGP signer.")
+    SET(CPACK_PACKAGE_VENDOR                  "https://github.com/assimp")
+    SET(CPACK_PACKAGE_DISPLAY_NAME            "Assimp ${ASSIMP_VERSION}")
+    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY     " - Open Asset Import Library ${ASSIMP_VERSION}")
+    SET(CPACK_PACKAGE_VERSION                 "${ASSIMP_VERSION}.${ASSIMP_PACKAGE_VERSION}" )
+    SET(CPACK_PACKAGE_VERSION_MAJOR           "${ASSIMP_VERSION_MAJOR}")
+    SET(CPACK_PACKAGE_VERSION_MINOR           "${ASSIMP_VERSION_MINOR}")
+    SET(CPACK_PACKAGE_VERSION_PATCH           "${ASSIMP_VERSION_PATCH}")
+    SET(CPACK_PACKAGE_INSTALL_DIRECTORY       "assimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}")
+    SET(CPACK_RESOURCE_FILE_LICENSE           "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
+
+    STRING(TOUPPER ${LIBASSIMP_COMPONENT}     "LIBASSIMP_COMPONENT_UPPER")
+    STRING(TOUPPER ${LIBASSIMP-DEV_COMPONENT} "LIBASSIMP-DEV_COMPONENT_UPPER")
+
+    SET(CPACK_COMPONENT_ASSIMP-BIN_DISPLAY_NAME                       "tools")
+    SET(CPACK_COMPONENT_ASSIMP-BIN_DEPENDS                            "${LIBASSIMP_COMPONENT}" )
+    SET(CPACK_COMPONENT_${LIBASSIMP_COMPONENT_UPPER}_DISPLAY_NAME     "libraries")
+    SET(CPACK_COMPONENT_${LIBASSIMP-DEV_COMPONENT_UPPER}_DISPLAY_NAME "common headers and installs")
+    SET(CPACK_COMPONENT_${LIBASSIMP-DEV_COMPONENT_UPPER}_DEPENDS $    "{LIBASSIMP_COMPONENT}" )
+    SET(CPACK_COMPONENT_ASSIMP-DEV_DISPLAY_NAME                       "${CPACK_COMPONENT_${LIBASSIMP-DEV_COMPONENT}_DISPLAY_NAME}" )
+    SET(CPACK_COMPONENT_ASSIMP-DEV_DEPENDS                            "${LIBASSIMP-DEV_COMPONENT}" )
+    SET(CPACK_DEBIAN_BUILD_DEPENDS debhelper cmake zlib1g-dev pkg-config)
+
+    # debian
+    SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
+    SET(CPACK_DEBIAN_CMAKE_OPTIONS    "-DBUILD_ASSIMP_SAMPLES:BOOL=${ASSIMP_BUILD_SAMPLES}")
+    SET(CPACK_DEBIAN_PACKAGE_SECTION  "libs" )
+    SET(CPACK_DEBIAN_PACKAGE_DEPENDS  "${CPACK_COMPONENTS_ALL}")
+    SET(CPACK_DEBIAN_PACKAGE_SUGGESTS)
+    SET(cPACK_DEBIAN_PACKAGE_NAME     "assimp")
+    SET(CPACK_DEBIAN_PACKAGE_REMOVE_SOURCE_FILES contrib/gtest contrib/zlib workspaces test doc obj samples packaging)
+    SET(CPACK_DEBIAN_PACKAGE_SOURCE_COPY svn export --force)
+    SET(CPACK_DEBIAN_CHANGELOG)
+    execute_process(COMMAND lsb_release -is
+      OUTPUT_VARIABLE _lsb_distribution OUTPUT_STRIP_TRAILING_WHITESPACE
+      RESULT_VARIABLE _lsb_release_failed)
+    SET(CPACK_DEBIAN_DISTRIBUTION_NAME ${_lsb_distribution} CACHE STRING "Name of the distrubiton")
+    STRING(TOLOWER ${CPACK_DEBIAN_DISTRIBUTION_NAME} CPACK_DEBIAN_DISTRIBUTION_NAME)
+    IF( ${CPACK_DEBIAN_DISTRIBUTION_NAME} STREQUAL "ubuntu" )
+      SET(CPACK_DEBIAN_DISTRIBUTION_RELEASES lucid maverick natty oneiric precise CACHE STRING "Release code-names of the distrubiton release")
+    ENDIF()
+    SET(DPUT_HOST "" CACHE STRING "PPA repository to upload the debian sources")
+    INCLUDE(CPack)
+    INCLUDE(DebSourcePPA)
   ENDIF()
   ENDIF()
-  SET(DPUT_HOST "" CACHE STRING "PPA repository to upload the debian sources")
-  INCLUDE(CPack)
-  INCLUDE(DebSourcePPA)
 ENDIF()
 ENDIF()
 
 
 if(WIN32)
 if(WIN32)

+ 1 - 1
LICENSE

@@ -1,6 +1,6 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 
 
-Copyright (c) 2006-2016, assimp team
+Copyright (c) 2006-2020, assimp team
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use of this software in source and binary forms,
 Redistribution and use of this software in source and binary forms,

+ 8 - 6
appveyor.yml

@@ -4,6 +4,8 @@
 # clone directory
 # clone directory
 clone_folder: c:\projects\assimp
 clone_folder: c:\projects\assimp
 
 
+clone_depth: 1
+
 # branches to build
 # branches to build
 branches:
 branches:
   # whitelist
   # whitelist
@@ -15,10 +17,10 @@ matrix:
     
     
 image:
 image:
   - Visual Studio 2013
   - Visual Studio 2013
-  - Visual Studio 2015
-  - Visual Studio 2017
+  #- Visual Studio 2015
+  #- Visual Studio 2017
   - Visual Studio 2019
   - Visual Studio 2019
-  - MinGW  
+  #- MinGW  
     
     
 platform:
 platform:
   - Win32
   - Win32
@@ -52,11 +54,11 @@ cache:
   - bin\.mtime_cache
   - bin\.mtime_cache
   
   
 before_build:
 before_build:
+  - echo NUMBER_OF_PROCESSORS=%NUMBER_OF_PROCESSORS%
   - ruby scripts\AppVeyor\mtime_cache -g scripts\AppVeyor\cacheglobs.txt -c bin\.mtime_cache\cache.json
   - ruby scripts\AppVeyor\mtime_cache -g scripts\AppVeyor\cacheglobs.txt -c bin\.mtime_cache\cache.json
   
   
-build:
-  parallel: true
-  project: Assimp.sln
+build_script:
+  cmake --build . --config Release -- /maxcpucount:2
   
   
 after_build:
 after_build:
   - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (
   - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (

+ 1 - 1
assimp-config-version.cmake.in

@@ -1,6 +1,6 @@
 # Open Asset Import Library (assimp)
 # Open Asset Import Library (assimp)
 # ----------------------------------------------------------------------
 # ----------------------------------------------------------------------
-# Copyright (c) 2006-2017, assimp team
+# Copyright (c) 2006-2020, assimp team
 # All rights reserved.
 # All rights reserved.
 #
 #
 # Redistribution and use of this software in source and binary forms,
 # Redistribution and use of this software in source and binary forms,

+ 1 - 1
code/3DS/3DSConverter.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/3DS/3DSExporter.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/3DS/3DSExporter.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/3DS/3DSHelper.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/3DS/3DSLoader.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/3DS/3DSLoader.h

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/3MF/3MFXmlTags.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/3MF/D3MFExporter.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/3MF/D3MFExporter.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/3MF/D3MFImporter.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/3MF/D3MFImporter.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/3MF/D3MFOpcPackage.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/3MF/D3MFOpcPackage.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/AC/ACLoader.cpp

@@ -4,7 +4,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/AC/ACLoader.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/AMF/AMFImporter.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/AMF/AMFImporter.hpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/AMF/AMFImporter_Geometry.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/AMF/AMFImporter_Macro.hpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/AMF/AMFImporter_Material.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/AMF/AMFImporter_Node.hpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/AMF/AMFImporter_Postprocess.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/ASE/ASELoader.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/ASE/ASELoader.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 

+ 1 - 1
code/ASE/ASEParser.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/ASE/ASEParser.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 10 - 787
code/Assbin/AssbinExporter.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.
@@ -46,799 +46,22 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_EXPORT
 #ifndef ASSIMP_BUILD_NO_EXPORT
 #ifndef ASSIMP_BUILD_NO_ASSBIN_EXPORTER
 #ifndef ASSIMP_BUILD_NO_ASSBIN_EXPORTER
 
 
-#include "Common/assbin_chunks.h"
-#include "PostProcessing/ProcessHelper.h"
+#include "AssbinFileWriter.h"
 
 
-#include <assimp/version.h>
-#include <assimp/IOStream.hpp>
+#include <assimp/scene.h>
 #include <assimp/IOSystem.hpp>
 #include <assimp/IOSystem.hpp>
 #include <assimp/Exporter.hpp>
 #include <assimp/Exporter.hpp>
-#include <assimp/Exceptional.h>
-
-#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
-#   include <zlib.h>
-#else
-#   include "../contrib/zlib/zlib.h"
-#endif
-
-#include <time.h>
 
 
 namespace Assimp {
 namespace Assimp {
 
 
-template <typename T>
-size_t Write(IOStream * stream, const T& v) {
-    return stream->Write( &v, sizeof(T), 1 );
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize an aiString
-template <>
-inline
-size_t Write<aiString>(IOStream * stream, const aiString& s) {
-    const size_t s2 = (uint32_t)s.length;
-    stream->Write(&s,4,1);
-    stream->Write(s.data,s2,1);
-
-    return s2+4;
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize an unsigned int as uint32_t
-template <>
-inline
-size_t Write<unsigned int>(IOStream * stream, const unsigned int& w) {
-    const uint32_t t = (uint32_t)w;
-    if (w > t) {
-        // this shouldn't happen, integers in Assimp data structures never exceed 2^32
-        throw DeadlyExportError("loss of data due to 64 -> 32 bit integer conversion");
-    }
-
-    stream->Write(&t,4,1);
-
-    return 4;
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize an unsigned int as uint16_t
-template <>
-inline
-size_t Write<uint16_t>(IOStream * stream, const uint16_t& w) {
-    static_assert(sizeof(uint16_t)==2, "sizeof(uint16_t)==2");
-    stream->Write(&w,2,1);
-
-    return 2;
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize a float
-template <>
-inline
-size_t Write<float>(IOStream * stream, const float& f) {
-    static_assert(sizeof(float)==4, "sizeof(float)==4");
-    stream->Write(&f,4,1);
-
-    return 4;
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize a double
-template <>
-inline
-size_t Write<double>(IOStream * stream, const double& f) {
-    static_assert(sizeof(double)==8, "sizeof(double)==8");
-    stream->Write(&f,8,1);
-
-    return 8;
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize a vec3
-template <>
-inline
-size_t Write<aiVector3D>(IOStream * stream, const aiVector3D& v) {
-    size_t t = Write<float>(stream,v.x);
-    t += Write<float>(stream,v.y);
-    t += Write<float>(stream,v.z);
-
-    return t;
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize a color value
-template <>
-inline
-size_t Write<aiColor3D>(IOStream * stream, const aiColor3D& v) {
-    size_t t = Write<float>(stream,v.r);
-    t += Write<float>(stream,v.g);
-    t += Write<float>(stream,v.b);
-
-    return t;
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize a color value
-template <>
-inline
-size_t Write<aiColor4D>(IOStream * stream, const aiColor4D& v) {
-    size_t t = Write<float>(stream,v.r);
-    t += Write<float>(stream,v.g);
-    t += Write<float>(stream,v.b);
-    t += Write<float>(stream,v.a);
-
-    return t;
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize a quaternion
-template <>
-inline
-size_t Write<aiQuaternion>(IOStream * stream, const aiQuaternion& v) {
-    size_t t = Write<float>(stream,v.w);
-    t += Write<float>(stream,v.x);
-    t += Write<float>(stream,v.y);
-    t += Write<float>(stream,v.z);
-    ai_assert(t == 16);
-
-    return 16;
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize a vertex weight
-template <>
-inline
-size_t Write<aiVertexWeight>(IOStream * stream, const aiVertexWeight& v) {
-    size_t t = Write<unsigned int>(stream,v.mVertexId);
-
-    return t+Write<float>(stream,v.mWeight);
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize a mat4x4
-template <>
-inline
-size_t Write<aiMatrix4x4>(IOStream * stream, const aiMatrix4x4& m) {
-    for (unsigned int i = 0; i < 4;++i) {
-        for (unsigned int i2 = 0; i2 < 4;++i2) {
-            Write<float>(stream,m[i][i2]);
-        }
-    }
-
-    return 64;
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize an aiVectorKey
-template <>
-inline
-size_t Write<aiVectorKey>(IOStream * stream, const aiVectorKey& v) {
-    const size_t t = Write<double>(stream,v.mTime);
-    return t + Write<aiVector3D>(stream,v.mValue);
-}
-
-// -----------------------------------------------------------------------------------
-// Serialize an aiQuatKey
-template <>
-inline
-size_t Write<aiQuatKey>(IOStream * stream, const aiQuatKey& v) {
-    const size_t t = Write<double>(stream,v.mTime);
-    return t + Write<aiQuaternion>(stream,v.mValue);
-}
-
-template <typename T>
-inline
-size_t WriteBounds(IOStream * stream, const T* in, unsigned int size) {
-    T minc, maxc;
-    ArrayBounds(in,size,minc,maxc);
-
-    const size_t t = Write<T>(stream,minc);
-    return t + Write<T>(stream,maxc);
-}
-
-// We use this to write out non-byte arrays so that we write using the specializations.
-// This way we avoid writing out extra bytes that potentially come from struct alignment.
-template <typename T>
-inline
-size_t WriteArray(IOStream * stream, const T* in, unsigned int size) {
-    size_t n = 0;
-    for (unsigned int i=0; i<size; i++) n += Write<T>(stream,in[i]);
-
-    return n;
-}
-
-// ----------------------------------------------------------------------------------
-/** @class  AssbinChunkWriter
- *  @brief  Chunk writer mechanism for the .assbin file structure
- *
- *  This is a standard in-memory IOStream (most of the code is based on BlobIOStream),
- *  the difference being that this takes another IOStream as a "container" in the
- *  constructor, and when it is destroyed, it appends the magic number, the chunk size,
- *  and the chunk contents to the container stream. This allows relatively easy chunk
- *  chunk construction, even recursively.
- */
-class AssbinChunkWriter : public IOStream
-{
-private:
-
-    uint8_t* buffer;
-    uint32_t magic;
-    IOStream * container;
-    size_t cur_size, cursor, initial;
-
-private:
-    // -------------------------------------------------------------------
-    void Grow(size_t need = 0)
-    {
-        size_t new_size = std::max(initial, std::max( need, cur_size+(cur_size>>1) ));
-
-        const uint8_t* const old = buffer;
-        buffer = new uint8_t[new_size];
-
-        if (old) {
-            memcpy(buffer,old,cur_size);
-            delete[] old;
-        }
-
-        cur_size = new_size;
-    }
-
-public:
-
-    AssbinChunkWriter( IOStream * container, uint32_t magic, size_t initial = 4096)
-        : buffer(NULL), magic(magic), container(container), cur_size(0), cursor(0), initial(initial)
-    {
-    }
-
-    virtual ~AssbinChunkWriter()
-    {
-        if (container) {
-            container->Write( &magic, sizeof(uint32_t), 1 );
-            container->Write( &cursor, sizeof(uint32_t), 1 );
-            container->Write( buffer, 1, cursor );
-        }
-        if (buffer) delete[] buffer;
-    }
-
-    void * GetBufferPointer() { return buffer; }
-
-    // -------------------------------------------------------------------
-    virtual size_t Read(void* /*pvBuffer*/, size_t /*pSize*/, size_t /*pCount*/) {
-        return 0;
-    }
-    virtual aiReturn Seek(size_t /*pOffset*/, aiOrigin /*pOrigin*/) {
-        return aiReturn_FAILURE;
-    }
-    virtual size_t Tell() const {
-        return cursor;
-    }
-    virtual void Flush() {
-        // not implemented
-    }
-
-    virtual size_t FileSize() const {
-        return cursor;
-    }
-
-    // -------------------------------------------------------------------
-    virtual size_t Write(const void* pvBuffer, size_t pSize, size_t pCount) {
-        pSize *= pCount;
-        if (cursor + pSize > cur_size) {
-            Grow(cursor + pSize);
-        }
-
-        memcpy(buffer+cursor, pvBuffer, pSize);
-        cursor += pSize;
-
-        return pCount;
-    }
-
-};
-
-// ----------------------------------------------------------------------------------
-/** @class  AssbinExport
- *  @brief  Assbin exporter class
- *
- *  This class performs the .assbin exporting, and is responsible for the file layout.
- */
-class AssbinExport
-{
-private:
-    bool shortened;
-    bool compressed;
-
-protected:
-    // -----------------------------------------------------------------------------------
-    void WriteBinaryNode( IOStream * container, const aiNode* node)
-    {
-        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODE );
-
-        unsigned int nb_metadata = (node->mMetaData != NULL ? node->mMetaData->mNumProperties : 0);
-
-        Write<aiString>(&chunk,node->mName);
-        Write<aiMatrix4x4>(&chunk,node->mTransformation);
-        Write<unsigned int>(&chunk,node->mNumChildren);
-        Write<unsigned int>(&chunk,node->mNumMeshes);
-        Write<unsigned int>(&chunk,nb_metadata);
-
-        for (unsigned int i = 0; i < node->mNumMeshes;++i) {
-            Write<unsigned int>(&chunk,node->mMeshes[i]);
-        }
-
-        for (unsigned int i = 0; i < node->mNumChildren;++i) {
-            WriteBinaryNode( &chunk, node->mChildren[i] );
-        }
-
-        for (unsigned int i = 0; i < nb_metadata; ++i) {
-            const aiString& key = node->mMetaData->mKeys[i];
-            aiMetadataType type = node->mMetaData->mValues[i].mType;
-            void* value = node->mMetaData->mValues[i].mData;
-
-            Write<aiString>(&chunk, key);
-            Write<uint16_t>(&chunk, type);
-
-            switch (type) {
-                case AI_BOOL:
-                    Write<bool>(&chunk, *((bool*) value));
-                    break;
-                case AI_INT32:
-                    Write<int32_t>(&chunk, *((int32_t*) value));
-                    break;
-                case AI_UINT64:
-                    Write<uint64_t>(&chunk, *((uint64_t*) value));
-                    break;
-                case AI_FLOAT:
-                    Write<float>(&chunk, *((float*) value));
-                    break;
-                case AI_DOUBLE:
-                    Write<double>(&chunk, *((double*) value));
-                    break;
-                case AI_AISTRING:
-                    Write<aiString>(&chunk, *((aiString*) value));
-                    break;
-                case AI_AIVECTOR3D:
-                    Write<aiVector3D>(&chunk, *((aiVector3D*) value));
-                    break;
-#ifdef SWIG
-                case FORCE_32BIT:
-#endif // SWIG
-                default:
-                    break;
-            }
-        }
-    }
-
-    // -----------------------------------------------------------------------------------
-    void WriteBinaryTexture(IOStream * container, const aiTexture* tex)
-    {
-        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AITEXTURE );
-
-        Write<unsigned int>(&chunk,tex->mWidth);
-        Write<unsigned int>(&chunk,tex->mHeight);
-        chunk.Write( tex->achFormatHint, sizeof(char), 4 );
-
-        if(!shortened) {
-            if (!tex->mHeight) {
-                chunk.Write(tex->pcData,1,tex->mWidth);
-            }
-            else {
-                chunk.Write(tex->pcData,1,tex->mWidth*tex->mHeight*4);
-            }
-        }
-
-    }
-
-    // -----------------------------------------------------------------------------------
-    void WriteBinaryBone(IOStream * container, const aiBone* b)
-    {
-        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIBONE );
-
-        Write<aiString>(&chunk,b->mName);
-        Write<unsigned int>(&chunk,b->mNumWeights);
-        Write<aiMatrix4x4>(&chunk,b->mOffsetMatrix);
-
-        // for the moment we write dumb min/max values for the bones, too.
-        // maybe I'll add a better, hash-like solution later
-        if (shortened) {
-            WriteBounds(&chunk,b->mWeights,b->mNumWeights);
-        } // else write as usual
-        else WriteArray<aiVertexWeight>(&chunk,b->mWeights,b->mNumWeights);
-    }
-
-    // -----------------------------------------------------------------------------------
-    void WriteBinaryMesh(IOStream * container, const aiMesh* mesh)
-    {
-        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMESH );
-
-        Write<unsigned int>(&chunk,mesh->mPrimitiveTypes);
-        Write<unsigned int>(&chunk,mesh->mNumVertices);
-        Write<unsigned int>(&chunk,mesh->mNumFaces);
-        Write<unsigned int>(&chunk,mesh->mNumBones);
-        Write<unsigned int>(&chunk,mesh->mMaterialIndex);
-
-        // first of all, write bits for all existent vertex components
-        unsigned int c = 0;
-        if (mesh->mVertices) {
-            c |= ASSBIN_MESH_HAS_POSITIONS;
-        }
-        if (mesh->mNormals) {
-            c |= ASSBIN_MESH_HAS_NORMALS;
-        }
-        if (mesh->mTangents && mesh->mBitangents) {
-            c |= ASSBIN_MESH_HAS_TANGENTS_AND_BITANGENTS;
-        }
-        for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
-            if (!mesh->mTextureCoords[n]) {
-                break;
-            }
-            c |= ASSBIN_MESH_HAS_TEXCOORD(n);
-        }
-        for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) {
-            if (!mesh->mColors[n]) {
-                break;
-            }
-            c |= ASSBIN_MESH_HAS_COLOR(n);
-        }
-        Write<unsigned int>(&chunk,c);
-
-        aiVector3D minVec, maxVec;
-        if (mesh->mVertices) {
-            if (shortened) {
-                WriteBounds(&chunk,mesh->mVertices,mesh->mNumVertices);
-            } // else write as usual
-            else WriteArray<aiVector3D>(&chunk,mesh->mVertices,mesh->mNumVertices);
-        }
-        if (mesh->mNormals) {
-            if (shortened) {
-                WriteBounds(&chunk,mesh->mNormals,mesh->mNumVertices);
-            } // else write as usual
-            else WriteArray<aiVector3D>(&chunk,mesh->mNormals,mesh->mNumVertices);
-        }
-        if (mesh->mTangents && mesh->mBitangents) {
-            if (shortened) {
-                WriteBounds(&chunk,mesh->mTangents,mesh->mNumVertices);
-                WriteBounds(&chunk,mesh->mBitangents,mesh->mNumVertices);
-            } // else write as usual
-            else {
-                WriteArray<aiVector3D>(&chunk,mesh->mTangents,mesh->mNumVertices);
-                WriteArray<aiVector3D>(&chunk,mesh->mBitangents,mesh->mNumVertices);
-            }
-        }
-        for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) {
-            if (!mesh->mColors[n])
-                break;
-
-            if (shortened) {
-                WriteBounds(&chunk,mesh->mColors[n],mesh->mNumVertices);
-            } // else write as usual
-            else WriteArray<aiColor4D>(&chunk,mesh->mColors[n],mesh->mNumVertices);
-        }
-        for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
-            if (!mesh->mTextureCoords[n])
-                break;
-
-            // write number of UV components
-            Write<unsigned int>(&chunk,mesh->mNumUVComponents[n]);
-
-            if (shortened) {
-                WriteBounds(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices);
-            } // else write as usual
-            else WriteArray<aiVector3D>(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices);
-        }
-
-        // write faces. There are no floating-point calculations involved
-        // in these, so we can write a simple hash over the face data
-        // to the dump file. We generate a single 32 Bit hash for 512 faces
-        // using Assimp's standard hashing function.
-        if (shortened) {
-            unsigned int processed = 0;
-            for (unsigned int job;(job = std::min(mesh->mNumFaces-processed,512u));processed += job) {
-
-                uint32_t hash = 0;
-                for (unsigned int a = 0; a < job;++a) {
-
-                    const aiFace& f = mesh->mFaces[processed+a];
-                    uint32_t tmp = f.mNumIndices;
-                    hash = SuperFastHash(reinterpret_cast<const char*>(&tmp),sizeof tmp,hash);
-                    for (unsigned int i = 0; i < f.mNumIndices; ++i) {
-                        static_assert(AI_MAX_VERTICES <= 0xffffffff, "AI_MAX_VERTICES <= 0xffffffff");
-                        tmp = static_cast<uint32_t>( f.mIndices[i] );
-                        hash = SuperFastHash(reinterpret_cast<const char*>(&tmp),sizeof tmp,hash);
-                    }
-                }
-                Write<unsigned int>(&chunk,hash);
-            }
-        }
-        else // else write as usual
-        {
-            // if there are less than 2^16 vertices, we can simply use 16 bit integers ...
-            for (unsigned int i = 0; i < mesh->mNumFaces;++i) {
-                const aiFace& f = mesh->mFaces[i];
-
-                static_assert(AI_MAX_FACE_INDICES <= 0xffff, "AI_MAX_FACE_INDICES <= 0xffff");
-                Write<uint16_t>(&chunk,f.mNumIndices);
-
-                for (unsigned int a = 0; a < f.mNumIndices;++a) {
-                    if (mesh->mNumVertices < (1u<<16)) {
-                        Write<uint16_t>(&chunk,f.mIndices[a]);
-                    }
-                    else Write<unsigned int>(&chunk,f.mIndices[a]);
-                }
-            }
-        }
-
-        // write bones
-        if (mesh->mNumBones) {
-            for (unsigned int a = 0; a < mesh->mNumBones;++a) {
-                const aiBone* b = mesh->mBones[a];
-                WriteBinaryBone(&chunk,b);
-            }
-        }
-    }
-
-    // -----------------------------------------------------------------------------------
-    void WriteBinaryMaterialProperty(IOStream * container, const aiMaterialProperty* prop)
-    {
-        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMATERIALPROPERTY );
-
-        Write<aiString>(&chunk,prop->mKey);
-        Write<unsigned int>(&chunk,prop->mSemantic);
-        Write<unsigned int>(&chunk,prop->mIndex);
-
-        Write<unsigned int>(&chunk,prop->mDataLength);
-        Write<unsigned int>(&chunk,(unsigned int)prop->mType);
-        chunk.Write(prop->mData,1,prop->mDataLength);
-    }
-
-    // -----------------------------------------------------------------------------------
-    void WriteBinaryMaterial(IOStream * container, const aiMaterial* mat)
-    {
-        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMATERIAL);
-
-        Write<unsigned int>(&chunk,mat->mNumProperties);
-        for (unsigned int i = 0; i < mat->mNumProperties;++i) {
-            WriteBinaryMaterialProperty( &chunk, mat->mProperties[i]);
-        }
-    }
-
-    // -----------------------------------------------------------------------------------
-    void WriteBinaryNodeAnim(IOStream * container, const aiNodeAnim* nd)
-    {
-        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODEANIM );
-
-        Write<aiString>(&chunk,nd->mNodeName);
-        Write<unsigned int>(&chunk,nd->mNumPositionKeys);
-        Write<unsigned int>(&chunk,nd->mNumRotationKeys);
-        Write<unsigned int>(&chunk,nd->mNumScalingKeys);
-        Write<unsigned int>(&chunk,nd->mPreState);
-        Write<unsigned int>(&chunk,nd->mPostState);
-
-        if (nd->mPositionKeys) {
-            if (shortened) {
-                WriteBounds(&chunk,nd->mPositionKeys,nd->mNumPositionKeys);
-
-            } // else write as usual
-            else WriteArray<aiVectorKey>(&chunk,nd->mPositionKeys,nd->mNumPositionKeys);
-        }
-        if (nd->mRotationKeys) {
-            if (shortened) {
-                WriteBounds(&chunk,nd->mRotationKeys,nd->mNumRotationKeys);
-
-            } // else write as usual
-            else WriteArray<aiQuatKey>(&chunk,nd->mRotationKeys,nd->mNumRotationKeys);
-        }
-        if (nd->mScalingKeys) {
-            if (shortened) {
-                WriteBounds(&chunk,nd->mScalingKeys,nd->mNumScalingKeys);
-
-            } // else write as usual
-            else WriteArray<aiVectorKey>(&chunk,nd->mScalingKeys,nd->mNumScalingKeys);
-        }
-    }
-
-
-    // -----------------------------------------------------------------------------------
-    void WriteBinaryAnim( IOStream * container, const aiAnimation* anim )
-    {
-        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIANIMATION );
-
-        Write<aiString>(&chunk,anim->mName);
-        Write<double>(&chunk,anim->mDuration);
-        Write<double>(&chunk,anim->mTicksPerSecond);
-        Write<unsigned int>(&chunk,anim->mNumChannels);
-
-        for (unsigned int a = 0; a < anim->mNumChannels;++a) {
-            const aiNodeAnim* nd = anim->mChannels[a];
-            WriteBinaryNodeAnim(&chunk,nd);
-        }
-    }
-
-    // -----------------------------------------------------------------------------------
-    void WriteBinaryLight( IOStream * container, const aiLight* l )
-    {
-        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AILIGHT );
-
-        Write<aiString>(&chunk,l->mName);
-        Write<unsigned int>(&chunk,l->mType);
-
-        if (l->mType != aiLightSource_DIRECTIONAL) {
-            Write<float>(&chunk,l->mAttenuationConstant);
-            Write<float>(&chunk,l->mAttenuationLinear);
-            Write<float>(&chunk,l->mAttenuationQuadratic);
-        }
-
-        Write<aiColor3D>(&chunk,l->mColorDiffuse);
-        Write<aiColor3D>(&chunk,l->mColorSpecular);
-        Write<aiColor3D>(&chunk,l->mColorAmbient);
-
-        if (l->mType == aiLightSource_SPOT) {
-            Write<float>(&chunk,l->mAngleInnerCone);
-            Write<float>(&chunk,l->mAngleOuterCone);
-        }
-
-    }
-
-    // -----------------------------------------------------------------------------------
-    void WriteBinaryCamera( IOStream * container, const aiCamera* cam )
-    {
-        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AICAMERA );
-
-        Write<aiString>(&chunk,cam->mName);
-        Write<aiVector3D>(&chunk,cam->mPosition);
-        Write<aiVector3D>(&chunk,cam->mLookAt);
-        Write<aiVector3D>(&chunk,cam->mUp);
-        Write<float>(&chunk,cam->mHorizontalFOV);
-        Write<float>(&chunk,cam->mClipPlaneNear);
-        Write<float>(&chunk,cam->mClipPlaneFar);
-        Write<float>(&chunk,cam->mAspect);
-    }
-
-    // -----------------------------------------------------------------------------------
-    void WriteBinaryScene( IOStream * container, const aiScene* scene)
-    {
-        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AISCENE );
-
-        // basic scene information
-        Write<unsigned int>(&chunk,scene->mFlags);
-        Write<unsigned int>(&chunk,scene->mNumMeshes);
-        Write<unsigned int>(&chunk,scene->mNumMaterials);
-        Write<unsigned int>(&chunk,scene->mNumAnimations);
-        Write<unsigned int>(&chunk,scene->mNumTextures);
-        Write<unsigned int>(&chunk,scene->mNumLights);
-        Write<unsigned int>(&chunk,scene->mNumCameras);
-
-        // write node graph
-        WriteBinaryNode( &chunk, scene->mRootNode );
-
-        // write all meshes
-        for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
-            const aiMesh* mesh = scene->mMeshes[i];
-            WriteBinaryMesh( &chunk,mesh);
-        }
-
-        // write materials
-        for (unsigned int i = 0; i< scene->mNumMaterials; ++i) {
-            const aiMaterial* mat = scene->mMaterials[i];
-            WriteBinaryMaterial(&chunk,mat);
-        }
-
-        // write all animations
-        for (unsigned int i = 0; i < scene->mNumAnimations;++i) {
-            const aiAnimation* anim = scene->mAnimations[i];
-            WriteBinaryAnim(&chunk,anim);
-        }
-
-
-        // write all textures
-        for (unsigned int i = 0; i < scene->mNumTextures;++i) {
-            const aiTexture* mesh = scene->mTextures[i];
-            WriteBinaryTexture(&chunk,mesh);
-        }
-
-        // write lights
-        for (unsigned int i = 0; i < scene->mNumLights;++i) {
-            const aiLight* l = scene->mLights[i];
-            WriteBinaryLight(&chunk,l);
-        }
-
-        // write cameras
-        for (unsigned int i = 0; i < scene->mNumCameras;++i) {
-            const aiCamera* cam = scene->mCameras[i];
-            WriteBinaryCamera(&chunk,cam);
-        }
-
-    }
-
-public:
-    AssbinExport()
-        : shortened(false), compressed(false) // temporary settings until properties are introduced for exporters
-    {
-    }
-
-    // -----------------------------------------------------------------------------------
-    // Write a binary model dump
-    void WriteBinaryDump(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene)
-    {
-        IOStream * out = pIOSystem->Open( pFile, "wb" );
-        if (!out) return;
-
-        time_t tt = time(NULL);
-#if _WIN32
-        tm* p     = gmtime(&tt);
-#else
-        struct tm now;
-        tm* p = gmtime_r(&tt, &now);
-#endif
-
-        // header
-        char s[64];
-        memset( s, 0, 64 );
-#if _MSC_VER >= 1400
-        sprintf_s(s,"ASSIMP.binary-dump.%s",asctime(p));
-#else
-        ai_snprintf(s,64,"ASSIMP.binary-dump.%s",asctime(p));
-#endif
-        out->Write( s, 44, 1 );
-        // == 44 bytes
-
-        Write<unsigned int>( out, ASSBIN_VERSION_MAJOR );
-        Write<unsigned int>( out, ASSBIN_VERSION_MINOR );
-        Write<unsigned int>( out, aiGetVersionRevision() );
-        Write<unsigned int>( out, aiGetCompileFlags() );
-        Write<uint16_t>( out, shortened );
-        Write<uint16_t>( out, compressed );
-        // ==  20 bytes
-
-        char buff[256];
-        strncpy(buff,pFile,256);
-        out->Write(buff,sizeof(char),256);
-
-        char cmd[] = "\0";
-        strncpy(buff,cmd,128);
-        out->Write(buff,sizeof(char),128);
-
-        // leave 64 bytes free for future extensions
-        memset(buff,0xcd,64);
-        out->Write(buff,sizeof(char),64);
-        // == 435 bytes
-
-        // ==== total header size: 512 bytes
-        ai_assert( out->Tell() == ASSBIN_HEADER_LENGTH );
-
-        // Up to here the data is uncompressed. For compressed files, the rest
-        // is compressed using standard DEFLATE from zlib.
-        if (compressed)
-        {
-            AssbinChunkWriter uncompressedStream( NULL, 0 );
-            WriteBinaryScene( &uncompressedStream, pScene );
-
-            uLongf uncompressedSize = static_cast<uLongf>(uncompressedStream.Tell());
-            uLongf compressedSize = (uLongf)compressBound(uncompressedSize);
-            uint8_t* compressedBuffer = new uint8_t[ compressedSize ];
-
-            int res = compress2( compressedBuffer, &compressedSize, (const Bytef*)uncompressedStream.GetBufferPointer(), uncompressedSize, 9 );
-            if(res != Z_OK)
-            {
-                delete [] compressedBuffer;
-                pIOSystem->Close(out);
-                throw DeadlyExportError("Compression failed.");
-            }
-
-            out->Write( &uncompressedSize, sizeof(uint32_t), 1 );
-            out->Write( compressedBuffer, sizeof(char), compressedSize );
-
-            delete[] compressedBuffer;
-        }
-        else
-        {
-            WriteBinaryScene( out, pScene );
-        }
-
-        pIOSystem->Close( out );
-    }
-};
-
 void ExportSceneAssbin(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/) {
 void ExportSceneAssbin(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/) {
-    AssbinExport exporter;
-    exporter.WriteBinaryDump( pFile, pIOSystem, pScene );
+    DumpSceneToAssbin(
+        pFile,
+        "\0", // no command(s).
+        pIOSystem,
+        pScene,
+        false, // shortened?
+        false); // compressed?
 }
 }
 } // end of namespace Assimp
 } // end of namespace Assimp
 
 

+ 1 - 1
code/Assbin/AssbinExporter.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 858 - 0
code/Assbin/AssbinFileWriter.cpp

@@ -0,0 +1,858 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2020, assimp team
+
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+/** @file  AssbinFileWriter.cpp
+ *  @brief Implementation of Assbin file writer.
+ */
+
+#include "AssbinFileWriter.h"
+
+#include "Common/assbin_chunks.h"
+#include "PostProcessing/ProcessHelper.h"
+
+#include <assimp/version.h>
+#include <assimp/IOStream.hpp>
+#include <assimp/Exporter.hpp>
+#include <assimp/Exceptional.h>
+
+#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
+#   include <zlib.h>
+#else
+#   include "../contrib/zlib/zlib.h"
+#endif
+
+#include <time.h>
+
+namespace Assimp {
+
+template <typename T>
+size_t Write(IOStream * stream, const T& v) {
+    return stream->Write( &v, sizeof(T), 1 );
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize an aiString
+template <>
+inline
+size_t Write<aiString>(IOStream * stream, const aiString& s) {
+    const size_t s2 = (uint32_t)s.length;
+    stream->Write(&s,4,1);
+    stream->Write(s.data,s2,1);
+
+    return s2+4;
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize an unsigned int as uint32_t
+template <>
+inline
+size_t Write<unsigned int>(IOStream * stream, const unsigned int& w) {
+    const uint32_t t = (uint32_t)w;
+    if (w > t) {
+        // this shouldn't happen, integers in Assimp data structures never exceed 2^32
+        throw DeadlyExportError("loss of data due to 64 -> 32 bit integer conversion");
+    }
+
+    stream->Write(&t,4,1);
+
+    return 4;
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize an unsigned int as uint16_t
+template <>
+inline
+size_t Write<uint16_t>(IOStream * stream, const uint16_t& w) {
+    static_assert(sizeof(uint16_t)==2, "sizeof(uint16_t)==2");
+    stream->Write(&w,2,1);
+
+    return 2;
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize a float
+template <>
+inline
+size_t Write<float>(IOStream * stream, const float& f) {
+    static_assert(sizeof(float)==4, "sizeof(float)==4");
+    stream->Write(&f,4,1);
+
+    return 4;
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize a double
+template <>
+inline
+size_t Write<double>(IOStream * stream, const double& f) {
+    static_assert(sizeof(double)==8, "sizeof(double)==8");
+    stream->Write(&f,8,1);
+
+    return 8;
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize a vec3
+template <>
+inline
+size_t Write<aiVector3D>(IOStream * stream, const aiVector3D& v) {
+    size_t t = Write<float>(stream,v.x);
+    t += Write<float>(stream,v.y);
+    t += Write<float>(stream,v.z);
+
+    return t;
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize a color value
+template <>
+inline
+size_t Write<aiColor3D>(IOStream * stream, const aiColor3D& v) {
+    size_t t = Write<float>(stream,v.r);
+    t += Write<float>(stream,v.g);
+    t += Write<float>(stream,v.b);
+
+    return t;
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize a color value
+template <>
+inline
+size_t Write<aiColor4D>(IOStream * stream, const aiColor4D& v) {
+    size_t t = Write<float>(stream,v.r);
+    t += Write<float>(stream,v.g);
+    t += Write<float>(stream,v.b);
+    t += Write<float>(stream,v.a);
+
+    return t;
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize a quaternion
+template <>
+inline
+size_t Write<aiQuaternion>(IOStream * stream, const aiQuaternion& v) {
+    size_t t = Write<float>(stream,v.w);
+    t += Write<float>(stream,v.x);
+    t += Write<float>(stream,v.y);
+    t += Write<float>(stream,v.z);
+    ai_assert(t == 16);
+
+    return 16;
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize a vertex weight
+template <>
+inline
+size_t Write<aiVertexWeight>(IOStream * stream, const aiVertexWeight& v) {
+    size_t t = Write<unsigned int>(stream,v.mVertexId);
+
+    return t+Write<float>(stream,v.mWeight);
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize a mat4x4
+template <>
+inline
+size_t Write<aiMatrix4x4>(IOStream * stream, const aiMatrix4x4& m) {
+    for (unsigned int i = 0; i < 4;++i) {
+        for (unsigned int i2 = 0; i2 < 4;++i2) {
+            Write<float>(stream,m[i][i2]);
+        }
+    }
+
+    return 64;
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize an aiVectorKey
+template <>
+inline
+size_t Write<aiVectorKey>(IOStream * stream, const aiVectorKey& v) {
+    const size_t t = Write<double>(stream,v.mTime);
+    return t + Write<aiVector3D>(stream,v.mValue);
+}
+
+// -----------------------------------------------------------------------------------
+// Serialize an aiQuatKey
+template <>
+inline
+size_t Write<aiQuatKey>(IOStream * stream, const aiQuatKey& v) {
+    const size_t t = Write<double>(stream,v.mTime);
+    return t + Write<aiQuaternion>(stream,v.mValue);
+}
+
+template <typename T>
+inline
+size_t WriteBounds(IOStream * stream, const T* in, unsigned int size) {
+    T minc, maxc;
+    ArrayBounds(in,size,minc,maxc);
+
+    const size_t t = Write<T>(stream,minc);
+    return t + Write<T>(stream,maxc);
+}
+
+// We use this to write out non-byte arrays so that we write using the specializations.
+// This way we avoid writing out extra bytes that potentially come from struct alignment.
+template <typename T>
+inline
+size_t WriteArray(IOStream * stream, const T* in, unsigned int size) {
+    size_t n = 0;
+    for (unsigned int i=0; i<size; i++) n += Write<T>(stream,in[i]);
+
+    return n;
+}
+
+// ----------------------------------------------------------------------------------
+/** @class  AssbinChunkWriter
+ *  @brief  Chunk writer mechanism for the .assbin file structure
+ *
+ *  This is a standard in-memory IOStream (most of the code is based on BlobIOStream),
+ *  the difference being that this takes another IOStream as a "container" in the
+ *  constructor, and when it is destroyed, it appends the magic number, the chunk size,
+ *  and the chunk contents to the container stream. This allows relatively easy chunk
+ *  chunk construction, even recursively.
+ */
+class AssbinChunkWriter : public IOStream
+{
+private:
+
+    uint8_t* buffer;
+    uint32_t magic;
+    IOStream * container;
+    size_t cur_size, cursor, initial;
+
+private:
+    // -------------------------------------------------------------------
+    void Grow(size_t need = 0)
+    {
+        size_t new_size = std::max(initial, std::max( need, cur_size+(cur_size>>1) ));
+
+        const uint8_t* const old = buffer;
+        buffer = new uint8_t[new_size];
+
+        if (old) {
+            memcpy(buffer,old,cur_size);
+            delete[] old;
+        }
+
+        cur_size = new_size;
+    }
+
+public:
+
+    AssbinChunkWriter( IOStream * container, uint32_t magic, size_t initial = 4096)
+        : buffer(NULL), magic(magic), container(container), cur_size(0), cursor(0), initial(initial)
+    {
+    }
+
+    virtual ~AssbinChunkWriter()
+    {
+        if (container) {
+            container->Write( &magic, sizeof(uint32_t), 1 );
+            container->Write( &cursor, sizeof(uint32_t), 1 );
+            container->Write( buffer, 1, cursor );
+        }
+        if (buffer) delete[] buffer;
+    }
+
+    void * GetBufferPointer() { return buffer; }
+
+    // -------------------------------------------------------------------
+    virtual size_t Read(void* /*pvBuffer*/, size_t /*pSize*/, size_t /*pCount*/) {
+        return 0;
+    }
+    virtual aiReturn Seek(size_t /*pOffset*/, aiOrigin /*pOrigin*/) {
+        return aiReturn_FAILURE;
+    }
+    virtual size_t Tell() const {
+        return cursor;
+    }
+    virtual void Flush() {
+        // not implemented
+    }
+
+    virtual size_t FileSize() const {
+        return cursor;
+    }
+
+    // -------------------------------------------------------------------
+    virtual size_t Write(const void* pvBuffer, size_t pSize, size_t pCount) {
+        pSize *= pCount;
+        if (cursor + pSize > cur_size) {
+            Grow(cursor + pSize);
+        }
+
+        memcpy(buffer+cursor, pvBuffer, pSize);
+        cursor += pSize;
+
+        return pCount;
+    }
+
+};
+
+// ----------------------------------------------------------------------------------
+/** @class  AssbinFileWriter
+ *  @brief  Assbin file writer class
+ *
+ *  This class writes an .assbin file, and is responsible for the file layout.
+ */
+class AssbinFileWriter
+{
+private:
+    bool shortened;
+    bool compressed;
+
+protected:
+    // -----------------------------------------------------------------------------------
+    void WriteBinaryNode( IOStream * container, const aiNode* node)
+    {
+        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODE );
+
+        unsigned int nb_metadata = (node->mMetaData != NULL ? node->mMetaData->mNumProperties : 0);
+
+        Write<aiString>(&chunk,node->mName);
+        Write<aiMatrix4x4>(&chunk,node->mTransformation);
+        Write<unsigned int>(&chunk,node->mNumChildren);
+        Write<unsigned int>(&chunk,node->mNumMeshes);
+        Write<unsigned int>(&chunk,nb_metadata);
+
+        for (unsigned int i = 0; i < node->mNumMeshes;++i) {
+            Write<unsigned int>(&chunk,node->mMeshes[i]);
+        }
+
+        for (unsigned int i = 0; i < node->mNumChildren;++i) {
+            WriteBinaryNode( &chunk, node->mChildren[i] );
+        }
+
+        for (unsigned int i = 0; i < nb_metadata; ++i) {
+            const aiString& key = node->mMetaData->mKeys[i];
+            aiMetadataType type = node->mMetaData->mValues[i].mType;
+            void* value = node->mMetaData->mValues[i].mData;
+
+            Write<aiString>(&chunk, key);
+            Write<uint16_t>(&chunk, type);
+
+            switch (type) {
+                case AI_BOOL:
+                    Write<bool>(&chunk, *((bool*) value));
+                    break;
+                case AI_INT32:
+                    Write<int32_t>(&chunk, *((int32_t*) value));
+                    break;
+                case AI_UINT64:
+                    Write<uint64_t>(&chunk, *((uint64_t*) value));
+                    break;
+                case AI_FLOAT:
+                    Write<float>(&chunk, *((float*) value));
+                    break;
+                case AI_DOUBLE:
+                    Write<double>(&chunk, *((double*) value));
+                    break;
+                case AI_AISTRING:
+                    Write<aiString>(&chunk, *((aiString*) value));
+                    break;
+                case AI_AIVECTOR3D:
+                    Write<aiVector3D>(&chunk, *((aiVector3D*) value));
+                    break;
+#ifdef SWIG
+                case FORCE_32BIT:
+#endif // SWIG
+                default:
+                    break;
+            }
+        }
+    }
+
+    // -----------------------------------------------------------------------------------
+    void WriteBinaryTexture(IOStream * container, const aiTexture* tex)
+    {
+        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AITEXTURE );
+
+        Write<unsigned int>(&chunk,tex->mWidth);
+        Write<unsigned int>(&chunk,tex->mHeight);
+        // Write the texture format, but don't include the null terminator.
+        chunk.Write( tex->achFormatHint, sizeof(char), HINTMAXTEXTURELEN - 1 );
+
+        if(!shortened) {
+            if (!tex->mHeight) {
+                chunk.Write(tex->pcData,1,tex->mWidth);
+            }
+            else {
+                chunk.Write(tex->pcData,1,tex->mWidth*tex->mHeight*4);
+            }
+        }
+
+    }
+
+    // -----------------------------------------------------------------------------------
+    void WriteBinaryBone(IOStream * container, const aiBone* b)
+    {
+        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIBONE );
+
+        Write<aiString>(&chunk,b->mName);
+        Write<unsigned int>(&chunk,b->mNumWeights);
+        Write<aiMatrix4x4>(&chunk,b->mOffsetMatrix);
+
+        // for the moment we write dumb min/max values for the bones, too.
+        // maybe I'll add a better, hash-like solution later
+        if (shortened) {
+            WriteBounds(&chunk,b->mWeights,b->mNumWeights);
+        } // else write as usual
+        else WriteArray<aiVertexWeight>(&chunk,b->mWeights,b->mNumWeights);
+    }
+
+    // -----------------------------------------------------------------------------------
+    void WriteBinaryMesh(IOStream * container, const aiMesh* mesh)
+    {
+        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMESH );
+
+        Write<unsigned int>(&chunk,mesh->mPrimitiveTypes);
+        Write<unsigned int>(&chunk,mesh->mNumVertices);
+        Write<unsigned int>(&chunk,mesh->mNumFaces);
+        Write<unsigned int>(&chunk,mesh->mNumBones);
+        Write<unsigned int>(&chunk,mesh->mMaterialIndex);
+
+        // first of all, write bits for all existent vertex components
+        unsigned int c = 0;
+        if (mesh->mVertices) {
+            c |= ASSBIN_MESH_HAS_POSITIONS;
+        }
+        if (mesh->mNormals) {
+            c |= ASSBIN_MESH_HAS_NORMALS;
+        }
+        if (mesh->mTangents && mesh->mBitangents) {
+            c |= ASSBIN_MESH_HAS_TANGENTS_AND_BITANGENTS;
+        }
+        for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
+            if (!mesh->mTextureCoords[n]) {
+                break;
+            }
+            c |= ASSBIN_MESH_HAS_TEXCOORD(n);
+        }
+        for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) {
+            if (!mesh->mColors[n]) {
+                break;
+            }
+            c |= ASSBIN_MESH_HAS_COLOR(n);
+        }
+        Write<unsigned int>(&chunk,c);
+
+        aiVector3D minVec, maxVec;
+        if (mesh->mVertices) {
+            if (shortened) {
+                WriteBounds(&chunk,mesh->mVertices,mesh->mNumVertices);
+            } // else write as usual
+            else WriteArray<aiVector3D>(&chunk,mesh->mVertices,mesh->mNumVertices);
+        }
+        if (mesh->mNormals) {
+            if (shortened) {
+                WriteBounds(&chunk,mesh->mNormals,mesh->mNumVertices);
+            } // else write as usual
+            else WriteArray<aiVector3D>(&chunk,mesh->mNormals,mesh->mNumVertices);
+        }
+        if (mesh->mTangents && mesh->mBitangents) {
+            if (shortened) {
+                WriteBounds(&chunk,mesh->mTangents,mesh->mNumVertices);
+                WriteBounds(&chunk,mesh->mBitangents,mesh->mNumVertices);
+            } // else write as usual
+            else {
+                WriteArray<aiVector3D>(&chunk,mesh->mTangents,mesh->mNumVertices);
+                WriteArray<aiVector3D>(&chunk,mesh->mBitangents,mesh->mNumVertices);
+            }
+        }
+        for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) {
+            if (!mesh->mColors[n])
+                break;
+
+            if (shortened) {
+                WriteBounds(&chunk,mesh->mColors[n],mesh->mNumVertices);
+            } // else write as usual
+            else WriteArray<aiColor4D>(&chunk,mesh->mColors[n],mesh->mNumVertices);
+        }
+        for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
+            if (!mesh->mTextureCoords[n])
+                break;
+
+            // write number of UV components
+            Write<unsigned int>(&chunk,mesh->mNumUVComponents[n]);
+
+            if (shortened) {
+                WriteBounds(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices);
+            } // else write as usual
+            else WriteArray<aiVector3D>(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices);
+        }
+
+        // write faces. There are no floating-point calculations involved
+        // in these, so we can write a simple hash over the face data
+        // to the dump file. We generate a single 32 Bit hash for 512 faces
+        // using Assimp's standard hashing function.
+        if (shortened) {
+            unsigned int processed = 0;
+            for (unsigned int job;(job = std::min(mesh->mNumFaces-processed,512u));processed += job) {
+
+                uint32_t hash = 0;
+                for (unsigned int a = 0; a < job;++a) {
+
+                    const aiFace& f = mesh->mFaces[processed+a];
+                    uint32_t tmp = f.mNumIndices;
+                    hash = SuperFastHash(reinterpret_cast<const char*>(&tmp),sizeof tmp,hash);
+                    for (unsigned int i = 0; i < f.mNumIndices; ++i) {
+                        static_assert(AI_MAX_VERTICES <= 0xffffffff, "AI_MAX_VERTICES <= 0xffffffff");
+                        tmp = static_cast<uint32_t>( f.mIndices[i] );
+                        hash = SuperFastHash(reinterpret_cast<const char*>(&tmp),sizeof tmp,hash);
+                    }
+                }
+                Write<unsigned int>(&chunk,hash);
+            }
+        }
+        else // else write as usual
+        {
+            // if there are less than 2^16 vertices, we can simply use 16 bit integers ...
+            for (unsigned int i = 0; i < mesh->mNumFaces;++i) {
+                const aiFace& f = mesh->mFaces[i];
+
+                static_assert(AI_MAX_FACE_INDICES <= 0xffff, "AI_MAX_FACE_INDICES <= 0xffff");
+                Write<uint16_t>(&chunk,f.mNumIndices);
+
+                for (unsigned int a = 0; a < f.mNumIndices;++a) {
+                    if (mesh->mNumVertices < (1u<<16)) {
+                        Write<uint16_t>(&chunk,f.mIndices[a]);
+                    }
+                    else Write<unsigned int>(&chunk,f.mIndices[a]);
+                }
+            }
+        }
+
+        // write bones
+        if (mesh->mNumBones) {
+            for (unsigned int a = 0; a < mesh->mNumBones;++a) {
+                const aiBone* b = mesh->mBones[a];
+                WriteBinaryBone(&chunk,b);
+            }
+        }
+    }
+
+    // -----------------------------------------------------------------------------------
+    void WriteBinaryMaterialProperty(IOStream * container, const aiMaterialProperty* prop)
+    {
+        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMATERIALPROPERTY );
+
+        Write<aiString>(&chunk,prop->mKey);
+        Write<unsigned int>(&chunk,prop->mSemantic);
+        Write<unsigned int>(&chunk,prop->mIndex);
+
+        Write<unsigned int>(&chunk,prop->mDataLength);
+        Write<unsigned int>(&chunk,(unsigned int)prop->mType);
+        chunk.Write(prop->mData,1,prop->mDataLength);
+    }
+
+    // -----------------------------------------------------------------------------------
+    void WriteBinaryMaterial(IOStream * container, const aiMaterial* mat)
+    {
+        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMATERIAL);
+
+        Write<unsigned int>(&chunk,mat->mNumProperties);
+        for (unsigned int i = 0; i < mat->mNumProperties;++i) {
+            WriteBinaryMaterialProperty( &chunk, mat->mProperties[i]);
+        }
+    }
+
+    // -----------------------------------------------------------------------------------
+    void WriteBinaryNodeAnim(IOStream * container, const aiNodeAnim* nd)
+    {
+        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODEANIM );
+
+        Write<aiString>(&chunk,nd->mNodeName);
+        Write<unsigned int>(&chunk,nd->mNumPositionKeys);
+        Write<unsigned int>(&chunk,nd->mNumRotationKeys);
+        Write<unsigned int>(&chunk,nd->mNumScalingKeys);
+        Write<unsigned int>(&chunk,nd->mPreState);
+        Write<unsigned int>(&chunk,nd->mPostState);
+
+        if (nd->mPositionKeys) {
+            if (shortened) {
+                WriteBounds(&chunk,nd->mPositionKeys,nd->mNumPositionKeys);
+
+            } // else write as usual
+            else WriteArray<aiVectorKey>(&chunk,nd->mPositionKeys,nd->mNumPositionKeys);
+        }
+        if (nd->mRotationKeys) {
+            if (shortened) {
+                WriteBounds(&chunk,nd->mRotationKeys,nd->mNumRotationKeys);
+
+            } // else write as usual
+            else WriteArray<aiQuatKey>(&chunk,nd->mRotationKeys,nd->mNumRotationKeys);
+        }
+        if (nd->mScalingKeys) {
+            if (shortened) {
+                WriteBounds(&chunk,nd->mScalingKeys,nd->mNumScalingKeys);
+
+            } // else write as usual
+            else WriteArray<aiVectorKey>(&chunk,nd->mScalingKeys,nd->mNumScalingKeys);
+        }
+    }
+
+
+    // -----------------------------------------------------------------------------------
+    void WriteBinaryAnim( IOStream * container, const aiAnimation* anim )
+    {
+        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIANIMATION );
+
+        Write<aiString>(&chunk,anim->mName);
+        Write<double>(&chunk,anim->mDuration);
+        Write<double>(&chunk,anim->mTicksPerSecond);
+        Write<unsigned int>(&chunk,anim->mNumChannels);
+
+        for (unsigned int a = 0; a < anim->mNumChannels;++a) {
+            const aiNodeAnim* nd = anim->mChannels[a];
+            WriteBinaryNodeAnim(&chunk,nd);
+        }
+    }
+
+    // -----------------------------------------------------------------------------------
+    void WriteBinaryLight( IOStream * container, const aiLight* l )
+    {
+        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AILIGHT );
+
+        Write<aiString>(&chunk,l->mName);
+        Write<unsigned int>(&chunk,l->mType);
+
+        if (l->mType != aiLightSource_DIRECTIONAL) {
+            Write<float>(&chunk,l->mAttenuationConstant);
+            Write<float>(&chunk,l->mAttenuationLinear);
+            Write<float>(&chunk,l->mAttenuationQuadratic);
+        }
+
+        Write<aiColor3D>(&chunk,l->mColorDiffuse);
+        Write<aiColor3D>(&chunk,l->mColorSpecular);
+        Write<aiColor3D>(&chunk,l->mColorAmbient);
+
+        if (l->mType == aiLightSource_SPOT) {
+            Write<float>(&chunk,l->mAngleInnerCone);
+            Write<float>(&chunk,l->mAngleOuterCone);
+        }
+
+    }
+
+    // -----------------------------------------------------------------------------------
+    void WriteBinaryCamera( IOStream * container, const aiCamera* cam )
+    {
+        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AICAMERA );
+
+        Write<aiString>(&chunk,cam->mName);
+        Write<aiVector3D>(&chunk,cam->mPosition);
+        Write<aiVector3D>(&chunk,cam->mLookAt);
+        Write<aiVector3D>(&chunk,cam->mUp);
+        Write<float>(&chunk,cam->mHorizontalFOV);
+        Write<float>(&chunk,cam->mClipPlaneNear);
+        Write<float>(&chunk,cam->mClipPlaneFar);
+        Write<float>(&chunk,cam->mAspect);
+    }
+
+    // -----------------------------------------------------------------------------------
+    void WriteBinaryScene( IOStream * container, const aiScene* scene)
+    {
+        AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AISCENE );
+
+        // basic scene information
+        Write<unsigned int>(&chunk,scene->mFlags);
+        Write<unsigned int>(&chunk,scene->mNumMeshes);
+        Write<unsigned int>(&chunk,scene->mNumMaterials);
+        Write<unsigned int>(&chunk,scene->mNumAnimations);
+        Write<unsigned int>(&chunk,scene->mNumTextures);
+        Write<unsigned int>(&chunk,scene->mNumLights);
+        Write<unsigned int>(&chunk,scene->mNumCameras);
+
+        // write node graph
+        WriteBinaryNode( &chunk, scene->mRootNode );
+
+        // write all meshes
+        for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
+            const aiMesh* mesh = scene->mMeshes[i];
+            WriteBinaryMesh( &chunk,mesh);
+        }
+
+        // write materials
+        for (unsigned int i = 0; i< scene->mNumMaterials; ++i) {
+            const aiMaterial* mat = scene->mMaterials[i];
+            WriteBinaryMaterial(&chunk,mat);
+        }
+
+        // write all animations
+        for (unsigned int i = 0; i < scene->mNumAnimations;++i) {
+            const aiAnimation* anim = scene->mAnimations[i];
+            WriteBinaryAnim(&chunk,anim);
+        }
+
+
+        // write all textures
+        for (unsigned int i = 0; i < scene->mNumTextures;++i) {
+            const aiTexture* mesh = scene->mTextures[i];
+            WriteBinaryTexture(&chunk,mesh);
+        }
+
+        // write lights
+        for (unsigned int i = 0; i < scene->mNumLights;++i) {
+            const aiLight* l = scene->mLights[i];
+            WriteBinaryLight(&chunk,l);
+        }
+
+        // write cameras
+        for (unsigned int i = 0; i < scene->mNumCameras;++i) {
+            const aiCamera* cam = scene->mCameras[i];
+            WriteBinaryCamera(&chunk,cam);
+        }
+
+    }
+
+public:
+    AssbinFileWriter(bool shortened, bool compressed)
+        : shortened(shortened), compressed(compressed)
+    {
+    }
+
+    // -----------------------------------------------------------------------------------
+    // Write a binary model dump
+    void WriteBinaryDump(const char* pFile, const char* cmd, IOSystem* pIOSystem, const aiScene* pScene)
+    {
+        IOStream * out = pIOSystem->Open( pFile, "wb" );
+        if (!out)
+            throw std::runtime_error("Unable to open output file " + std::string(pFile) + '\n');
+
+        auto CloseIOStream = [&]() {
+            if (out) {
+                pIOSystem->Close(out);
+                out = nullptr; // Ensure this is only done once.
+            }
+        };
+
+        try {
+            time_t tt = time(NULL);
+#if _WIN32
+            tm* p = gmtime(&tt);
+#else
+            struct tm now;
+            tm* p = gmtime_r(&tt, &now);
+#endif
+
+            // header
+            char s[64];
+            memset(s, 0, 64);
+#if _MSC_VER >= 1400
+            sprintf_s(s, "ASSIMP.binary-dump.%s", asctime(p));
+#else
+            ai_snprintf(s, 64, "ASSIMP.binary-dump.%s", asctime(p));
+#endif
+            out->Write(s, 44, 1);
+            // == 44 bytes
+
+            Write<unsigned int>(out, ASSBIN_VERSION_MAJOR);
+            Write<unsigned int>(out, ASSBIN_VERSION_MINOR);
+            Write<unsigned int>(out, aiGetVersionRevision());
+            Write<unsigned int>(out, aiGetCompileFlags());
+            Write<uint16_t>(out, shortened);
+            Write<uint16_t>(out, compressed);
+            // ==  20 bytes
+
+            char buff[256] = {0};
+            ai_snprintf(buff, 256, "%s", pFile);
+            out->Write(buff, sizeof(char), 256);
+
+            memset(buff, 0, sizeof(buff));
+            ai_snprintf(buff, 128, "%s", cmd);
+            out->Write(buff, sizeof(char), 128);
+            
+            // leave 64 bytes free for future extensions
+            memset(buff, 0xcd, 64);
+            out->Write(buff, sizeof(char), 64);
+            // == 435 bytes
+
+            // ==== total header size: 512 bytes
+            ai_assert(out->Tell() == ASSBIN_HEADER_LENGTH);
+
+            // Up to here the data is uncompressed. For compressed files, the rest
+            // is compressed using standard DEFLATE from zlib.
+            if (compressed)
+            {
+                AssbinChunkWriter uncompressedStream(NULL, 0);
+                WriteBinaryScene(&uncompressedStream, pScene);
+
+                uLongf uncompressedSize = static_cast<uLongf>(uncompressedStream.Tell());
+                uLongf compressedSize = (uLongf)compressBound(uncompressedSize);
+                uint8_t* compressedBuffer = new uint8_t[compressedSize];
+
+                int res = compress2(compressedBuffer, &compressedSize, (const Bytef*)uncompressedStream.GetBufferPointer(), uncompressedSize, 9);
+                if (res != Z_OK)
+                {
+                    delete[] compressedBuffer;
+                    throw DeadlyExportError("Compression failed.");
+                }
+
+                out->Write(&uncompressedSize, sizeof(uint32_t), 1);
+                out->Write(compressedBuffer, sizeof(char), compressedSize);
+
+                delete[] compressedBuffer;
+            }
+            else
+            {
+                WriteBinaryScene(out, pScene);
+            }
+
+            CloseIOStream();
+        }
+        catch (...) {
+            CloseIOStream();
+            throw;
+        }
+    }
+};
+
+void DumpSceneToAssbin(
+    const char* pFile, const char* cmd, IOSystem* pIOSystem,
+    const aiScene* pScene, bool shortened, bool compressed) {
+    AssbinFileWriter fileWriter(shortened, compressed);
+    fileWriter.WriteBinaryDump(pFile, cmd, pIOSystem, pScene);
+}
+
+} // end of namespace Assimp

+ 66 - 0
code/Assbin/AssbinFileWriter.h

@@ -0,0 +1,66 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2020, assimp team
+
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file AssbinFileWriter.h
+ *  @brief Declaration of Assbin file writer.
+ */
+
+#ifndef AI_ASSBINFILEWRITER_H_INC
+#define AI_ASSBINFILEWRITER_H_INC
+
+#include <assimp/defs.h>
+#include <assimp/scene.h>
+#include <assimp/IOSystem.hpp>
+
+namespace Assimp {
+
+void ASSIMP_API DumpSceneToAssbin(
+    const char* pFile,
+    const char* cmd,
+    IOSystem* pIOSystem,
+    const aiScene* pScene,
+    bool shortened,
+    bool compressed);
+
+}
+
+#endif // AI_ASSBINFILEWRITER_H_INC

+ 2 - 2
code/Assbin/AssbinLoader.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 
@@ -535,7 +535,7 @@ void AssbinImporter::ReadBinaryTexture(IOStream * stream, aiTexture* tex) {
 
 
     tex->mWidth = Read<unsigned int>(stream);
     tex->mWidth = Read<unsigned int>(stream);
     tex->mHeight = Read<unsigned int>(stream);
     tex->mHeight = Read<unsigned int>(stream);
-    stream->Read( tex->achFormatHint, sizeof(char), 4 );
+    stream->Read( tex->achFormatHint, sizeof(char), HINTMAXTEXTURELEN - 1 );
 
 
     if(!shortened) {
     if(!shortened) {
         if (!tex->mHeight) {
         if (!tex->mHeight) {

+ 1 - 1
code/Assbin/AssbinLoader.h

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 5 - 5
code/Assjson/cencode.c

@@ -42,7 +42,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
 			{
 			{
 				state_in->result = result;
 				state_in->result = result;
 				state_in->step = step_A;
 				state_in->step = step_A;
-				return codechar - code_out;
+				return (int)(codechar - code_out);
 			}
 			}
 			fragment = *plainchar++;
 			fragment = *plainchar++;
 			result = (fragment & 0x0fc) >> 2;
 			result = (fragment & 0x0fc) >> 2;
@@ -53,7 +53,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
 			{
 			{
 				state_in->result = result;
 				state_in->result = result;
 				state_in->step = step_B;
 				state_in->step = step_B;
-				return codechar - code_out;
+				return (int)(codechar - code_out);
 			}
 			}
 			fragment = *plainchar++;
 			fragment = *plainchar++;
 			result |= (fragment & 0x0f0) >> 4;
 			result |= (fragment & 0x0f0) >> 4;
@@ -64,7 +64,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
 			{
 			{
 				state_in->result = result;
 				state_in->result = result;
 				state_in->step = step_C;
 				state_in->step = step_C;
-				return codechar - code_out;
+				return (int)(codechar - code_out);
 			}
 			}
 			fragment = *plainchar++;
 			fragment = *plainchar++;
 			result |= (fragment & 0x0c0) >> 6;
 			result |= (fragment & 0x0c0) >> 6;
@@ -81,7 +81,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
 		}
 		}
 	}
 	}
 	/* control should not reach here */
 	/* control should not reach here */
-	return codechar - code_out;
+	return (int)(codechar - code_out);
 }
 }
 
 
 int base64_encode_blockend(char* code_out, base64_encodestate* state_in)
 int base64_encode_blockend(char* code_out, base64_encodestate* state_in)
@@ -104,6 +104,6 @@ int base64_encode_blockend(char* code_out, base64_encodestate* state_in)
 	}
 	}
 	*codechar++ = '\n';
 	*codechar++ = '\n';
 	
 	
-	return codechar - code_out;
+	return (int)(codechar - code_out);
 }
 }
 
 

+ 1 - 1
code/Assxml/AssxmlExporter.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Assxml/AssxmlExporter.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/B3D/B3DImporter.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 

+ 1 - 1
code/B3D/B3DImporter.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/BVH/BVHLoader.cpp

@@ -4,7 +4,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/BVH/BVHLoader.h

@@ -4,7 +4,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Blender/BlenderBMesh.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2013, assimp team
+Copyright (c) 2006-2020, assimp team
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use of this software in source and binary forms,
 Redistribution and use of this software in source and binary forms,

+ 1 - 1
code/Blender/BlenderBMesh.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2013, assimp team
+Copyright (c) 2006-2020, assimp team
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use of this software in source and binary forms,
 Redistribution and use of this software in source and binary forms,

+ 1 - 1
code/Blender/BlenderDNA.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Blender/BlenderDNA.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Blender/BlenderDNA.inl

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Blender/BlenderIntermediate.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Blender/BlenderLoader.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Blender/BlenderLoader.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Blender/BlenderModifier.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Blender/BlenderModifier.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Blender/BlenderScene.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (ASSIMP)
 Open Asset Import Library (ASSIMP)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2016, ASSIMP Development Team
+Copyright (c) 2006-2020, ASSIMP Development Team
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use of this software in source and binary forms,
 Redistribution and use of this software in source and binary forms,

+ 1 - 1
code/Blender/BlenderScene.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Blender/BlenderSceneGen.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (ASSIMP)
 Open Asset Import Library (ASSIMP)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2016, ASSIMP Development Team
+Copyright (c) 2006-2020, ASSIMP Development Team
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use of this software in source and binary forms,
 Redistribution and use of this software in source and binary forms,

+ 1 - 1
code/Blender/BlenderTessellator.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Blender/BlenderTessellator.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/C4D/C4DImporter.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use of this software in source and binary forms,
 Redistribution and use of this software in source and binary forms,

+ 1 - 1
code/C4D/C4DImporter.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use of this software in source and binary forms,
 Redistribution and use of this software in source and binary forms,

+ 1 - 1
code/CApi/AssimpCExport.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/CApi/CInterfaceIOWrapper.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/CApi/CInterfaceIOWrapper.h

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 3 - 5
code/CMakeLists.txt

@@ -1,7 +1,7 @@
 # Open Asset Import Library (assimp)
 # Open Asset Import Library (assimp)
 # ----------------------------------------------------------------------
 # ----------------------------------------------------------------------
 #
 #
-# Copyright (c) 2006-2019, assimp team
+# Copyright (c) 2006-2020, assimp team
 #
 #
 # All rights reserved.
 # All rights reserved.
 #
 #
@@ -331,6 +331,8 @@ ADD_ASSIMP_IMPORTER( ASSBIN
 ADD_ASSIMP_EXPORTER( ASSBIN
 ADD_ASSIMP_EXPORTER( ASSBIN
   Assbin/AssbinExporter.h
   Assbin/AssbinExporter.h
   Assbin/AssbinExporter.cpp
   Assbin/AssbinExporter.cpp
+  Assbin/AssbinFileWriter.h
+  Assbin/AssbinFileWriter.cpp
 )
 )
 
 
 ADD_ASSIMP_EXPORTER( ASSXML
 ADD_ASSIMP_EXPORTER( ASSXML
@@ -1213,10 +1215,6 @@ SET_TARGET_PROPERTIES( assimp PROPERTIES
 )
 )
 
 
 if (APPLE)
 if (APPLE)
-  SET_TARGET_PROPERTIES( assimp PROPERTIES
-    INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${ASSIMP_LIB_INSTALL_DIR}"
-  )
-
   if (BUILD_FRAMEWORK)
   if (BUILD_FRAMEWORK)
     SET_TARGET_PROPERTIES( assimp PROPERTIES
     SET_TARGET_PROPERTIES( assimp PROPERTIES
       FRAMEWORK TRUE
       FRAMEWORK TRUE

+ 1 - 1
code/COB/COBLoader.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 

+ 1 - 1
code/COB/COBLoader.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/COB/COBScene.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 2 - 2
code/CSM/CSMLoader.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 
@@ -178,7 +178,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
                         *ot++ = *buffer++;
                         *ot++ = *buffer++;
 
 
                     *ot = '\0';
                     *ot = '\0';
-                    nda->mNodeName.length = (size_t)(ot-nda->mNodeName.data);
+                    nda->mNodeName.length = (ai_uint32)(ot-nda->mNodeName.data);
                 }
                 }
 
 
                 anim->mNumChannels = static_cast<unsigned int>(anims_temp.size());
                 anim->mNumChannels = static_cast<unsigned int>(anims_temp.size());

+ 1 - 1
code/CSM/CSMLoader.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Collada/ColladaExporter.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Collada/ColladaExporter.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Collada/ColladaHelper.cpp

@@ -4,7 +4,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 

+ 1 - 1
code/Collada/ColladaHelper.h

@@ -4,7 +4,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Collada/ColladaLoader.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 

+ 1 - 1
code/Collada/ColladaLoader.h

@@ -4,7 +4,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Collada/ColladaParser.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Collada/ColladaParser.h

@@ -2,7 +2,7 @@
  Open Asset Import Library (assimp)
  Open Asset Import Library (assimp)
  ----------------------------------------------------------------------
  ----------------------------------------------------------------------
 
 
- Copyright (c) 2006-2019, assimp team
+ Copyright (c) 2006-2020, assimp team
 
 
 
 
  All rights reserved.
  All rights reserved.

+ 1 - 1
code/Common/Assimp.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Common/BaseImporter.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Common/BaseProcess.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Common/BaseProcess.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Common/Bitmap.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Common/CreateAnimMesh.cpp

@@ -4,7 +4,7 @@ Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
 Copyright (C) 2016 The Qt Company Ltd.
 Copyright (C) 2016 The Qt Company Ltd.
-Copyright (c) 2006-2012, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 

+ 1 - 1
code/Common/DefaultIOStream.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Common/DefaultIOSystem.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Common/DefaultLogger.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Common/DefaultProgressHandler.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Common/Exporter.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Common/FileLogStream.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 

+ 1 - 1
code/Common/FileSystemFilter.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2008, assimp team
+Copyright (c) 2006-2020, assimp team
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use of this software in source and binary forms,
 Redistribution and use of this software in source and binary forms,

+ 1 - 1
code/Common/Importer.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 

+ 1 - 1
code/Common/Importer.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Common/ImporterRegistry.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Common/PolyTools.h

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Common/PostStepRegistry.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Common/RemoveComments.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

+ 1 - 1
code/Common/SGSpatialSort.cpp

@@ -3,7 +3,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 
 

+ 1 - 1
code/Common/SceneCombiner.cpp

@@ -2,7 +2,7 @@
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 
 
-Copyright (c) 2006-2019, assimp team
+Copyright (c) 2006-2020, assimp team
 
 
 
 
 All rights reserved.
 All rights reserved.

Some files were not shown because too many files changed in this diff