Changelog » Plugins

Changes since 2020.06

Dependency changes

  • Minimal supported CMake version is now 3.5, changed from 3.4, since CMake 3.27+ warns if a compatibility with CMake below 3.5 is requested. Older versions are not supported anymore and all workarounds for them were removed. This is a conservative change, as there are no known supported distributions which would have anything older than 3.5.

New features

Changes and improvements

Build system

  • The oldest supported Clang version is now 6.0 (available on Ubuntu 18.04), or equivalently Apple Clang 10.0 (Xcode 10). Oldest supported GCC version is still 4.8.
  • The versionPlugins.h header now gets populated from Git correctly also when inside a CMake subproject
  • Travis banned everyone from using their CI and so all Linux, macOS, Emscripten, Android and iOS builds were migrated from Travis to Circle CI, together with adding also an explicit ARM64 build. See also mosra/magnum#350 and mosra/magnum#523.
  • UseEmscripten is no longer implicitly included on Emscripten as it's not needed for anything (see mosra/magnum#490)
  • It's now possible to use <PackageName>_ROOT to point to install locations of dependencies such as Corrade on CMake 3.12+, in addition to putting them all together inside CMAKE_PREFIX_PATH. See also mosra/magnum#614.
  • On CMake 3.16 and newer, FindMagnumPlugins.cmake can provide additional details if some component is not found.
  • FindAssimp.cmake now attempts to use installed Assimp CMake config files, if they are not broken, to correctly find and link to all dependencies in case of a static build. This is mainly to support static builds in Vcpkg, vanilla Assimp 5.0.1 config files are irreparably broken on all platforms except dynamic Windows builds.
  • The Homebrew package now uses std_cmake_args instead of hardcoded build type and install prefix, which resolves certain build issues (see mosra/homebrew-magnum#6)
  • Suppressed a GCC 10 warning about a (harmless) uninitialized variable in TinyGltfImporter (see mosra/magnum-plugins#104)
  • Updated Debian build instructions to pass --no-sign to dpkg-buildpackage, avoiding a confusing error message that might lead people to think the packaging failed (see mosra/magnum-plugins#105)
  • Fixed Debian packages to use correctly named OpenEXR dependency on Ubuntu 20.04 and Debian Buster (see mosra/magnum-plugins#105, mosra/magnum-plugins#108)
  • Fixed StbImageImporter to build again with CORRADE_BUILD_MULTITHREADED disabled.
  • Changed handling of CMAKE_*_OUTPUT_DIRECTORY to make plugins pick it up also if only e.g. CMAKE_RUNTIME_OUTPUT_DIRECTORY is set, but not ARCHIVE or LIBRARY_OUTPUT_DIRECTORY. Similarly it now also handles config-specific CMAKE_*_OUTPUT_DIRECTORY_<CONFIG> variables. See also mosra/magnum#486 and mosra/magnum-plugins#123.
  • Fixed wrong .gitattributes option for LF line endings in MSYS PKGBUILDs (see mosra/magnum-plugins#125)
  • Fixed a build breakage with libc++ 15+ (see mosra/magnum-plugins#131)
  • Fixed building of some tests if Magnum isn't installed in a global include path (see mosra/magnum-plugins#132)
  • It's now possible to build dynamic libraries on Android and Emscripten with the usual options. Static libraries are still a default but it isn't enforced anymore. See mosra/magnum#617.
  • Fixed most remaining warnings on MSVC, in particular those related to "conversion from T to void * of greater size" (see mosra/magnum#544).
  • Fixed FindMagnumPlugins.cmake to correctly find the Magnum Plugins include directory when it's installed to a different directory than Magnum itself (see mosra/magnum-integration#105)
  • Magnum Plugins now automatically install and use Find modules for their dependencies in a way that doesn't clash with modules of the same name potentially installed by other software, meaning the user doesn't need to copy and carry them along anymore (see mosra/magnum#436)
  • Fixed remaining warnings related to -fvisibility-inlines-hidden on Mac (see mosra/magnum#551)
  • Created a RPM package with a helper script for building (see mosra/magnum-plugins#111 and mosra/magnum-plugins#147)
  • On Emscripten it's now possible to build FreeTypeFont, HarfBuzzFont, JpegImporter, JpegImageConverter, PngImporter and PngImageConverter using libraries coming from Emscripten Ports. See mosra/magnum-plugins#151.
  • Fixed compilation of GltfImporter on MSVC 2026 due to a missing std::iterator_traits definition (see mosra/magnum-plugins#154)

Bug fixes

  • Fixed DrMp3AudioImporter to calculate proper buffer length for multi-channel files – it was always taking just a single channel into account
  • AssimpImporter used to add a strange "skeleton visualizer" meshes to files such as COLLADA even though the file had no skeletons in the first place. Turns out this was due to insane defaults and it was enough to just disable such misfeature. See also mosra/magnum-plugins#99.
  • AssimpImporter now correctly imports files with backslashes in image paths also on non-Windows platforms (see mosra/magnum-plugins#101 and mosra/magnum-plugins#102)
  • AssimpImporter, OpenGexImporter and GltfImporter now correctly propagate Trade::ImporterFlags to delegated image importer plugins, instead of the setting (such as verbose output) affecting only the top-level plugin
  • Fixed a few cases where DdsImporter could assert or crash when encountering a premature end of file
  • DdsImporter now implicitly performs Y- and Z-flip on uncompressed images consistently with other importers
  • JpegImageConverter was mistakenly using the MAGNUM_BUILD_STATIC CMake option instead of MAGNUM_BUILD_PLUGINS_STATIC
  • Fixed BasisImporter to work with direct instantiation without a plugin manager (see mosra/magnum-plugins#96)
  • Assorted Trade,TinyGltfImporter robustness improvements (see mosra/magnum-plugins#106, mosra/magnum-plugins#109):
    • Fixed an out-of-bounds read happening with empty animations when optimizeQuaternionShortestPath is enabled
    • Graceful handling of invalid texture sampler values, instead of asserting
    • Better checks for out-of-bounds image, sampler and accessor references
    • Robust handling of invalid scene hierarchies such as cycles or multiple parent nodes
    • Better warning messages in certain pathological cases
  • Passing a RG input to BasisImageConverter while also having swizzle=rrrg (or, previously, separate_rg_to_color_alpha=true) set led to the image having the red channel repeated four times, losing the green channel. This is now fixed to not perform an implicit RRRG swizzle if the swizzle option is set. See also mosra/magnum-plugins#112.
  • Fixed loading of embedded FBX textures in AssimpImporter (see mosra/magnum-plugins#127, mosra/magnum-plugins#128)
  • PngImporter and PngImageConverter no longer asserts if the patch version of libpng changed, such as when a system package was upgraded from 1.6.37 to 1.6.38. If the major or minor version changes, it's still an assert.
  • Fixed an issue where FreeTypeFont would assert when loaded with more than one plugin manager at the same time
  • Fixed serious errors in the StbTrueTypeFont glyph rasterization code that caused the operation to take extreme amounts of time while also using needlessly large emounts of memory.
  • The StbTrueTypeFont used to interpret requested size as distance between glyph ascent and descent, making it inconsistent with FreeTypeFont and with certain fonts resulting in very different output. This is now fixed and both font plugins interpret the size the same way.

Deprecated APIs

  • All CMake build options are now prefixed with MAGNUM_. For backwards compatibility, unless MAGNUM_BUILD_DEPRECATED is disabled and unless a prefixed option is already set during the initial run, the unprefixed options are still recognized with a warning. See also mosra/corrade#139.
  • The TinyGltfImporter plugin is now deprecated in favor of an actually lightweight GltfImporter. The CgltfImporter plugin, which is where the GltfImporter originally comes from, is now just a deprecated alias to it as well.
  • The OpenGexImporter plugin along with the OpenDdl library are deprecated as the format is rarely used nowadays, was last updated in 2021 and the plugin implementation didn't receive any format updates since the initial implementation in 2015. Use the AssimpImporter plugin to parse OpenDDL / OpenGEX files instead.
  • Variables ASSIMP_LIBRARY_{DEBUG,RELEASE} and ASSIMP_INCLUDE_DIR that could be used to force Assimp location in FindAssimp.cmake are deprecated in favor of Assimp_LIBRARY_{DEBUG,RELEASE} and Assimp_INCLUDE_DIR
  • As BasisImporter, DdsImporter and KtxImporter now annotate cube map and array images using ImageFlag3D::CubeMap and ImageFlag*D::Array, retrieving their type via Trade::TextureData::type() is deprecated and available only for backwards compatibility unless MAGNUM_BUILD_DEPRECATED is disabled.
  • Direct plugin instantiation through the constructors isn't a supported use case anymore, as such a code path is not easy to test in common setups and requires significant code duplication in order to preserve plugin-specific configuration options. Instantiate though the plugin manager instead.

Potential compatibility breakages, removed APIs

  • BasisImporter and BasisImageConverter plugins don't compile against the previous 1.11 version of Basis anymore, you have to update the dependency to the v1_15_update2 tag (see mosra/magnum-plugins#112)
  • BasisImporter and BasisImageConverter plugins now rely on externally supplied zstd installation instead of using the amalgamated file in Basis sources, which is outdated, lacks security fixes and many optimizations. If no zstd is found, the Basis library is compiled without zstd support. See mosra/magnum-plugins#115.
  • The separate_rg_to_color_alpha option from BasisImageConverter is gone, use swizzle=rrrg instead. For RG inputs this is done implicitly and you don't need to set this option. See also mosra/magnum-plugins#112.
  • The Bc7RGB target format for BasisImporter is removed, use Bc7RGBA instead (see mosra/magnum-plugins#112)
  • Because DdsImporter was fixed to perform Y- and Z-flip on uncompressed images to ensure consistency with other importers, code that relied on the previous broken behavior will break. Either Y-flip the files or set the assumeYUpZBackward option to fix this.
  • GltfImporter no longer returns 0 from defaultScene() if no "scene" property is present and the file contains at least one scene, and returns -1 instead. This is in order to support use cases depending on the (lack of the) default scene specifier.

Documentation

2020.06

Released 2020-06-27, tagged as v2020.06.

New features

Changes and improvements

  • AssimpImporter now imports color alpha channel in Trade::PhongMaterialData as well as importing both color and texture for file formats that support it
  • DevIlImageImporter now also considers file extension when detecting file format, being able to open files that don't really have any easy-to-detect magic header; additionally the file type can be also forced though a plugin-specific configuration option.
  • DevIlImageImporter can now load multi-image files such as *.icos or animated GIFs
  • Minor speedup in the StbTrueTypeFont plugin by avoiding use of 64-bit floating-point operations (see mosra/magnum-plugins#73)
  • TinyGltfImporter now supports interleaved animation and mesh attributes
  • TinyGltfImporter and OpenGexImporter now import both color and texture information instead of only one of them
  • AssimpImporter inadvertently ignored base orientation for files that are defined with Z up instead of Y, this behavior is now also configurable (see mosra/magnum-plugins#82)
  • AssimpImporter, DdsImporter and StanfordImporter now recognize the Trade::ImporterFlag::Verbose flag, printing verbose messages on the output if enabled
  • StbImageImporter is now thread-safe if CORRADE_BUILD_MULTITHREADED is enabled.
  • Library version is now exposed through MAGNUMPLUGINS_VERSION_YEAR, MAGNUMPLUGINS_VERSION_MONTH, MAGNUMPLUGINS_VERSION_COMMIT, MAGNUMPLUGINS_VERSION_HASH and MAGNUMPLUGINS_VERSION_STRING preprocessor defines in a new Magnum/versionPlugins.h header. This header is not included by any other header to avoid trigerring a full rebuild when Git commit changes. If Git is not found, only the first two defines are present.
  • Trade::PngImporter now recognizes and imports gray+alpha files as well (see mosra/magnum-plugins#71)

Build system

Bug fixes

  • AssimpImporter could crash on a division-by-zero when custom file callbacks encounter an empty file
  • Importing one image multiple times with DevIlImageImporter would cause it being differently flipped every time
  • Fixed a crash in PngImporter when encountering palette files with less than 8 bits per pixel

Potential compatibility breakages, removed APIs

  • Removed OpenDdl headers in MagnumPlugins/OpenGexImporter/OpenDdl that were deprecated in 2018.04, include them from the Magnum/OpenDdl directory instead.
  • TinyGltfImporter translation of PBR materials into a Phong shading model left Trade::PhongMaterialData::shininess() set at 1.0f, which wasn't a good default. Now it's set to 80.0f to match defaults of Shaders::Phong
  • Support for the KHR_materials_cmnBlinnPhong glTF extension has been removed from `TinyGltfImporter, as it seems to be effectively abandoned. The branch didn't see any update since 2017 and there are no exporters supporting it.
  • The bundled tiny_gltf code was updated from v2.0.0 to v2.4.1 in order to implement support for KHR_lights_punctual. A lot happened between these two versions including a change in how it parses numeric data. It may cause the imported transformations to be slightly different than in 2019.10, resulting in very minor differences in rendered images, particularly on aliased edges. See also facebookresearch/habitat-sim#496.
  • DdsImporter now exposes mip levels not as separate images, but through the new level parameter and Trade::AbstractImporter::image2DLevelCount() / Trade::AbstractImporter::image3DLevelCount() APIs.

2019.10

Released 2019-10-24, tagged as v2019.10.

Dependency changes

  • Minimal supported CMake version is now 3.4. Older versions are not supported anymore and all workarounds for them were removed. Download a prebuilt release of a newer version if you need to use Corrade on older systems (such as Ubuntu 14.04 or Debian 8). This is a conservative change that shouldn't affect any additional distribution compared to the CMake 3.1 requirement in 2019.01.

New features

Changes and improvements

  • Calling image2D() in AssimpImporter, OpenGexImporter and TinyGltfImporter now behaves consistently in regards to file loading callbacks — failing with an error if and only if image is not embedded, the file is not opened from a filesystem and file loading callbacks are not set. Previously it could errorneously assert even when loading embedded images, try to look for images on the filesystem when loading in-memory data or fail to open images when a file inside current working directory was opened.
  • The AssimpImporter plugin now detects ambient color set to 0xffffff_srgbf and forces it back to 0x000000_srgbf. This is a bug in Assimp 4.1, causing all other color information to get discarded. See also assimp/assimp#2059, assimp/assimp#2563 and mosra/magnum-plugins#64.
  • The AssimpImporter plugin now trims trailing space from image paths in order to deal better with OBJ meshes from hell (see mosra/magnum-plugins#58)
  • The AssimpImporter plugin now imports each image just once in case a single image is shared by more than one texture
  • JpegImporter now prints error info to Corrade::Utility::Error, allowing it to be redirected or suppressed consistently to other plugin implementations (see mosra/magnum-plugins#53)
  • PngImporter and PngImageConverter now print error and warning info to Corrade::Utility::Error and Corrade::Utility::Warning, allowing it to be redirected to suppressed consistently to other plugin implementations
  • DevIlImageImporter now converts BGR data to RGB instead of expanding them to RGBA
  • DevIlImageImporter, JpegImporter, PngImporter and StbImageImporter now properly report an error message when opening an empty file
  • Switched TinyGltfImporter to use Corrade::Utility::Directory::read() instead of tiny_gltf's internal APIs for loading external files, making it work correctly for UTF-8 paths on Windows
  • Better diagnostics in TinyGltfImporter when an external buffer file is not found or when a file loaded from memory attempts to reference an external buffer without file callbacks being set
  • DrFlacAudioImporter, DrWavAudioImporter and StbVorbisAudioImporter plugins no longer treat files with zero samples as errors, but give back an empty buffer instead
  • Updated dr_wav for DrWavAudioImporter to version 0.8.5 which supports a wider range of file types (see mosra/magnum-plugins#61)
  • Actually reporting errors from FreeTypeFont instead of just failing without a message

Build system

  • MSYS2 packages are now in official repositories, installable directly via pacman
  • The JpegImageConverter plugin was mistakenly using the JPEG_INCLUDE_DIRS CMake variable which was not present on versions before 3.12. The JpegImporter plugin is not affected by this. See also mosra/magnum-plugins#51.
  • Upgraded TinyGltfImporter to use json.hpp 3.3.0, fixing a compile error on some Clang versions (see mosra/magnum-plugins#54)
  • Fixed FindMagnumPlugins.cmake to behave correctly when both a debug and a release version of libjpeg is found
  • Fixed FindMagnumPlugins.cmake to correctly handle the AssimpImporter, and JpegImageConverter components
  • FindMagnumPlugins.cmake now correctly finds debug versions of statically built plugins when using Vcpkg
  • Fixed FindMagnumPlugins.cmake to correctly link to zlib also when both a debug and a release version of libpng is found
  • FindAssimp.cmake now can optionally link to the IrrXML library (needed for static builds on Vcpkg)
  • Emscripten builds now have the -fPIC option disabled by default as it causes linker errors related to __memory_base on 1.38.36 (see also emscripten-core/emscripten#8761)

Bug fixes

  • AssimpImporter was returning a random value for material shininess with STL models, now it correctly returns 0.0f when the shininess value is not present.
  • For files that had multiple textures, AssimpImporter was incorrectly importing only the first image, multiple times. Fixed independently also by mosra/magnum-plugins#66 which got submitted three minutes after the change was pushed to master.
  • StbImageImporter was not correctly handling image import failures, randomly hitting unreachable code assertions
  • Fixed DevIlImageImporter BGR(A)-to-RGB(A) conversion to not return random memory
  • PngImporter now handles too short files gracefully instead of aborting on an assertion
  • PngImporter now handles paletted images and images with tRNS alpha mask correctly
  • Fixed memory leaks in PngImporter error handling
  • Fixed FindMagnumPlugins.cmake to correctly look for the Assimp package
  • Fixed handling of corrupted / incomplete data in StbTrueTypeFont (see mosra/magnum-plugins#29)

Potential compatibility breakages, removed APIs

  • Removed the ColladaImporter plugin, deprecated since 2018.10, because it was based on an outdated toolkit and, due to the complexity of the COLLADA format and poor conformance of various exporters, it was not feasible to maintain a builtin importer anymore.

2019.01

Released 2019-02-04, tagged as v2019.01.

Dependency changes

  • Minimal supported GCC version is now 4.8.1, GCC 4.7 is not supported anymore. Minimal Clang version is now 3.3, since that's the first version with a complete C++11 support. See also mosra/magnum#274.
  • Minimal supported CMake version is now 3.1. Older versions are not supported anymore and all workarounds for them were removed. Download a prebuilt release of a newer version if you need to use Corrade on older systems (such as Ubuntu 14.04 or Debian 8). See also mosra/magnum#274.

New features

Changes and improvements

  • Fixed compatibility of the OpenDdl library with Emscripten 1.38.10 and newer, which defines std::size_t as unsigned long instead of unsigned int used previously (it's still a four-byte type, though)

Build system

Potential compatibility breakages, removed APIs

  • Removed MAGNUMPLUGINS_*_LIBRARIES and MAGNUMPLUGINS_*_INCLUDE_DIRS CMake variables, which were deprecated in favor of MagnumPlugins::* imported targets in February 2016.

2018.10

Released 2018-10-23, tagged as v2018.10.

New features

Changes and improvements

  • Texture coordinate, color vertex attribute and base object color import in TinyGltfImporter (see mosra/magnum-plugins#41, mosra/magnum-plugins#43)
  • Mesh name and complete multi-primitive mesh loading in TinyGltfImporter (see mosra/magnum-plugins#48)
  • OpenGexImporter and TinyGltfImporter now properly import alpha for Trade::PhongMaterialData
  • TinyGltfImporter now exposes the translation/rotation/scaling properties of Trade::ObjectData3D separately if they are separate in the source file
  • HarfBuzzFont is now providing TrueTypeFont, similarly to other plugins supporting TTF fonts
  • StbImageImporter now properly supports Apple proprietary CgBI PNGs. Stock libPNG doesn't support that but there are forks that can do it, updated documentation of PngImporter to mention that.
  • StbImageConverter no longer requires input data to be tightly packed, allowing to export image subrectangles
  • StbImageConverter now prints warnings when channels are lost on output due to limitations of the output format (such as alpha channel for JPEGs)
  • Trade::TinyGltfImporter::defaultScene() now returns the first scene if no default scene is present in the file
  • New Trade::TinyGltfImporter::TinyGltfImporter(PluginManager::Manager<Trade::AbstractImporter>&) constructor for easier usage of statically-built plugins
  • Cleaned up some unnecessary memory copies and reallocations in the TinyGltfImporter implementation
  • Upstreamed local patches to tiny_gltf (see mosra/magnum-plugins#45)

Build system

Bug fixes

  • Fixed a TinyGltfImporter crash on materials without a PBR extension (see mosra/magnum-plugins#41)
  • Fixed improper order of applying translation/rotation/scaling node transformations in TinyGltfImporter
  • TinyGltfImporter now loads external images from *.glb files and images embedded as URI data properly
  • TinyGltfImporter now properly imports non-indexed meshes and meshes without the normal attribute
  • Fixed quite a few critical issues with TinyGltfImporter mesh data import (see mosra/magnum-plugins#42)
  • Updated stb_image to fix undefined symbol: __cpu_model error when compiling StbImageImporter on GCC 5
  • AssimpImporter now properly prints out an message on file opening error instead of failing silently
  • AssimpImporter incorrectly imported object transformation matrices transposed
  • AssimpImporter incorrectly imported the scene twice, once as a scene and once as a object that all other objects were parented to. However, in presence of postprocessing flags such as PreTransformVertices Assimp collapses all nodes into one and then the node is imported as a single object.
  • FreeTypeFont was not handling subsequent calls to Text::FreeTypeFont::initialize() properly (see mosra/magnum-plugins#49)

Deprecated APIs

  • ColladaImporter is deprecated because it's based on an outdated toolkit. Moreover, due to the complexity of the COLLADA format and poor conformance of various exporters it's not feasible to maintain a builtin importer anymore and thus this plugin is scheduled for removal in a future release. Please consider either using AssimpImporter for COLLADA import or switching to simpler and better supported formats such as glTF or OpenGEX using TinyGltfImporter or OpenGexImporter. There's also the official COLLADA2GLTF converter.

Changelogs for previous versions are available in Archived plugin changelogs.