diff --git a/.clang-format b/.clang-format index c700d97001..1b47c9d297 100644 --- a/.clang-format +++ b/.clang-format @@ -70,7 +70,7 @@ IncludeCategories: - Regex: '^<.*' Priority: 3 # IncludeIsMainRegex: '(Test)?$' -IndentCaseLabels: false +IndentCaseLabels: false #IndentPPDirectives: AfterHash IndentWidth: 4 # IndentWrappedFunctionNames: false diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index f9d0d6c05a..d1a6a1785e 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -7,22 +7,30 @@ on: branches: [ master ] permissions: - contents: read # to fetch code (actions/checkout) + contents: write # to fetch code (actions/checkout),and release jobs: - job: + build: name: ${{ matrix.name }}-build-and-test runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - name: [ubuntu-latest-g++, macos-latest-clang++, windows-latest-cl.exe, ubuntu-latest-clang++, ubuntu-gcc-hunter, macos-clang-hunter, windows-msvc-hunter] + name: [ubuntu-latest-g++, macos-latest-clang++, windows-latest-cl.exe, windows-latest-clang.exe, ubuntu-latest-clang++] # For Windows msvc, for Linux and macOS let's use the clang compiler, use gcc for Linux. include: + - name: windows-latest-clang.exe + os: windows-latest + cxx: clang++.exe + cc: clang.exe - name: windows-latest-cl.exe os: windows-latest cxx: cl.exe cc: cl.exe + - name: windows-hunter-latest-cl.exe + os: windows-latest + cxx: cl.exe + cc: cl.exe - name: ubuntu-latest-clang++ os: ubuntu-latest cxx: clang++ @@ -35,18 +43,12 @@ jobs: os: ubuntu-latest cxx: g++ cc: gcc - - name: ubuntu-gcc-hunter - os: ubuntu-latest - toolchain: ninja-gcc-cxx17-fpic - - name: macos-clang-hunter - os: macos-latest - toolchain: ninja-clang-cxx17-fpic - - name: windows-msvc-hunter - os: windows-latest - toolchain: ninja-vs-win64-cxx17 steps: - - uses: actions/checkout@v3 + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + + - uses: actions/checkout@v6 with: submodules: true @@ -55,35 +57,15 @@ jobs: - uses: ilammy/msvc-dev-cmd@v1 - name: Set Compiler Environment - if: "!endsWith(matrix.name, 'hunter')" uses: lukka/set-shell-env@v1 with: CXX: ${{ matrix.cxx }} CC: ${{ matrix.cc }} - - name: Set Compiler Environment for Hunter on Windows - if: startsWith(matrix.name, 'windows') && endsWith(matrix.name, 'hunter') - uses: lukka/set-shell-env@v1 - with: - VS160COMNTOOLS: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools - - - name: Checkout Hunter toolchains - if: endsWith(matrix.name, 'hunter') - uses: actions/checkout@v3 - with: - repository: cpp-pm/polly - path: cmake/polly - - - name: Remove contrib directory for Hunter builds - if: contains(matrix.name, 'hunter') - uses: JesseTG/rm@v1.0.3 - with: - path: contrib - - name: Cache DX SDK id: dxcache if: contains(matrix.name, 'windows') - uses: actions/cache@v3 + uses: actions/cache@v5 with: path: '${{ github.workspace }}/DX_SDK' key: ${{ runner.os }}-DX_SDK @@ -91,20 +73,20 @@ jobs: ${{ runner.os }}-DX_SDK - name: Download DXSetup - if: contains(matrix.name, 'windows') && steps.dxcache.outputs.cache-hit != 'true' + if: contains(matrix.name, 'windows-latest-cl.exe') && steps.dxcache.outputs.cache-hit != 'true' run: | curl -s -o DXSDK_Jun10.exe --location https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe cmd.exe /c start /wait .\DXSDK_Jun10.exe /U /O /F /S /P "${{ github.workspace }}\DX_SDK" - name: Set Windows specific CMake arguments - if: contains(matrix.name, 'windows') + if: contains(matrix.name, 'windows-latest-cl.exe') id: windows_extra_cmake_args - run: echo "::set-output name=args::-DASSIMP_BUILD_ASSIMP_TOOLS=1 -DASSIMP_BUILD_ASSIMP_VIEW=1 -DASSIMP_BUILD_ZLIB=1" + run: echo ":set-output name=args::=-DASSIMP_BUILD_ASSIMP_TOOLS=1 -DASSIMP_BUILD_ASSIMP_VIEW=1" >> $GITHUB_OUTPUT - name: Set Hunter specific CMake arguments if: contains(matrix.name, 'hunter') id: hunter_extra_cmake_args - run: echo "::set-output name=args::-DBUILD_SHARED_LIBS=OFF -DASSIMP_HUNTER_ENABLED=ON -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/cmake/polly/${{ matrix.toolchain }}.cmake" + run: echo "args=-DBUILD_SHARED_LIBS=OFF -DASSIMP_HUNTER_ENABLED=ON -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/cmake/polly/${{ matrix.toolchain }}.cmake" >> $GITHUB_OUTPUT - name: configure and build uses: lukka/run-cmake@v3 @@ -121,14 +103,98 @@ jobs: - name: Exclude certain tests in Hunter specific builds if: contains(matrix.name, 'hunter') id: hunter_extra_test_args - run: echo "::set-output name=args::--gtest_filter=-utOpenGEXImportExport.Importissue1340_EmptyCameraObject:utColladaZaeImportExport.importBlenFromFileTest" + run: echo "args=--gtest_filter=-utOpenGEXImportExport.Importissue1340_EmptyCameraObject:utColladaZaeImportExport.importBlenFromFileTest" >> $GITHUB_OUTPUT - name: test run: cd build/bin && ./unit ${{ steps.hunter_extra_test_args.outputs.args }} shell: bash - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v7 if: matrix.name == 'windows-msvc' with: - name: 'assimp-bins-${{ matrix.name }}-${{ github.sha }}' - path: build/bin + name: 'assimp-bins-${{ matrix.name }}' + path: build/bin/assimp*.exe + + - uses: marvinpinto/action-automatic-releases@latest + if: contains(matrix.name, 'windows-msvc-hunter') + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "master" + prerelease: true + title: "AutoRelease" + files: | + build/bin/assimp*.exe + + create-release: + needs: [build] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + steps: + - id: create-release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}' + with: + tag_name: '${{github.ref}}' + release_name: 'Release ${{github.ref}}' + draft: false + prerelease: true + - run: | + echo '${{steps.create-release.outputs.upload_url}}' > release_upload_url.txt + - uses: actions/upload-artifact@v7 + with: + name: create-release + path: release_upload_url.txt + + upload-release: + strategy: + matrix: + name: [ubuntu-latest-g++, macos-latest-clang++, windows-latest-cl.exe, ubuntu-latest-clang++, ubuntu-gcc-hunter, macos-clang-hunter, windows-msvc-hunter] + # For Windows msvc, for Linux and macOS let's use the clang compiler, use gcc for Linux. + include: + - name: windows-latest-cl.exe + os: windows-latest + cxx: cl.exe + cc: cl.exe + - name: ubuntu-latest-clang++ + os: ubuntu-latest + cxx: clang++ + cc: clang + - name: macos-latest-clang++ + os: macos-latest + cxx: clang++ + cc: clang + - name: ubuntu-latest-g++ + os: ubuntu-latest + cxx: g++ + cc: gcc + - name: ubuntu-gcc-hunter + os: ubuntu-latest + toolchain: ninja-gcc-cxx17-fpic + - name: macos-clang-hunter + os: macos-latest + toolchain: ninja-clang-cxx17-fpic + - name: windows-msvc-hunter + os: windows-latest + toolchain: ninja-vs-win64-cxx17 + + needs: [create-release] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + steps: + - uses: softprops/action-gh-release@v3 + with: + name: create-release + - id: upload-url + run: | + echo "url=$(cat create-release/release_upload_url.txt)" >> $GITHUB_OUTPUT + - uses: actions/download-artifact@v8 + with: + name: 'assimp-bins-${{ matrix.name }}-${{ github.sha }}' + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}' + with: + files: | + *.zip + diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000000..5ae949a143 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,52 @@ +name: Build and Publish Prebuilt Binaries + +on: + release: + types: [created] + +jobs: + build: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - name: windows-x64 + os: windows-latest + arch: x64 + - name: windows-x86 + os: windows-latest + arch: x86 + cmake_args: -A Win32 + - name: macos-x64 + os: macos-13 + - name: macos-arm64 + os: macos-latest + - name: linux-x64 + os: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - uses: lukka/get-cmake@latest + + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + + - name: Build + run: | + cmake -B build -S . ${{ matrix.cmake_args }} -DCMAKE_BUILD_TYPE=Release -DASSIMP_BUILD_TESTS=OFF + cmake --build build --config Release + + - uses: TheDoctor0/zip-release@0.7.6 + with: + filename: ${{ matrix.name }}-${{ github.event.release.tag_name }}.zip + directory: build/bin/ + + - uses: softprops/action-gh-release@v3 + with: + files: build/bin/${{ matrix.name }}-${{ github.event.release.tag_name }}.zip + append_body: true + fail_on_unmatched_files: true diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index a84be8cbc5..5c043178ae 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -19,7 +19,7 @@ jobs: dry-run: false language: c++ - name: Upload Crash - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v7 if: failure() && steps.build.outcome == 'success' with: name: artifacts diff --git a/.github/workflows/inno_setup b/.github/workflows/inno_setup new file mode 100644 index 0000000000..92f16918e9 --- /dev/null +++ b/.github/workflows/inno_setup @@ -0,0 +1,51 @@ +name: Build Windows Installer +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + build: + name: Build the Inno Setup Installer + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: lukka/get-cmake@latest + - uses: ilammy/msvc-dev-cmd@v1 + + + - name: Cache DX SDK + id: dxcache + uses: actions/cache@v4 + with: + path: '${{ github.workspace }}/DX_SDK' + key: ${{ runner.os }}-DX_SDK + restore-keys: | + ${{ runner.os }}-DX_SDK + + - name: Download DXSetup + run: | + curl -s -o DXSDK_Jun10.exe --location https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe + cmd.exe /c start /wait .\DXSDK_Jun10.exe /U /O /F /S /P "${{ github.workspace }}\DX_SDK" + + - name: Set Windows specific CMake arguments + id: windows_extra_cmake_args + run: echo "::set-output name=args::-DASSIMP_BUILD_ASSIMP_TOOLS=1 -DASSIMP_BUILD_ASSIMP_VIEW=1 -DASSIMP_BUILD_ZLIB=1" + + - name: configure and build + uses: lukka/run-cmake@v3 + env: + DXSDK_DIR: '${{ github.workspace }}/DX_SDK' + + with: + cmakeListsOrSettingsJson: CMakeListsTxtAdvanced + cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' + cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Release ${{ steps.windows_extra_cmake_args.outputs.args }} ${{ steps.hunter_extra_cmake_args.outputs.args }}' + buildWithCMakeArgs: '--parallel 24 -v' + buildDirectory: '${{ github.workspace }}/build/' + + - name: Compile .ISS to .EXE Installer + uses: Minionguyjpro/Inno-Setup-Action@v1.2.5 + with: + path: packaging/windows-innosetup/script_x64.iss + options: /O+ diff --git a/.github/workflows/sanitizer.yml b/.github/workflows/sanitizer.yml index b23f4520fd..b4b06ba618 100644 --- a/.github/workflows/sanitizer.yml +++ b/.github/workflows/sanitizer.yml @@ -14,7 +14,7 @@ jobs: name: adress-sanitizer runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - uses: lukka/get-cmake@latest - uses: lukka/set-shell-env@v1 with: @@ -38,7 +38,7 @@ jobs: name: undefined-behavior-sanitizer runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - uses: lukka/get-cmake@latest - uses: lukka/set-shell-env@v1 with: @@ -46,7 +46,7 @@ jobs: CC: clang - name: configure and build - uses: lukka/run-cmake@v2 + uses: lukka/run-cmake@v3 with: cmakeListsOrSettingsJson: CMakeListsTxtAdvanced cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' @@ -62,7 +62,7 @@ jobs: name: printf-sanitizer runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: run scan_printf script run: ./scripts/scan_printf.sh diff --git a/.gitignore b/.gitignore index 09d631ee8d..68b6e8de4f 100644 --- a/.gitignore +++ b/.gitignore @@ -120,3 +120,9 @@ tools/assimp_qt_viewer/ui_mainwindow.h #Generated directory generated/* + +# 3rd party cloned repos/tarballs etc +# meshlab repo, automatically cloned via CMake (to gain 2 source files for VRML file format conversion) +contrib/meshlab/autoclone +# tinyusdz repo, automatically cloned via CMake +contrib/tinyusdz/autoclone diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000000..effbee0ab2 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,207 @@ +# AGENTS.md - Agent Guidelines for Assimp + +This document provides guidelines for AI agents working on the Assimp codebase. + +## Project Overview + +Assimp (Open Asset Import Library) is a C++ library that loads various 3D file formats into a shared, in-memory format. It supports 40+ import formats and several export formats. + +## Build Commands + +### Basic Build (CMake + Ninja recommended) +```bash +# Configure with CMake +cmake -G Ninja -DASSIMP_BUILD_TESTS=ON -DASSIMP_WARNINGS_AS_ERRORS=ON -S . -B build + +# Build +cmake --build build +``` + +### Key CMake Options +- `-DASSIMP_BUILD_TESTS=ON` - Build unit tests (default ON) +- `-DASSIMP_WARNINGS_AS_ERRORS=ON` - Treat warnings as errors (default ON) +- `-DASSIMP_BUILD_ASSIMP_TOOLS=ON` - Build command-line tools +- `-DASSIMP_BUILD_SAMPLES=ON` - Build sample applications +- `-DASSIMP_DOUBLE_PRECISION=ON` - Use double precision for calculations +- `-DASSIMP_NO_EXPORT=ON` - Disable export functionality +- `-DBUILD_SHARED_LIBS=OFF` - Build static library + +### Running Tests + +#### Run All Tests +```bash +# Using ctest +cd build && ctest + +# Or run unit directly +./build/unit +``` + +#### Run Single Test +```bash +# Using ctest with filter +cd build && ctest -R "TestName" + +# Or run unit with filter +./build/unit --gtest_filter="TestSuiteName.TestName" +``` + +For example: +```bash +./build/unit --gtest_filter="utObjImportExport.*" +./build/unit --gtest_filter="utMaterialSystem.*" +``` + +#### Test Directory +Tests are located in `test/unit/` and use Google Test. Test files are named `ut.cpp`. + +## Code Style + +### Formatting +- **Use clang-format** before committing. Run: `clang-format -i ` +- The project uses a `.clang-format` file at the root with LLVM-based style +- Key settings: + - Indent width: 4 spaces + - Tab width: 4, UseTab: Never + - ColumnLimit: 0 (no line length limit) + - BreakConstructorInitializers: AfterColon + - AccessModifierOffset: -4 + +### Header File Organization +```cpp +// Order of includes (use clang-format to enforce): +// 1. Module's own header +// 2. Other assimp headers (assimp/*) +// 3. External headers (contrib/*) +// 4. Standard library headers +// 5. System headers + +#include "Common/Importer.h" +#include +#include +#include "../contrib/some_lib/some.h" +#include +#include +``` + +### Naming Conventions +- **Classes/Types**: PascalCase (e.g., `Importer`, `aiScene`) +- **Functions**: PascalCase (e.g., `ReadFile`, `GetExtension`) +- **Variables**: camelCase (e.g., `scene`, `importStep`) +- **Constants**: kCamelCase or UPPER_SNAKE_CASE (e.g., `kMaxVertices`) +- **Member variables**: Often prefixed with `m_` (e.g., `mScene`) +- **Static variables**: Often prefixed with `s_` + +### File Naming +- **Header files**: PascalCase (e.g., `Importer.h`, `ScenePrivate.h`) +- **Source files**: PascalCase (e.g., `Importer.cpp`) +- **Test files**: Prefixed with `ut` (e.g., `utObjImportExport.cpp`) + +### C++ Guidelines + +#### Language Standard +- Minimum: C++17 +- Use modern C++ features (smart pointers, constexpr, etc.) + +#### Error Handling +- Use exceptions for recoverable errors (derived from `std::exception`) +- Use `ai_assert` for debugging assertions in code +- Return error codes from C API functions + +#### Classes +- Use `ai_enable_erasing` pattern for optional features +- Use PImpl idiom for ABI stability where appropriate + +#### Memory Management +- Use smart pointers (`std::unique_ptr`, `std::shared_ptr`) +- Prefer RAII patterns +- Document ownership semantics in function comments + +### Importers/Exporters + +#### Structure +Each importer typically has: +1. Header in `code/AssetLib//` +2. Implementation in `code/AssetLib//` +3. Registration in `code/Common/ImporterRegistry.cpp` +4. Unit tests in `test/unit/ImportExport/` + +#### Registration +```cpp +void GetImporterInstanceList(std::vector& out); +// Add to registry +out.push_back(new MyFormatImporter()); +``` + +### Post-Processing + +- Located in `code/PostProcessing/` +- Each process inherits from `BaseProcess` +- Implement `ExecuteOnScene` method + +### Documentation + +- Use Doxygen-style comments for public APIs +- Example: +```cpp +/// +/// Loads a file from disk. +/// +/// Path to the file. +/// Pointer to the imported scene. +aiScene* Importer::ReadFile(const char* pFile); +``` + +### Contributing + +1. Create a fork of assimp +2. Create a branch for your feature/fix +3. Run `clang-format` on modified files +4. Ensure tests pass +5. Open a PR against `master` branch + +## Directory Structure + +``` +code/ + AssetLib/ - Importers and exporters + CApi/ - C API wrapper + Common/ - Shared utilities + Geometry/ - Geometry processing + Material/ - Material handling + PostProcessing/ - Mesh post-processing +include/ - Public headers (assimp/) +test/ + unit/ - Unit tests + models/ - Test 3D models +test/ - Test data (non-BSD licensed) +contrib/ - Third-party libraries +``` + +## CI/CD + +The project runs CI on GitHub Actions: +- Builds on Linux and Windows +- Runs tests including memory leak detection +- Checks compiler warnings + +## Common Tasks + +### Adding a New Importer +1. Create `code/AssetLib//Importer.h` +2. Create `code/AssetLib//Importer.cpp` +3. Register in `code/Common/ImporterRegistry.cpp` +4. Add tests in `test/unit/ImportExport/` +5. Add to CMakeLists.txt if needed + +### Running Specific Test Suite +```bash +# Test specific importer +./build/unit --gtest_filter="utglTF2ImportExport.*" + +# Test post-processing +./build/unit --gtest_filter="utTriangulate.*" + +# Test math operations +./build/unit --gtest_filter="utMatrix4x4.*" +``` diff --git a/AIToolPolicy.md b/AIToolPolicy.md new file mode 100644 index 0000000000..e2920ced71 --- /dev/null +++ b/AIToolPolicy.md @@ -0,0 +1,172 @@ +# Asset-Importer-Lib AI Tool Use Policy + +## Policy + +Assimp's policy is that contributors can use whatever tools they would like to +craft their contributions, but there must be a **human in the loop**. +**Contributors must read and review all LLM-generated code or text before they +ask other project members to review it.** The contributor is always the author +and is fully accountable for their contributions. Contributors should be +sufficiently confident that the contribution is high enough quality that asking +for a review is a good use of scarce maintainer time, and they should be **able +to answer questions about their work** during review. + +We expect that new contributors will be less confident in their contributions, +and our guidance to them is to **start with small contributions** that they can +fully understand to build confidence. We aspire to be a welcoming community +that helps new contributors grow their expertise, but learning involves taking +small steps, getting feedback, and iterating. Passing maintainer feedback to an +LLM doesn't help anyone grow, and does not sustain our community. + +Contributors are expected to **be transparent and label contributions that +contain substantial amounts of tool-generated content**. Our policy on +labelling is intended to facilitate reviews, and not to track which parts of +Assimp are generated. Contributors should note tool usage in their pull request +description, commit message, or wherever authorship is normally indicated for +the work. For instance, use a commit message trailer like Assisted-by: . This transparency helps the community develop best practices +and understand the role of these new tools. + +This policy includes, but is not limited to, the following kinds of +contributions: + +- Code, usually in the form of a pull request +- RFCs or design proposals +- Issues or security vulnerabilities +- Comments and feedback on pull requests + +## Details + +To ensure sufficient self review and understanding of the work, it is strongly +recommended that contributors write PR descriptions themselves (if needed, +using tools for translation or copy-editing). The description should explain +the motivation, implementation approach, expected impact, and any open +questions or uncertainties to the same extent as a contribution made without +tool assistance. + +AI tools must not be used to fix GitHub issues labelled [`good first +issue`][good-first-issue]. These issues are generally not urgent, and are +intended to be learning opportunities for new contributors to get familiar with +the codebase. Whether you are a newcomer or not, fully automating the process +of fixing this issue squanders the learning opportunity and doesn't add much +value to the project. **Using AI tools to fix issues labelled as "good first +issues" is forbidden**. + +[good-first-issue]: https://github.com/llvm/llvm-project/issues/?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22 + +## Extractive Contributions + +The reason for our "human-in-the-loop" contribution policy is that processing +patches, PRs, RFCs, and comments to Assimp is not free -- it takes a lot of +maintainer time and energy to review those contributions! Sending the +unreviewed output of an Assimp to open source project maintainers *extracts* work +from them in the form of design and code review, so we call this kind of +contribution an "extractive contribution". + +Our **golden rule** is that a contribution should be worth more to the project +than the time it takes to review it. These ideas are captured by this quote +from the book [Working in Public][public] by Nadia Eghbal: + +[public]: https://press.stripe.com/working-in-public + +> \"When attention is being appropriated, producers need to weigh the costs and +> benefits of the transaction. To assess whether the appropriation of attention +> is net-positive, it's useful to distinguish between *extractive* and +> *non-extractive* contributions. Extractive contributions are those where the +> marginal cost of reviewing and merging that contribution is greater than the +> marginal benefit to the project's producers. In the case of a code +> contribution, it might be a pull request that's too complex or unwieldy to +> review, given the potential upside.\" \-- Nadia Eghbal + +Prior to the advent of LLMs, open source project maintainers would often review +any and all changes sent to the project simply because posting a change for +review was a sign of interest from a potential long-term contributor. While new +tools enable more development, it shifts effort from the implementor to the +reviewer, and our policy exists to ensure that we value and do not squander +maintainer time. + +Reviewing changes from new contributors is part of growing the next generation +of contributors and sustaining the project. We want the LLVM project to be +welcoming and open to aspiring compiler engineers who are willing to invest +time and effort to learn and grow, because growing our contributor base and +recruiting new maintainers helps sustain the project over the long term. Being +open to contributions and [liberally granting commit access][commit-access] +is a big part of how LLVM has grown and successfully been adopted all across +the industry. We therefore automatically post a greeting comment to pull +requests from new contributors and encourage maintainers to spend their time to +help new contributors learn. + +[commit-access]: https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access + +## Handling Violations + +If a maintainer judges that a contribution doesn't comply with this policy, +they should paste the following response to request changes: + + This PR doesn't appear to comply with our policy on tool-generated content, + and requires additional justification for why it is valuable enough to the + project for us to review it. Please see our developer policy on + AI-generated contributions: http://llvm.org/docs/AIToolPolicy.html + +The best ways to make a change less extractive and more valuable are to reduce +its size or complexity or to increase its usefulness to the community. These +factors are impossible to weigh objectively, and our project policy leaves this +determination up to the maintainers of the project, i.e. those who are doing +the work of sustaining the project. + +If or when it becomes clear that a GitHub issue or PR is off-track and not +moving in the right direction, maintainers should apply the `extractive` label +to help other reviewers prioritize their review time. + +If a contributor fails to make their change meaningfully less extractive, +maintainers should escalate to the relevant moderation or admin team for the +space (GitHub, Discourse, Discord, etc) to lock the conversation. + +## Copyright + +Artificial intelligence systems raise many questions around copyright that have +yet to be answered. Our policy on AI tools is similar to our copyright policy: +Contributors are responsible for ensuring that they have the right to +contribute code under the terms of our license, typically meaning that either +they, their employer, or their collaborators hold the copyright. Using AI tools +to regenerate copyrighted material does not remove the copyright, and +contributors are responsible for ensuring that such material does not appear in +their contributions. Contributions found to violate this policy will be removed +just like any other offending contribution. + +## Examples + +Here are some examples of contributions that demonstrate how to apply +the principles of this policy: + +- [This PR][alive-pr] contains a proof from Alive2, which is a strong signal of + value and correctness. +- This [generated documentation][gsym-docs] was reviewed for correctness by a + human before being posted. + +[alive-pr]: https://github.com/llvm/llvm-project/pull/142869 +[gsym-docs]: https://discourse.llvm.org/t/searching-for-gsym-documentation/85185/2 + +## References + +Our policy was informed by experiences in other communities: + +- [Fedora Council Policy Proposal: Policy on AI-Assisted Contributions (fetched + 2025-10-01)][fedora]: Some of the text above was copied from the Fedora + project policy proposal, which is licensed under the [Creative Commons + Attribution 4.0 International License][cca]. This link serves as attribution. +- [Rust draft policy on burdensome PRs][rust-burdensome] +- [Seth Larson's post][security-slop] + on slop security reports in the Python ecosystem +- The METR paper [Measuring the Impact of Early-2025 AI on Experienced + Open-Source Developer Productivity][metr-paper]. +- [QEMU bans use of AI content generators][qemu-ban] +- [Slop is the new name for unwanted AI-generated content][ai-slop] + +[fedora]: https://communityblog.fedoraproject.org/council-policy-proposal-policy-on-ai-assisted-contributions/ +[cca]: https://creativecommons.org/licenses/by/4.0/ +[rust-burdensome]: https://github.com/rust-lang/compiler-team/issues/893 +[security-slop]: https://sethmlarson.dev/slop-security-reports +[metr-paper]: https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/ +[qemu-ban]: https://www.qemu.org/docs/master/devel/code-provenance.html#use-of-ai-content-generators +[ai-slop]: https://simonwillison.net/2024/May/8/slop/ diff --git a/Build.md b/Build.md index 957031b5fe..7baca6df27 100644 --- a/Build.md +++ b/Build.md @@ -1,36 +1,12 @@ # Build / Install Instructions -## Install on all platforms using vcpkg -You can download and install assimp using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager: -```bash - git clone https://github.com/Microsoft/vcpkg.git - cd vcpkg - ./bootstrap-vcpkg.sh - ./vcpkg integrate install - ./vcpkg install assimp -``` -The assimp port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. - -## Install on Ubuntu -You can install the Asset-Importer-Lib via apt: -``` -sudo apt-get update -sudo apt-get install libassimp-dev -``` - -## Install pyassimp -You need to have pip installed: -``` -pip install pyassimp -``` - ## Manual build instructions - -### Install CMake -Asset-Importer-Lib can be built for a lot of different platforms. We are using cmake to generate the build environment for these via cmake. So you have to make sure that you have a working cmake-installation on your system. You can download it at https://cmake.org/ or for linux install it via -```bash -sudo apt-get install cmake -``` +### Install prerequisites +You need to install +* cmake +* Your compiler (must support C++17 and C99 at least) +* For Windows + * DX-SDK 9 if you want to use our 3D-Viewer ### Get the source Make sure you have a working git-installation. Open a command prompt and clone the Asset-Importer-Lib via: @@ -38,15 +14,23 @@ Make sure you have a working git-installation. Open a command prompt and clone t git clone https://github.com/assimp/assimp.git ``` ### Build from source: +* For *assimp.lib* without any tools: ```bash cd assimp -cmake CMakeLists.txt +cmake CMakeLists.txt cmake --build . ``` -### Build instructions for Windows with Visual-Studio +* For assimp with the common tools like *assimp-cmd* +```bash +cd assimp +cmake CMakeLists.txt -DASSIMP_BUILD_ASSIMP_TOOLS=ON +cmake --build . +``` +Note that by default this builds a shared library into the `bin` directory. If you want to build it as a static library see the build options at the bottom of this file. -First, you have to install Visual-Studio on your windows-system. You can get the Community-Version for free here: https://visualstudio.microsoft.com/de/downloads/ +### Build instructions for Windows with Visual-Studio +First, you have to install Visual-Studio on your windows-system. You can get the Community-Version for free [here](https://visualstudio.microsoft.com/downloads/) To generate the build environment for your IDE open a command prompt, navigate to your repo and type: ```bash cmake CMakeLists.txt @@ -56,19 +40,8 @@ This will generate the project files for the visual studio. All dependencies use ### Build instructions for Windows with UWP See -### Build instructions for Linux / Unix -Open a terminal and got to your repository. You can generate the makefiles and build the library via: - -```bash -cmake CMakeLists.txt -make -j4 -``` -The option -j describes the number of parallel processes for the build. In this case make will try to use 4 cores for the build. - -If you want to use an IDE for linux you can try QTCreator for instance. - ### Build instructions for MinGW - Older versions of MinGW's compiler (e.g. 5.1.0) do not support the -mbig_obj flag + Older versions of MinGW's compiler (e.g. 5.1.0) do not support the -mbig_obj flag required to compile some of assimp's files, especially for debug builds. Version 7.3.0 of g++-mingw-w64 & gcc-mingw-w64 appears to work. @@ -94,7 +67,7 @@ The cmake-build-environment provides options to configure the build. The followi - **ASSIMP_NO_EXPORT (default OFF)**: Disable Assimp's export functionality. - **ASSIMP_BUILD_ZLIB (default OFF)**: Build our own zlib. - **ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT (default ON)**: Build Assimp with all exporters enabled. -- **ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT (default ON)**: Build Assimp with all importers enabled. +- **ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT (default ON)**: Build Assimp with (most) importers enabled. Currently, USD importer is not included. See ASSIMP_BUILD_USD_IMPORTER. - **ASSIMP_BUILD_ASSIMP_TOOLS (default OFF)**: If the supplementary tools for Assimp are built in addition to the library. - **ASSIMP_BUILD_SAMPLES (default OFF)**: If the official samples are built as well (needs Glut). - **ASSIMP_BUILD_TESTS (default ON)**: If the test suite for Assimp is built in addition to the library. @@ -110,3 +83,32 @@ The cmake-build-environment provides options to configure the build. The followi - **USE_STATIC_CRT (default OFF)**: Link against the static MSVC runtime libraries. - **ASSIMP_BUILD_DRACO (default OFF)**: Build Draco libraries. Primarily for glTF. - **ASSIMP_BUILD_ASSIMP_VIEW (default ON, if DirectX found, OFF otherwise)**: Build Assimp view tool (requires DirectX). +- **ASSIMP_BUILD_USD_IMPORTER (default OFF, requires ASSIMP_WARNINGS_AS_ERRORS to be OFF)**: Build USD importer, defaults to off for CI purposes + +### Install prebuild binaries +## Install on all platforms using vcpkg +You can download and install assimp using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager: +```bash + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + ./vcpkg install assimp +``` +The assimp port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. + +### Install on Ubuntu +You can install the Asset-Importer-Lib via apt: +``` +sudo apt-get update +sudo apt-get install libassimp-dev +``` + +### Install pyassimp +You need to have pip installed: +``` +pip install pyassimp +``` + +### Get the SDK from itch.io +Just check [itch.io](https://kimkulling.itch.io/the-asset-importer-lib) diff --git a/CHANGES b/CHANGES deleted file mode 100644 index c0c73b98c9..0000000000 --- a/CHANGES +++ /dev/null @@ -1,607 +0,0 @@ ----------------------------------------------------------------------- -CHANGELOG ----------------------------------------------------------------------- -4.1.0 (2017-12): -- FEATURES: - - Export 3MF ( experimental ) - - Import / Export glTF 2 - - Introduce new zib-lib to eb able to export zip-archives -- FIXES/HOUSEKEEPING: - - Added missing include to stdlib.h and remove load library call - - Fix install for builds with MSVC compiler and NMake. - - Update list of supported file formats. - - Add TriLib to the official list of supported ports. - - Re-enabling PACK_STRUCT for MDL files. - - Use std.::unique_ptr - - Update D3MFExporter.h - - Update MD3Loader.cpp, using index - - Fix all warnings on MSVC14 - - Copy assimp dll to unit folder on windows - - Update jvm port supported formats - - Add support for building Mac OS X Framework bundles - - Check for nullptr dereferencing before copying scene data - - Update ValidateDataStructure.h, typo - - Enable data structure validation in cases where it doesn't cause failures - - Remove some dead assignments - - fast_atof: Silence some uninitialized variable warnings - - Check for area test if the face is a triangle. - - Set mNumUVComponents to 0 when deleting texture coordinate sets - - Only scale the root node because this will rescale all children nodes as well. - - Issue 1514: Fix frame pointer arithmetic - - Prevent failing stringstream to crash the export process - - powf -> pow - - add Defines.h to include folder for install. - - Android: - - Fix android build - - Fix assimp for cross compile for android - - Use define for D_FILE_OFFSET_BITS only for not-android systems. - - FBX: - - Fix handling with embedded textures - - FBX 7500 Binary reading - - Remove dead assignment - - Fix export of deleted meshes; Add LazyDict::Remove method - - Log an error instead of letting the fbx-importer crash. ( issue 213 ) - - Replace bad pointer casting with memcpy - - Remove useless const qualifier from return value - - Add explicit instantiation of log_prefix so other FBX source files can see it - - add missing inversion of postrotation matrix for fbx. - - FIReader: Silence uninitialized variable warning - - Update version check in FBX reader to check for version >= 7500 - - Use actual min/max of anim keys when start/stop time is missing -- GLTF1: - - Fix output of glTF 1 version string - - Fix delete / delete[] mismatch in glTFAsset - - Don’t ignore rgba(1,1,1,1) color properties - - glTF2 primitives fixes - - Don’t ignore rgba(1,1,1,1) color properties - - Fix delete / delete[] mismatch in glTFAsset - - Remove KHR_binary_glTF code - - glTF nodes can only hold one mesh. this simply assigns to and check’s a Node’s Mesh - - version in glb header is stored as uint32_t -- GLTF2: - - node name conflict fix - - Fix transform matrices multiplication order - - Preserve node names when importing - - Add support for tangents in import - - Fix typo on gltf2 camera parameters - - Moved byteStride from accessor to bufferView - - Implemented reading binary glTF2 (glb) files - - Fix signed/unsigned warning - - Add postprocess step for scaling - - Fix shininess to roughness conversion - - Prefer “BLEND” over “MASK” as an alphaMode default - - Approximate specularity / glossiness in metallicRoughness materials - - Diffuse color and diffuse texture import and export improvements - - Addressed some mismatched news/deletes caused by the new glTF2 sources. - - Fix delete / delete[] mismatches in glTF2 importer - - use correct name of exporter to gltf2 - - Fix possible infinite loop when exporting to gltf2 - - Fix glTF2::Asset::FindUniqueID() when the input string is >= 256 chars - - Fix glTF2 alphaMode storage and reading - - Fix glTF 2.0 multi-primitive support - - Load gltf .bin files from correct directory - - Add support for importing both glTF and glTF2 files - - ampler improvements; Add new LazyDict method - - Changes to GLTF2 materials - - Remove Light, Technique references - - Start removing materials common, and adding pbrSpecularGlossiness - - Use !ObjectEmpty() vs. MemberCount() > 0 - - Working read, import, export, and write of gltf2 (pbr) material - - Check in gltf2 models to test directory - - Remove un-needed test models - - Start managing and importing gltf2 pbr materials - - Update glTF2 Asset to use indexes - - Duplicate gltfImporter as gltf2Importer; Include glTF2 importer in CMake List - - glTF2: Fix animation export - - use opacity for diffuse alpha + alphaMode -- STL: - - Restore import of multi mesh binary STLs -- Blender: - - Silence warning about uninitialized member -- MDLImporter: - - Don't take address of packed struct member -- assimp_cmd: - - Fix strict-aliasing warnings -- Open3DGC: - - Fix strict-aliasing warnings - - Add assertions to silence static analyzer warnings - - Remove redundant const qualifiers from return types - - Fix some uninitialized variable warnings - - Remove OPEN3DGC and compression references -- unzip: - - Remove dead assignment - - Bail on bad compression method - - Fix possibly uninitialized variables -- clipper: - - Add assertion to silence a static analyzer warning -- OpenDDLExport: - - Reduce scope of a variable - - Remove dead variable - - Remove dead assignment - - Fix another potential memory leak -- X3DImporter: - - Add assertions to silence static analyzer warnings - - Add missing unittest - - Workaround for buggy Android NDK (issue #1361) -- TerragenLoader: - - Remove unused variable -- SIBImporter: - - Add assertions to silence static analyzer warnings -- IFC: - - Remove dead code - - Add explicit instantiation of log_prefix so IFCMaterial.cpp can see it -- PLY: - - Remove dead assignment and reduce scope of a variable - - fix vertex attribute lookup. -- OpenGEX: - - Add assertion to silence a static analyzer warning - - Fix for TextureFile with number in file name - - Return early when element is TextureFile -- NFF: - - Add assertions to silence static analyzer warnings - - Split up some complicated assignments -- Raw: Fix misleading indentation warning - - Reduce scope of a variable -- LWO - - Reduce scope of a variable -- IRRLoader: - - Fix confusing boolean casting -- AssbinExporter: - - Add assertion to silence a static analyzer warning -- ASE: - - Add assertion to silence a static analyzer warning -- AMFImporter: - - Add assertion to silence a static analyzer warning - - Add a block -- OptimizeGraph: - - Fix possible null pointer dereference - - RemoveRedundantMaterials: - - Add assertion to silence a static analyzer warning -- ImproveCacheLocality: - - Add assertion to silence a static analyzer warning -- RemoveRedundantMaterials: - - Set pointer to nullptr after deleting it -- Travis: - - Disable unit tests in scan-build config - - Move slower builds earlier to improve parallelization - - Add static analysis to build - - Remove unused branch rule for travis. - - Add Clang UBSan build configuration - - Treat warnings as errors, without typos this time -- Unittests: - - Add VS-based source groups for the unittests. -- Collada: - - export tag - - Update ColladaExporter.cpp - - Silence uninitialized variable warning - - Add support for line strip primitives -- Obj Wavefront: - - check in exporting against out-of-bounds-access . - - Issue 1351: use correct name for obj-meshname export for groups. - - fix mem-lead: face will be not released in case of an error. - - Anatoscope obj exporter nomtl - - Raise exception when obj file contains invalid face indices - - Added alternative displacement texture token in OBJ MTL material. - - Obj: rename attribute from exporter. - - Fix OBJ discarding all material names if the material library is missing -- Step: - - use correct lookup for utf32 -- MD2: - - Fix MD2 frames containing garbage -- STL - - add missing const. - - Fix memory-alignment bug. - - Fix issue 104: deal with more solids in one STL file. -- CMake - - Fix issue 213: use correct include folder for assimp -- Doxygen - - Fix issue 1513: put irrXML onto exclucde list for doxygen run -- PyAssimp: - - Search for libassimp.so in LD_LIBRARY_PATH if available. - - Fix operator precedence issue in header check - - Split setup.py into multiple lines - - Detect if Anaconda and fixed 3d_viewer for Python 3 - - created a python3 version of the 3dviewer and fixed the / = float in py3 -- Blender: - - Fix invalid access to mesh array when the array is empty. - - Fix short overflow. - - Silence warning about inline function which is declared but not defined -- JAssimp - - Changed license header for IHMC contributions from Apache 2.0 to BSD - - Add Node metadata to the Jassmip Java API - - Added supported for custom IO Systems in Java. Implemented ClassLoader IO System - - Added a link to pure jvm assimp port -- Clang sanitizer: - - Undefined Behavior sanitizer - - Fixed a divide by zero error in IFCBoolean that was latent, but nevertheless a bug -- B3DImporter: - - Replace bad pointer casting with memcpy -- AppVeyor: - - Cleanup and Addition of VS 2017 and running Tests - - Fixed File Size reported as 0 in tests that use temporary files - - x86 isn't a valid VS platform. Win32 it is, then. - - Replaced the worker image name, which doesn't work as generator name, with a manually created generator name. - - Cleaned up appveyor setup, added VS 2017 to the build matrix and attempted to add running of tests. - - Treat warnings as errors on Appveyor - - Disable warning 4351 on MSVC 2013 -- OpenGEXImporter: - - Copy materials to scene - - Store RefInfo in unique_ptr so they get automatically cleaned up - - Fix IOStream leak - - Store ChildInfo in unique_ptr so they get automatically cleaned up - - improve logging to be able to detect error-prone situations. -- AMFImporter: - - Fix memory leak -- UnrealLoader: - - Fix IOStream leak -- Upgrade RapidJSON to get rid of a clang warning -- zlib: - - Update zlib contribution - - Removed unnecessary files from zlib contribution - - Replaced unsigned long for the crc table to z_crc_t, to match what is returned by get-crc_table -- MakeVerboseFormat: - - Fix delete / delete[] mismatches in MakeVerboseFormat -- MaterialSystem: - - Fix out-of-bounds read in MaterialSystem unit test -- SIB: - - Added support for SIB models from Silo 2.5 -- AssbinExporter: - - Fix strict aliasing violation - - Add Write specialization for aiColor3D -- DefaultLogger: - - Whitespace cleanup to fix GCC misleading indentation warning -- MDP: - - Fix encoding issues. - - PreTransformVertices: - - fix name lost in mesh and nodes when load with flag -- C4D: - - Fixes for C4D importer -- Unzip: - - Latest greatest. - -4.0.1 (2017-07-28) - - FIXES/HOUSEKEEPING: - - fix version test. - - Not compiling when using ASSIMP_DOUBLE_PRECISION - - Added support for python3 - - Check if cmake is installed with brew - - Low performance in OptimizeMeshesProcess::ProcessNode with huge numbers of meshes - - Elapsed seconds not shown correctly - - StreamReader: fix out-of-range exception - - PPdPmdParser: fix compilation for clang - - -4.0.0 (2017-07-18) - -FEATURES: - - Double precision support provided ( available via cmake option ) - - QT-Widget based assimp-viewer ( works for windows, linux, osx ) - - Open3DGC codec supported by glFT-importer - - glTF: Read and write transparency values - - Add Triangulate post-processing step to glTF exporters - - Update rapidjson to v1.0.2 - - Added method to append new metadata to structure - - Unittests: intoduce a prototype model differ - - X3D support - - AMF support - - Lugdunum3D support - - Obj-Importer: obj-homogeneous_coords support - - Obj-Importer: new streaming handling - - Added support for 64 bit version header introduced in FbxSdk2016 - - Travis: enable coverall support. - - PyAssimp: New version of the pyASSIMP 3D viewer, with much improved 3D controls - - Morph animation support for collada - - Added support for parameters Ni and Tf in OBJ/MTL file format - - aiScene: add method to add children - - Added new option to IFC importer to control tessellation angle + removed unused IFC option - - aiMetaData: introduce aiMetaData::Dealloc - - Samples: add a DX11 example - - travis ci: test on OXS ( XCode 6.3 ) as well - - travis ci: enable sudo support. - - openddlparser: integrate release v0.4.0 - - aiMetaData: Added support for metadata in assbin format - -FIXES/HOUSEKEEPING: - - Introduce usage of #pragma statement - - Put cmake-scripts into their own folder - - Fix install pathes ( issue 938 ) - - Fix object_compare in blender importer( issue 946 ) - - Fix OSX compilation error - - Fix unzip path when no other version was found ( issue 967 ) - - Set _FILE_OFFSET_BITS=64 for 32-bit linux ( issue 975 ) - - Fix constructor for radjson on OSX - - Use Assimp namespace to fix build for big-endian architectures - - Add -fPIC to C Flags for 64bit linux Shared Object builds - - MDLLoader: fix resource leak. - - MakeVerboseFormat: fix invalid delete statement - - IFC: fix possible use after free access bug - - ComputeUVMappingprocess: add missing initialization for scalar value - - Fix invalid release of mat + mesh - - IrrImporter: Fix release functions - - Split mesh before exporting gltf ( issue 995 ) - - 3MFImporter: add source group for visual studio - - IFC: Switch generated file to 2 files to fix issue related to and ( issue 1084 ) - - OBJParser: set material index when changing current material - - OBJ: check for null mesh before updating material index - - add vertex color export support ( issue 809 ) - - Fix memory leak in Collada importer ( issue 1169 ) - - add stp to the list of supported extensions for step-files ( issue 1183 ) - - fix clang build ( Issue-1169 ) - - fix for FreeBSD - - Import FindPkgMacros to main CMake Configuration - - Extended support for tessellation parameter to more IFC shapes - - defensice handling of utf-8 decode issues ( issue 1211 ) - - Fixed compiler error on clang 4.0 running on OSX - - use test extension for exported test files ( issue 1228 ) - - Set UVW index material properties for OBJ files - - Fixed no member named 'atop' in global namespace issue for Android NDK compilation - - Apply mechanism to decide use for IrrXML external or internal - - Fix static init ordering bug in OpenGEX importer - - GLTF exporter: ensure animation accessors have same count - - GLTF exporter: convert animation time from ticks to seconds - - Add support for reading texture coordinates from PLY meshes with properties named 'texture_u' and 'texture_v' - - Added TokensForSearch in BlenderLoader to allow CanRead return true for in-memory files. - - fix wrong delete ( issue 1266 ) - - OpenGEX: fix invalid handling with color4 token ( issue 1262 ) - - LWOLoader: fix link in loader description - - Fix error when custom CMAKE_C_FLAGS is specified - - Fast-atof: log overflow errors - - Obj-Importer: do not break when detecting an overflow ( issue 1244 ) - - Obj-Importer: fix parsing of multible line data definitions - - Fixed bug where IFC models with multiple IFCSite only loaded 1 site instead of the complete model - - PLYImporter: - optimize memory and speed on ply importer / change parser to use a file stream - manage texture path in ply - import - manage texture coords on faces in ply import - correction on point cloud faces generation - - Utf8: integrate new lib ( issue 1158 ) - - fixed CMAKE_MODULE_PATH overwriting previous values - - OpenGEX: Fixed bug in material color processing ( issue 1271 ) - - SceneCombiner: move header for scenecombiner to public folder. - - GLTF exporter: ensure buffer view byte offsets are correctly aligned - - X3D importer: Added EXPORT and IMPORT to the list of ignored XML tags - - X3D Exporter: fixed missing attributes - - X3D importer: Fixed import of normals for the single index / normal per vertex case - - X3D importer: Fixed handling of inlined files - - X3D importer: fixed whitespace handling (issue 1202) - - X3D importer: Fixed iterator on MSVC 2015 - - X3D importer: Fixed problems with auto, override and regex on older compilers - - X3D importer: Fixed missing header file - - X3D importer: Fixed path handling - - X3D importer: Implemented support for binary X3D files - - fix build without 3DS ( issue 1319 ) - - pyassimp: Fixed indices for IndexedTriangleFanSet, IndexedTriangleSet and IndexedTriangleStripSet - - Fixes parameters to pyassimp.load - - Obj-Importe: Fixed texture bug due simultaneously using 'usemtl' and 'usemap' attributes - - check if all exporters are disabled ( issue 1320 ) - - Remove std functions deprecated by C++11. - - X-Importer: make it deal with lines - - use correct path for compilers ( issue 1335 ) - - Collada: add workaround to deal with polygon with holes - - update python readme - - Use unique node names when loading Collada files - - Fixed many FBX bugs - -API COMPATIBILITY: - - Changed ABI-compatibility to v3.3.1, please rebuild your precompiled libraries ( see issue 1182 ) - - VS2010 outdated - -3.3.1 (2016-07-08) - -FIXES/HOUSEKEEPING: - - Setup of default precision for 17 exporters - - Fix xcode project files - - Fix BlenderTesselator: offsetof operator - - Invalid version in cmake file - - Update pstdint.h to latest greatest - - -3.3.0 (2016-07-05) - -FEATURES: - - C++11 support enabled - - New regression-test-UI - - Experimental glTF-importer support - - OpenGEX: add support for cameras and lights - - C4D: update to latest Melange-SDK - - Add a gitter channel - - Coverity check enabled - - Switch to <...> include brackets for public headers - - Enable export by pyAssimp - - CI: check windows build - - Add functionality to perform a singlepost-processing step - - many more, just check the history - -FIXES/HOUSEKEEPING: - - Fix of many resource leaks in unittests and main lib - - Fix iOS-buildfor X64 - - Choosing zlib manually for cmake - - many more, just check the history - - -3.2.1 (2016-010-10) - -FEATURES: - - Updated glTF exporter to meet 1.0 specification. - -FIXES/HOUSEKEEPING: - - Fixed glTF Validator errors for exported glTF format. - -ISSUES: - - Hard coded sampler setting for - - magFilter - - minFilter - - void* in ExportData for accessor max and min. - - -3.2.0 (2015-11-03) - -FEATURES: - - OpenDDL-Parser is part of contrib-source. - - Experimental OpenGEX-support - - CI-check for linux and windows - - Coverity check added - - New regression testsuite. - -FIXES/HOUSEKEEPING: - - Hundreds of bugfixes in all parts of the library - - Unified line endings - - -API COMPATIBILITY: - - Removed precompiled header to increase build speed for linux - - -3.1.1 (2014-06-15) - -FEATURES: - - Support for FBX 2013 and newer, binary and ASCII (this is partly - work from Google Summer of Code 2012) - - Support for OGRE binary mesh and skeleton format - - Updated BLEND support for newer Blender versions - - Support for arbitrary meta data, used to hold FBX and DAE metadata - - OBJ Export now produces smaller files - - Meshes can now have names, this is supported by the major importers - - Improved IFC geometry generation - - M3 support has been removed - -FIXES/HOUSEKEEPING: - - Hundreds of bugfixes in all parts of the library - - CMake is now the primary build system - -API COMPATIBILITY: - - 3.1.1 is not binary compatible to 3.0 due to aiNode::mMetaData - and aiMesh::mName - - Export interface has been cleaned up and unified - - Other than that no relevant changes - - -3.0 (2012-07-07) - -FEATURES: - - new export interface similar to the import API. - - Supported export formats: Collada, OBJ, PLY and STL - - added new import formats: XGL/ZGL, M3 (experimental) - - new postprocessing steps: Debone - - vastly improved IFC (Industry Foundation Classes) support - - introduced API to query importer meta information (such as supported - format versions, full name, maintainer info). - - reworked Ogre XML import - - C-API now supports per-import properties - -FIXES/HOUSEKEEPING: - - - hundreds of bugfixes in all parts of the library - - unified naming and cleanup of public headers - - improved CMake build system - - templatized math library - - reduce dependency on boost.thread, only remaining spot - is synchronization for the C logging API - -API COMPATIBILITY: - - renamed headers, export interface, C API properties and meta data - prevent compatibility with code written for 2.0, but in - most cases these can be easily resolved - - Note: 3.0 is not binary compatible with 2.0 - - -2.0 (2010-11-21) - -FEATURES: - - Add support for static Blender (*.blend) scenes - - Add support for Q3BSP scenes - - Add a windows-based OpenGL sample featuring texturing & basic materials - - Add an experimental progress feedback interface. - - Vastly improved performance (up to 500%, depending on mesh size and - spatial structure) in some expensive postprocessing steps - - AssimpView now uses a reworked layout which leaves more space - to the scene hierarchy window - - - Add C# bindings ('Assimp.NET') - - Keep BSD-licensed and otherwise free test files in separate - folders (./test/models and ./test/models-nonbsd). - -FIXES: - - Many Collada bugfixes, improve fault tolerance - - Fix possible crashes in the Obj loader - - Improve the Ogre XML loader - - OpenGL-sample now works with MinGW - - Fix Importer::FindLoader failing on uppercase file extensions - - Fix flawed path handling when locating external files - - Limit the maximum number of vertices, faces, face indices and - weights that Assimp is able to handle. This is to avoid - crashes due to overflowing counters. - - - Updated XCode project files - - Further CMAKE build improvements - - -API CHANGES: - - Add data structures for vertex-based animations (These are not - currently used, however ...) - - Some Assimp::Importer methods are const now. - - -1.1 (2010-04-17) -This is the list of relevant changes from the 1.0 (r412) release to 1.1 (r700). - -FEATURES: - - Vastly improved Collada support - - Add MS3D (Milkshape 3D) support - - Add support for Ogre XML static meshes - - Add experimental COB (TrueSpace) support - - Automatic test suite to quickly locate regressions - - D bindings (`dAssimp`) - - Python 2.n bindings (`PyAssimp`) - - Add basic support for Unicode input files (utf8, utf16 and utf32) - - Add further utilities to the `assimp` tool (xml/binary dumps, quick file stats) - - Switch to a CMAKE-based build system including an install target for unix'es - - Automatic evaluation of subdivision surfaces for some formats. - - Add `Importer::ReadFileFromMemory` and the corresponding C-API `aiReadFileFromMemory` - - Expose further math utilities via the C-API (i.e. `aiMultiplyMatrix4`) - - - Move noboost files away from the public include directory - - Many, many bugfixes and improvements in existing loaders and postprocessing steps - - Documentation improved and clarified in many places. - - Add a sample on using Assimp in conjunction with OpenGL - - - Distribution/packaging: comfortable SDK installer for Windows - - Distribution/packaging: improved release packages for other architectures - -CRITICAL FIXES: - - Resolve problems with clashing heap managers, STL ABIs and runtime libraries (win32) - - Fix automatic detection of file type if no file extension is given - - Improved exception safety and robustness, prevent leaking of exceptions through the C interface - - Fix possible heap corruption due to material properties pulled in incorrectly - - Avoid leaking in certain error scenarios - - Fix 64 bit compatibility problems in some loaders (i.e. MDL) - -BREAKING API CHANGES: - - None - - -MINOR API BEHAVIOUR CHANGES: - - Change quaternion orientation to suit to the more common convention (-w). - - aiString is utf8 now. Not yet consistent, however. diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000000..38448249f8 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,3961 @@ +---------------------------------------------------------------------- +CHANGELOG +---------------------------------------------------------------------- +# 6.0.2 +## What's Changed +* Fix export fbx: Wrong Materials in LayerElementMaterial if a node contains multi meshes by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/6103 +* Fix compile error when ASSIMP_DOUBLE_PRESICION enable by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/6091 +* Updated Inner Cone formula for Spot Lights in GLTF by @crazyjackel in https://github.com/assimp/assimp/pull/6078 +* Update/update pugi xml by @kimkulling in https://github.com/assimp/assimp/pull/6229 +* Fixes CVE-2025-2751: Out-of-bounds Read in Assimp::CSMImporter::InternReadFile (closes #6012) by @VinzSpring in https://github.com/assimp/assimp/pull/6224 +* Fixes CVE-2025-2757: Heap-based Buffer Overflow in AI_MD5_PARSE_STRING_IN_QUOTATION (closes #6019) by @VinzSpring in https://github.com/assimp/assimp/pull/6223 +* Fixes CVE-2025-2750: out of bounds write by assigning to wrong array element count tracking (closes #6011) by @VinzSpring in https://github.com/assimp/assimp/pull/6225 +* fix-CVE-2025-3158: closes #6023 Fixes CVE-2025-3158: Heap-based Buffer Overflow in Assimp::LWO::AnimResolver::UpdateAnimRangeSetup by @VinzSpring in https://github.com/assimp/assimp/pull/6222 +* Update SECURITY.md by @kimkulling in https://github.com/assimp/assimp/pull/6230 +* Fix the function aiGetMaterialColor when the flag ASSIMP_DOUBLE_PRECISION is enabled by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/6090 +* Prepare 6.0.2 by @kimkulling in https://github.com/assimp/assimp/pull/6231 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v6.0.1...v6.0.2 + +# 6.0.1 +## What's Changed +* Build + * Fix building on Haiku by @Begasus in https://github.com/assimp/assimp/pull/5255 +* Postprocessing + * Reduce memory consumption in JoinVerticesProcess::ProcessMesh() signi… by @ockeymm in https://github.com/assimp/assimp/pull/5252 +* Fix: Add check for invalid input argument by @kimkulling in https://github.com/assimp/assimp/pull/5258 +* Replace an assert by a error log. by @kimkulling in https://github.com/assimp/assimp/pull/5260 +* Extension of skinning data export to GLB/GLTF format by @fvbj in https://github.com/assimp/assimp/pull/5243 +* Fix output floating-point values to fbx by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/5265 +* Update ImproveCacheLocality.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5268 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5277 +* Deep arsdk bone double free by @kimkulling in https://github.com/assimp/assimp/pull/5291 +* Fix Spelling error by @JulianKnodt in https://github.com/assimp/assimp/pull/5295 +* use size in order to be compatible with float and double by @sloriot in https://github.com/assimp/assimp/pull/5270 +* Fix: Add missing transformation for normalized normals. by @kimkulling in https://github.com/assimp/assimp/pull/5301 +* Fix: Implicit Conversion Error by @Ipomoea in https://github.com/assimp/assimp/pull/5271 +* Fix add checks for indices by @kimkulling in https://github.com/assimp/assimp/pull/5306 +* Update FBXBinaryTokenizer.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5311 +* link to external minizip with full path by @aumuell in https://github.com/assimp/assimp/pull/5278 +* utf8 header not found by @TarcioV in https://github.com/assimp/assimp/pull/5279 +* Rm unnecessary deg->radian conversion in FBX exporter by @JulianKnodt in https://github.com/assimp/assimp/pull/5281 +* Fix empty mesh handling by @kimkulling in https://github.com/assimp/assimp/pull/5318 +* Refactoring: Some cleanups by @kimkulling in https://github.com/assimp/assimp/pull/5319 +* Fix invalid read of `uint` from `uvwsrc` by @JulianKnodt in https://github.com/assimp/assimp/pull/5282 +* Remove double delete by @kimkulling in https://github.com/assimp/assimp/pull/5325 +* fix mesh-name error. by @copycd in https://github.com/assimp/assimp/pull/5294 +* COLLADA fixes for textures in C4D input by @wmatyjewicz in https://github.com/assimp/assimp/pull/5293 +* Use the correct allocator for deleting objects in case of duplicate a… by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5305 +* Fix container overflow in MMD parser by @aavenel in https://github.com/assimp/assimp/pull/5309 +* Fix: PLY heap buffer overflow by @aavenel in https://github.com/assimp/assimp/pull/5310 +* Update Readme.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5312 +* Update Readme.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5313 +* Fix: Check if index for mesh access is out of range by @kimkulling in https://github.com/assimp/assimp/pull/5338 +* Update FBXConverter.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5349 +* FBX: Use correct time scaling by @kimkulling in https://github.com/assimp/assimp/pull/5355 +* Drop explicit inclusion of contrib/ headers by @umlaeute in https://github.com/assimp/assimp/pull/5316 +* Update Build.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5314 +* Fix buffer overflow in FBX::Util::DecodeBase64() by @ttxine in https://github.com/assimp/assimp/pull/5322 +* Readme.md: correct 2 errors in section headers by @stephengold in https://github.com/assimp/assimp/pull/5351 +* Fix double free in Video::~Video() by @ttxine in https://github.com/assimp/assimp/pull/5323 +* FBXMeshGeometry: solve issue #5116 using patch provided by darktjm by @stephengold in https://github.com/assimp/assimp/pull/5333 +* Fix target names not being imported on some gLTF2 models by @Futuremappermydud in https://github.com/assimp/assimp/pull/5356 +* correct grammar/typographic errors in comments (8 files) by @stephengold in https://github.com/assimp/assimp/pull/5343 +* KHR_materials_specular fixes by @rudybear in https://github.com/assimp/assimp/pull/5347 +* Disable Hunter by @kimkulling in https://github.com/assimp/assimp/pull/5388 +* fixed several issues by @MarkaRagnos0815 in https://github.com/assimp/assimp/pull/5359 +* Fix leak by @kimkulling in https://github.com/assimp/assimp/pull/5391 +* Check validity of archive without parsing by @kimkulling in https://github.com/assimp/assimp/pull/5393 +* Fix integer overflow by @kimkulling in https://github.com/assimp/assimp/pull/5394 +* Add a test before generating the txture folder by @kimkulling in https://github.com/assimp/assimp/pull/5400 +* Build: Disable building zlib for non-windows by @kimkulling in https://github.com/assimp/assimp/pull/5401 +* null check. by @copycd in https://github.com/assimp/assimp/pull/5402 +* Bump actions/upload-artifact from 3 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5384 +* fix: KHR_materials_pbrSpecularGlossiness/diffuseFactor convert to pbr… by @guguTang in https://github.com/assimp/assimp/pull/5410 +* fix building errors for MinGW by @0xf0ad in https://github.com/assimp/assimp/pull/5376 +* dynamic_cast error. by @copycd in https://github.com/assimp/assimp/pull/5406 +* Add missing IRR textures by @tellypresence in https://github.com/assimp/assimp/pull/5374 +* Update Dockerfile by @kimkulling in https://github.com/assimp/assimp/pull/5412 +* Fix handling of X3D IndexedLineSet nodes by @andre-schulz in https://github.com/assimp/assimp/pull/5362 +* Improve acc file loading by @IOBYTE in https://github.com/assimp/assimp/pull/5360 +* Readme.md: present hyperlinks in a more uniform style by @stephengold in https://github.com/assimp/assimp/pull/5364 +* FBX Blendshape `FullWeight: Vec` -> `FullWeight: Vec` by @JulianKnodt in https://github.com/assimp/assimp/pull/5441 +* Fix for issues #5422, #3411, and #5443 -- DXF insert scaling fix and colour fix by @seanth in https://github.com/assimp/assimp/pull/5426 +* Update StbCommon.h to stay up-to-date with stb_image.h. by @tigert1998 in https://github.com/assimp/assimp/pull/5436 +* Introduce aiBuffer by @kimkulling in https://github.com/assimp/assimp/pull/5444 +* Add bounds checks to the parsing utilities. by @kimkulling in https://github.com/assimp/assimp/pull/5421 +* Fix crash in viewer by @kimkulling in https://github.com/assimp/assimp/pull/5446 +* Static code analysis fixes by @kimkulling in https://github.com/assimp/assimp/pull/5447 +* Kimkulling/fix bahavior of remove redundat mats issue 5438 by @kimkulling in https://github.com/assimp/assimp/pull/5451 +* Fix X importer breakage introduced in commit f844c33 by @tellypresence in https://github.com/assimp/assimp/pull/5372 +* Fileformats.md: clarify that import of .blend files is deprecated by @stephengold in https://github.com/assimp/assimp/pull/5350 +* feat:1.add 3mf vertex color read 2.fix 3mf read texture bug by @GalenXiao in https://github.com/assimp/assimp/pull/5361 +* More GLTF loading hardening by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5415 +* Bump actions/cache from 3 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5431 +* Update CMakeLists.txt by @mosfet80 in https://github.com/assimp/assimp/pull/5379 +* `Blendshape`->`Geometry` in FBX Export by @JulianKnodt in https://github.com/assimp/assimp/pull/5419 +* Fix identity matrix check by @fvbj in https://github.com/assimp/assimp/pull/5445 +* Fix PyAssimp under Python >= 3.12 and macOS library search support by @Th3T3chn0G1t in https://github.com/assimp/assimp/pull/5397 +* Add ISC LICENSE file by @severin-lemaignan in https://github.com/assimp/assimp/pull/5465 +* ColladaParser: check values length by @etam in https://github.com/assimp/assimp/pull/5462 +* Include defs in not cpp-section by @kimkulling in https://github.com/assimp/assimp/pull/5466 +* Add correct double zero check by @kimkulling in https://github.com/assimp/assimp/pull/5471 +* Add zlib-header to ZipArchiveIOSystem.h by @kimkulling in https://github.com/assimp/assimp/pull/5473 +* Add 2024 to copyright infos by @kimkulling in https://github.com/assimp/assimp/pull/5475 +* Append a new setting "AI_CONFIG_EXPORT_FBX_TRANSPARENCY_FACTOR_REFER_TO_OPACITY" by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/5450 +* Eliminate non-ascii comments in clipper by @adfwer233 in https://github.com/assimp/assimp/pull/5480 +* Fix compilation for MSVC14. by @LukasBanana in https://github.com/assimp/assimp/pull/5490 +* Add correction of fbx model rotation by @kimkulling in https://github.com/assimp/assimp/pull/5494 +* Delete tools/make directory by @mosfet80 in https://github.com/assimp/assimp/pull/5491 +* Delete packaging/windows-mkzip directory by @mosfet80 in https://github.com/assimp/assimp/pull/5492 +* Fix #5420 duplicate degrees to radians conversion in fbx importer by @Biohazard90 in https://github.com/assimp/assimp/pull/5427 +* Respect merge identical vertices in ObjExporter by @JulianKnodt in https://github.com/assimp/assimp/pull/5521 +* Fix utDefaultIOStream test under MinGW by @thenanisore in https://github.com/assimp/assimp/pull/5525 +* Fix typos by @RoboSchmied in https://github.com/assimp/assimp/pull/5518 +* Add initial macOS support to C4D importer by @AlexTMjugador in https://github.com/assimp/assimp/pull/5516 +* Update hunter into CMakeLists.txt by @mosfet80 in https://github.com/assimp/assimp/pull/5505 +* Fix: add missing import for `AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON_DEFAULT` by @tomheaton in https://github.com/assimp/assimp/pull/5507 +* updated json by @mosfet80 in https://github.com/assimp/assimp/pull/5501 +* Cleanup: Fix review findings by @kimkulling in https://github.com/assimp/assimp/pull/5528 +* Update CMakeLists.txt by @kimkulling in https://github.com/assimp/assimp/pull/5531 +* CMake: Allow linking draco statically if ASSIMP_BUILD_DRACO_STATIC is set. by @alexrp in https://github.com/assimp/assimp/pull/5535 +* updated minizip to last version by @mosfet80 in https://github.com/assimp/assimp/pull/5498 +* updated STBIMAGElib by @mosfet80 in https://github.com/assimp/assimp/pull/5500 +* fix issue #5461 (segfault after removing redundant materials) by @stephengold in https://github.com/assimp/assimp/pull/5467 +* Update ComputeUVMappingProcess.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5541 +* add some ASSIMP_INSTALL checks by @ZeunO8 in https://github.com/assimp/assimp/pull/5545 +* Fix SplitByBoneCount typo that prevented node updates by @Succ3s in https://github.com/assimp/assimp/pull/5550 +* Q3DLoader: Fix possible material string overflow by @kimkulling in https://github.com/assimp/assimp/pull/5556 +* Reverts the changes introduced by commit ad766cb in February 2022. by @johannesugb in https://github.com/assimp/assimp/pull/5542 +* fix a collada import bug by @xiaoxiaopifu in https://github.com/assimp/assimp/pull/5561 +* mention IQM loader in Fileformats.md by @Garux in https://github.com/assimp/assimp/pull/5560 +* Kimkulling/fix pyassimp compatibility by @kimkulling in https://github.com/assimp/assimp/pull/5563 +* fix ASE loader crash when *MATERIAL_COUNT or *NUMSUBMTLS is not specified or is 0 by @Garux in https://github.com/assimp/assimp/pull/5559 +* Add checks for invalid buffer and size by @kimkulling in https://github.com/assimp/assimp/pull/5570 +* Make sure for releases revision will be zero by @kimkulling in https://github.com/assimp/assimp/pull/5571 +* glTF2Importer: Support .vrm extension by @uyjulian in https://github.com/assimp/assimp/pull/5569 +* Prepare v5.4.1 by @kimkulling in https://github.com/assimp/assimp/pull/5573 +* Remove deprecated c++11 warnings by @kimkulling in https://github.com/assimp/assimp/pull/5576 +* fix ci by disabling tests by @kimkulling in https://github.com/assimp/assimp/pull/5583 +* Fix integer overflow by @kimkulling in https://github.com/assimp/assimp/pull/5581 +* Assimp viewer fixes by @JLouis-B in https://github.com/assimp/assimp/pull/5582 +* Optimize readability by @kimkulling in https://github.com/assimp/assimp/pull/5578 +* Temporary fix for #5557 GCC 13+ build issue -Warray-bounds by @dbs4261 in https://github.com/assimp/assimp/pull/5577 +* Fix a bug that could cause assertion failure. by @vengine in https://github.com/assimp/assimp/pull/5575 +* Fix possible nullptr dereferencing. by @kimkulling in https://github.com/assimp/assimp/pull/5595 +* Update ObjFileParser.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5598 +* Fix for #5592 Disabled maybe-uninitialized error for AssetLib/Obj/ObjFileParser.cpp by @dbs4261 in https://github.com/assimp/assimp/pull/5593 +* updated zip by @mosfet80 in https://github.com/assimp/assimp/pull/5499 +* Postprocessing: Fix endless loop by @kimkulling in https://github.com/assimp/assimp/pull/5605 +* Build: Fix compilation for VS-2022 debug mode - warning by @kimkulling in https://github.com/assimp/assimp/pull/5606 +* Converted a size_t to mz_uint that was being treated as an error by @BradlyLanducci in https://github.com/assimp/assimp/pull/5600 +* Add trim to xml string parsing by @kimkulling in https://github.com/assimp/assimp/pull/5611 +* Replace duplicated trim by @kimkulling in https://github.com/assimp/assimp/pull/5613 +* Move aiScene constructor by @kimkulling in https://github.com/assimp/assimp/pull/5614 +* Move revision.h and revision.h.in to include folder by @kimkulling in https://github.com/assimp/assimp/pull/5615 +* Update MDLMaterialLoader.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5620 +* Create inno_setup by @kimkulling in https://github.com/assimp/assimp/pull/5621 +* clean HunterGate.cmake by @mosfet80 in https://github.com/assimp/assimp/pull/5619 +* Draft: Update init of aiString by @kimkulling in https://github.com/assimp/assimp/pull/5623 +* Fix init aistring issue 5622 inpython module by @kimkulling in https://github.com/assimp/assimp/pull/5625 +* update dotnet example by @mosfet80 in https://github.com/assimp/assimp/pull/5618 +* Make stepfile schema validation more robust. by @kimkulling in https://github.com/assimp/assimp/pull/5627 +* fix PLY binary export color from float to uchar by @micott in https://github.com/assimp/assimp/pull/5608 +* Some FBXs do not have "Materials" information, which can cause parsing errors by @ycn2022 in https://github.com/assimp/assimp/pull/5624 +* Fix collada uv channels - temporary was stored and then updated. by @StepanHrbek in https://github.com/assimp/assimp/pull/5630 +* remove ASE parsing break by @Garux in https://github.com/assimp/assimp/pull/5634 +* FBX-Exporter: Fix nullptr dereferencing by @kimkulling in https://github.com/assimp/assimp/pull/5638 +* Fix FBX exporting incorrect bone order by @JulianKnodt in https://github.com/assimp/assimp/pull/5435 +* fixes potential memory leak on malformed obj file by @TinyTinni in https://github.com/assimp/assimp/pull/5645 +* Update zip.c by @ThatOSDev in https://github.com/assimp/assimp/pull/5639 +* Fixes some uninit bool loads by @TinyTinni in https://github.com/assimp/assimp/pull/5644 +* Fix names of enum values in docstring of aiProcess_FindDegenerates by @mapret in https://github.com/assimp/assimp/pull/5640 +* Fix: StackAllocator Undefined Reference fix by @thearchivalone in https://github.com/assimp/assimp/pull/5650 +* Plx: Fix out of bound access by @kimkulling in https://github.com/assimp/assimp/pull/5651 +* Docker: Fix security finding by @kimkulling in https://github.com/assimp/assimp/pull/5655 +* Fix potential heapbuffer overflow in md5 parsing by @TinyTinni in https://github.com/assimp/assimp/pull/5652 +* Replace raw pointers by std::string by @kimkulling in https://github.com/assimp/assimp/pull/5656 +* Fix compile warning by @kimkulling in https://github.com/assimp/assimp/pull/5657 +* Allow empty slots in mTextureCoords by @StepanHrbek in https://github.com/assimp/assimp/pull/5636 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5663 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5665 +* [USD] Integrate "tinyusdz" project by @tellypresence in https://github.com/assimp/assimp/pull/5628 +* Kimkulling/fix double precision tests by @kimkulling in https://github.com/assimp/assimp/pull/5660 +* Update Python structs with missing fields that were causing core dumps by @vjf in https://github.com/assimp/assimp/pull/5673 +* Introduce interpolation mode to vectro and quaternion keys by @kimkulling in https://github.com/assimp/assimp/pull/5674 +* Fix a fuzz test heap buffer overflow in mdl material loader by @sgayda2 in https://github.com/assimp/assimp/pull/5658 +* Mosfet80 updatedpoli2tri by @kimkulling in https://github.com/assimp/assimp/pull/5682 +* CalcTangents: zero vector is invalid for tangent/bitangent by @JensEhrhardt-eOPUS in https://github.com/assimp/assimp/pull/5432 +* A fuzzed stride could cause the max count to become negative and henc… by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5414 +* Return false instead of crash by @kimkulling in https://github.com/assimp/assimp/pull/5685 +* Make coord transfor for hs1 files optional by @kimkulling in https://github.com/assimp/assimp/pull/5687 +* Update DefaultIOSystem.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5697 +* FBX exporter - handle multiple vertex color channels by @Kimbatt in https://github.com/assimp/assimp/pull/5695 +* Fixing static builds on Windows by @natevm in https://github.com/assimp/assimp/pull/5713 +* Added AND condition in poly2tri dll_symbol.h to only define macros fo… by @mkuritsu in https://github.com/assimp/assimp/pull/5693 +* Fix MSVC PDBs and permit them to be disabled if required by @RichardTea in https://github.com/assimp/assimp/pull/5710 +* Use DRACO_GLTF_BITSTREAM by @RichardTea in https://github.com/assimp/assimp/pull/5709 +* include Exceptional.h in 3DSExporter.cpp by @Fiskmans in https://github.com/assimp/assimp/pull/5707 +* Remove recursive include by @Fiskmans in https://github.com/assimp/assimp/pull/5705 +* Fix: Possible out-of-bound read in findDegenerate by @TinyTinni in https://github.com/assimp/assimp/pull/5679 +* Revert variable name by @tellypresence in https://github.com/assimp/assimp/pull/5715 +* Add compile option /source-charset:utf-8 for MSVC by @kenichiice in https://github.com/assimp/assimp/pull/5716 +* Fix leak in loader by @kimkulling in https://github.com/assimp/assimp/pull/5718 +* Expose aiGetEmbeddedTexture to C-API by @sacereda in https://github.com/assimp/assimp/pull/5382 +* Sparky kitty studios master by @kimkulling in https://github.com/assimp/assimp/pull/5727 +* Added more Maya materials by @Sanchikuuus in https://github.com/assimp/assimp/pull/5101 +* Fix to check both types of slashes in GetShortFilename by @imdongye in https://github.com/assimp/assimp/pull/5728 +* Bump actions/download-artifact from 1 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5732 +* Bump actions/upload-artifact from 1 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5731 +* Bump softprops/action-gh-release from 1 to 2 by @dependabot in https://github.com/assimp/assimp/pull/5730 +* Fix copying private data when source pointer is NULL by @vjf in https://github.com/assimp/assimp/pull/5733 +* Fix potential memory leak in SceneCombiner for LWS/IRR/MD3 loader by @TinyTinni in https://github.com/assimp/assimp/pull/5721 +* Fix to correctly determine 'multi-configuration' on Windows by @kenichiice in https://github.com/assimp/assimp/pull/5720 +* Fix casting typo in D3MFExporter::writeBaseMaterials by @ochafik in https://github.com/assimp/assimp/pull/5681 +* FBX: add metadata of ainode as properties by @fuhaixi in https://github.com/assimp/assimp/pull/5675 +* feat: add option for creating XCFramework and configure minimum iOS target by @AKosmachyov in https://github.com/assimp/assimp/pull/5648 +* Update PyAssimp structs with Skeleton & SkeletonBone members by @vjf in https://github.com/assimp/assimp/pull/5734 +* The total length is incorrect when exporting gltf2 by @Fav in https://github.com/assimp/assimp/pull/5647 +* `build`: Add ccache support by @ochafik in https://github.com/assimp/assimp/pull/5686 +* Update ccpp.yml by @kimkulling in https://github.com/assimp/assimp/pull/5740 +* Ply-Importer: Fix vulnerability by @kimkulling in https://github.com/assimp/assimp/pull/5739 +* prepare v5.4.3 by @kimkulling in https://github.com/assimp/assimp/pull/5741 +* Zero-length mChildren arrays should be nullptr by @RichardTea in https://github.com/assimp/assimp/pull/5749 +* Allow usage of pugixml from a superproject by @diiigle in https://github.com/assimp/assimp/pull/5752 +* Prevents PLY from parsing duplicate defined elements by @TinyTinni in https://github.com/assimp/assimp/pull/5743 +* Add option to ignore FBX custom axes by @RichardTea in https://github.com/assimp/assimp/pull/5754 +* Kimkulling/mark blender versions as not supported by @kimkulling in https://github.com/assimp/assimp/pull/5370 +* Fix leak by @kimkulling in https://github.com/assimp/assimp/pull/5762 +* Fix invalid access by @cla7aye15I4nd in https://github.com/assimp/assimp/pull/5765 +* Fix buffer overflow in MD3Loader by @cla7aye15I4nd in https://github.com/assimp/assimp/pull/5763 +* Fix stack overflow by @cla7aye15I4nd in https://github.com/assimp/assimp/pull/5764 +* FBX Import - Restored Absolute Transform Calculation by @lxw404 in https://github.com/assimp/assimp/pull/5751 +* Fix naming in aiMaterial comment by @PatrickDahlin in https://github.com/assimp/assimp/pull/5780 +* Update dll_symbol.h by @kimkulling in https://github.com/assimp/assimp/pull/5781 +* Fix for build with ASSIMP_BUILD_NO_VALIDATEDS_PROCESS by @Pichas in https://github.com/assimp/assimp/pull/5774 +* Update CMakeLists.txt by @kimkulling in https://github.com/assimp/assimp/pull/5782 +* FBX Blendshapes: Do not require normals by @JulianKnodt in https://github.com/assimp/assimp/pull/5776 +* Update Build.md by @kimkulling in https://github.com/assimp/assimp/pull/5796 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5797 +* SplitLargeMeshes: Fix crash by @kimkulling in https://github.com/assimp/assimp/pull/5799 +* Installer: fix images for installer by @kimkulling in https://github.com/assimp/assimp/pull/5800 +* Bugfix/installer add missing images by @kimkulling in https://github.com/assimp/assimp/pull/5803 +* Fix bug introduced in commit 168ae22 of 27 Oct 2019 by @tellypresence in https://github.com/assimp/assimp/pull/5813 +* Fix issue 5767: Can't load USD from memory by @Pichas in https://github.com/assimp/assimp/pull/5818 +* Fix FBX animation bug (issue 3390) by @tellypresence in https://github.com/assimp/assimp/pull/5815 +* [Fix issue 5823] Hotfix for broken lightwave normals by @tellypresence in https://github.com/assimp/assimp/pull/5824 +* Fixed bug in DefaultLogger::set by @chefrolle695 in https://github.com/assimp/assimp/pull/5826 +* Fix a bug in the assbin loader that reads uninitialized memory by @qingyouzhao in https://github.com/assimp/assimp/pull/5801 +* Fix issue 2889 (molecule_ascii.cob load failure): change integers to floating point values in color triplets by @tellypresence in https://github.com/assimp/assimp/pull/5819 +* Add unit tests for X3D models which were broken at 5 Oct 2020 commit 3b9d4cf by @tellypresence in https://github.com/assimp/assimp/pull/5828 +* Update inno_setup-actions by @mosfet80 in https://github.com/assimp/assimp/pull/5833 +* Simplify re-enabling M3D build support by @tellypresence in https://github.com/assimp/assimp/pull/5835 +* Update hunter by @mosfet80 in https://github.com/assimp/assimp/pull/5831 +* Store current exception when caught in ASSIMP_CATCH_GLOBAL_EXCEPTIONS by @mischmit in https://github.com/assimp/assimp/pull/5810 +* Fix issue 5816 (cone.nff load failure): repair faulty line in 3D model file by @tellypresence in https://github.com/assimp/assimp/pull/5817 +* Readme: Add project activity view item by @kimkulling in https://github.com/assimp/assimp/pull/5854 +* Cleanup Unit Tests Output by @AMZN-Gene in https://github.com/assimp/assimp/pull/5852 +* USD Skinned Mesh by @AMZN-Gene in https://github.com/assimp/assimp/pull/5812 +* Update tinyusdz by @tellypresence in https://github.com/assimp/assimp/pull/5849 +* +Add vertex duplication during face normal generation by @diiigle in https://github.com/assimp/assimp/pull/5805 +* Fix use of uninitialized value. by @feuerste in https://github.com/assimp/assimp/pull/5867 +* Update CMakeLists.txt to fix gcc/clang++ issue by @jwbla in https://github.com/assimp/assimp/pull/5863 +* Add reference screenshots for complex bundled test 3D model files by @tellypresence in https://github.com/assimp/assimp/pull/5822 +* Obj: Fix Sonarcube findings by @kimkulling in https://github.com/assimp/assimp/pull/5873 +* Try to resolve image paths by replacing backslashes or forward slashes in EmbedTexturesProcess by @david-campos in https://github.com/assimp/assimp/pull/5844 +* Material: Fix the build for c compiler by @kimkulling in https://github.com/assimp/assimp/pull/5879 +* Material: Fix sonarcube finding by @kimkulling in https://github.com/assimp/assimp/pull/5880 +* Remove strcpy. by @kimkulling in https://github.com/assimp/assimp/pull/5802 +* Fix potential uninitialized variable in clipper by @miselin in https://github.com/assimp/assimp/pull/5881 +* Check that mMaterials not null before access by @JulianKnodt in https://github.com/assimp/assimp/pull/5874 +* Cleanup: Delete code/.editorconfig by @kimkulling in https://github.com/assimp/assimp/pull/5889 +* Readme.md: Add sonarcube badge by @kimkulling in https://github.com/assimp/assimp/pull/5893 +* Obj: fix nullptr access. by @kimkulling in https://github.com/assimp/assimp/pull/5894 +* Update cpp-pm / hunter by @mosfet80 in https://github.com/assimp/assimp/pull/5885 +* Add CI to automatically build and attach binaries to releases by @Saalvage in https://github.com/assimp/assimp/pull/5892 +* Simplify JoinVerticesProcess by @JulianKnodt in https://github.com/assimp/assimp/pull/5895 +* USD Keyframe Animations by @AMZN-Gene in https://github.com/assimp/assimp/pull/5856 +* Fix compiler error when double precision is selected, by @hankarun in https://github.com/assimp/assimp/pull/5902 +* Synchronize `DefaultLogger` by @Saalvage in https://github.com/assimp/assimp/pull/5898 +* Do not create GLTF Mesh if no faces by @JulianKnodt in https://github.com/assimp/assimp/pull/5878 +* FBX Blendshape: export float & same # verts by @JulianKnodt in https://github.com/assimp/assimp/pull/5775 +* bugfix: Fixed the issue that draco compressed gltf files cannot be lo… by @HandsomeXi in https://github.com/assimp/assimp/pull/5883 +* pbrt: Validate mesh in WriteMesh before AttributeBegin call by @lijenicol in https://github.com/assimp/assimp/pull/5884 +* Introducing assimp Guru on Gurubase.io by @kursataktas in https://github.com/assimp/assimp/pull/5887 +* Fix: Fix build for mingw10 by @kimkulling in https://github.com/assimp/assimp/pull/5916 +* Fix use after free in the CallbackToLogRedirector by @tyler92 in https://github.com/assimp/assimp/pull/5918 +* USD Mesh Node Fix by @AMZN-Gene in https://github.com/assimp/assimp/pull/5915 +* Fixed warnings by @sacereda in https://github.com/assimp/assimp/pull/5903 +* Replace C# port with maintained fork by @Saalvage in https://github.com/assimp/assimp/pull/5922 +* Fix heap-buffer-overflow in OpenDDLParser by @tyler92 in https://github.com/assimp/assimp/pull/5919 +* Fix parsing of comments at the end of lines for tokens with variable number of elements. (#5890) by @scschaefer in https://github.com/assimp/assimp/pull/5891 +* Fix buffer overflow in MD5Parser::SkipSpacesAndLineEnd by @tyler92 in https://github.com/assimp/assimp/pull/5921 +* Fix: Fix name collision by @kimkulling in https://github.com/assimp/assimp/pull/5937 +* Bug/evaluate matrix4x4 access by @kimkulling in https://github.com/assimp/assimp/pull/5936 +* glTF importers: Avoid strncpy truncating away the ' \0' character by @david-campos in https://github.com/assimp/assimp/pull/5931 +* Export tangents in GLTF by @JulianKnodt in https://github.com/assimp/assimp/pull/5900 +* Disable logs for fuzzer by default by @tyler92 in https://github.com/assimp/assimp/pull/5938 +* Fix docs for aiImportFileExWithProperties to not talk about the importer keeping the Scene alive by @david-campos in https://github.com/assimp/assimp/pull/5925 +* Fix stack overflow in LWS loader by @tyler92 in https://github.com/assimp/assimp/pull/5941 +* Introduce VRML format (.wrl and .x3dv) 3D model support by @tellypresence in https://github.com/assimp/assimp/pull/5857 +* Verify negative values in Quake1 MDL header by @tyler92 in https://github.com/assimp/assimp/pull/5940 +* Fix heap buffer overflow in HMP loader by @tyler92 in https://github.com/assimp/assimp/pull/5939 +* pragma warning bug fix when using g++ on windows by @stekap000 in https://github.com/assimp/assimp/pull/5943 +* AssbinImporter::ReadInternFile now closes stream before throwing by @david-campos in https://github.com/assimp/assimp/pull/5927 +* Updated Material.cpp to Add Missing Texture Types to String by @crazyjackel in https://github.com/assimp/assimp/pull/5945 +* Docker: Optimize usage by @kimkulling in https://github.com/assimp/assimp/pull/5948 +* Bugfix/cosmetic code cleanup by @kimkulling in https://github.com/assimp/assimp/pull/5947 +* Add arm64-simulator support to iOS build script by @DwayneCoussement in https://github.com/assimp/assimp/pull/5920 +* Add aiProcess_ValidateDataStructure flag to the fuzzer by @tyler92 in https://github.com/assimp/assimp/pull/5951 +* Update OpenDDLParser.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5953 +* [AMF] Fix texture mapping by @tellypresence in https://github.com/assimp/assimp/pull/5949 +* [FBX] Allow export multi materials per node by @JulianKnodt in https://github.com/assimp/assimp/pull/5888 +* Assimp master head fixes for failure to compile by @enginmanap in https://github.com/assimp/assimp/pull/5899 +* Prefix MTL textures with the MTL directory path by @david-campos in https://github.com/assimp/assimp/pull/5928 +* Add customExtension support to the scene by @BurntRanch in https://github.com/assimp/assimp/pull/5954 +* Avoid exporting all primitives, which are not triangles. by @kimkulling in https://github.com/assimp/assimp/pull/5964 +* Added GLTF Extension KHR_materials_anisotropy by @luho383 in https://github.com/assimp/assimp/pull/5950 +* Add POST_BUILD option to ADD_CUSTOM_COMMAND by @MikeChemi in https://github.com/assimp/assimp/pull/5962 +* Fix heap buffer overflow in PLY parser by @tyler92 in https://github.com/assimp/assimp/pull/5956 +* Optimise building tinyusd library by @Pichas in https://github.com/assimp/assimp/pull/5959 +* Add gltf metallic-roughness texture type by @tellypresence in https://github.com/assimp/assimp/pull/5968 +* fix: reduce gltf2 export time by @1323236654 in https://github.com/assimp/assimp/pull/5972 +* Flag Documentation Fix by @snave333 in https://github.com/assimp/assimp/pull/5978 +* Doc: Make hint clearer by @kimkulling in https://github.com/assimp/assimp/pull/5988 +* Clean STEPFileReader.cpp by @mosfet80 in https://github.com/assimp/assimp/pull/5973 +* Update Readme.md: Add new viewer by @kimkulling in https://github.com/assimp/assimp/pull/5991 +* Doc: Separate viewer by @kimkulling in https://github.com/assimp/assimp/pull/5995 +* Use correct data type for animation key by @kimkulling in https://github.com/assimp/assimp/pull/5998 +* Use ear-cutting library for triangulation by @Saalvage in https://github.com/assimp/assimp/pull/5977 +* Fixing PyAssimp misalignment errors with certain structures by @fishguy6564 in https://github.com/assimp/assimp/pull/6001 +* Bugfix/fix mingw issue 5975 by @kimkulling in https://github.com/assimp/assimp/pull/6005 +* IFC: Remove redundand check by @kimkulling in https://github.com/assimp/assimp/pull/6006 +* Obj: remove smooth-normals postprocessing by @kimkulling in https://github.com/assimp/assimp/pull/6031 +* Refactorings: glTF cleanups by @kimkulling in https://github.com/assimp/assimp/pull/6028 +* Fix memory leak in OpenGEXImporter by @UnionTech-Software in https://github.com/assimp/assimp/pull/6036 +* Use std::copy to copy array and remove user destructor to make sure is_trivially_copyable in order to avoid -Wno-error=nontrivial-memcall by @cielavenir in https://github.com/assimp/assimp/pull/6029 +* Fix: Let OpenGEX accept color3 types by @kimkulling in https://github.com/assimp/assimp/pull/6040 +* ASE: Fix possible out of bound access. by @kimkulling in https://github.com/assimp/assimp/pull/6045 +* MDL: Limit max texture sizes by @kimkulling in https://github.com/assimp/assimp/pull/6046 +* MDL: Fix overflow check by @kimkulling in https://github.com/assimp/assimp/pull/6047 +* Fix: Avoid override in line parsing by @kimkulling in https://github.com/assimp/assimp/pull/6048 +* Bugfix: Fix possible nullptr dereferencing by @kimkulling in https://github.com/assimp/assimp/pull/6049 +* Potential fix for code scanning alert no. 63: Potential use after free by @kimkulling in https://github.com/assimp/assimp/pull/6050 +* ASE: Use correct vertex container by @kimkulling in https://github.com/assimp/assimp/pull/6051 +* CMS: Fix possible overflow access by @kimkulling in https://github.com/assimp/assimp/pull/6052 +* [OpenGEX] disable partial implementation of light import (causes model load failure) by @tellypresence in https://github.com/assimp/assimp/pull/6044 +* Update tinyusdz git hash (fix USD animation) by @tellypresence in https://github.com/assimp/assimp/pull/6034 +* [draft] Check the hunter build by @kimkulling in https://github.com/assimp/assimp/pull/6061 +* NDO: Fix possible overflow access by @yuntongzhang in https://github.com/assimp/assimp/pull/6055 +* Fix Cinema4D Import by @krishty in https://github.com/assimp/assimp/pull/6062 +* Remove Redundant `virtual` by @krishty in https://github.com/assimp/assimp/pull/6064 +* feat: created the aiGetStringC_Str() function. by @leliel-git in https://github.com/assimp/assimp/pull/6059 +* Fix Whitespace by @krishty in https://github.com/assimp/assimp/pull/6063 +* Harmonize Importer #includes by @krishty in https://github.com/assimp/assimp/pull/6065 +* More `constexpr` by @krishty in https://github.com/assimp/assimp/pull/6066 +* Renamed and inlined hasSkeletons() to HasSkeletons() for API consistency by @Alexelnet in https://github.com/assimp/assimp/pull/6072 +* Fix set by @kimkulling in https://github.com/assimp/assimp/pull/6073 +* Bugfix/ensure collada parsing works issue 1488 by @kimkulling in https://github.com/assimp/assimp/pull/6087 +* Not to export empty "LayerElementNormal" or "LayerElementColor" nodes to fbx by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/6092 +* Use unique pointer to fix possible leak by @kimkulling in https://github.com/assimp/assimp/pull/6104 +* Refactoring of PR #6092 by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/6101 +* fix: Fix build on armv6/armv7 by @yurivict in https://github.com/assimp/assimp/pull/6123 +* Bugfix: Handling no of texture coordinates correctly by @kimkulling in https://github.com/assimp/assimp/pull/6124 +* fix: possible Heap-based Buffer Overflow in ConvertToUTF8 function by @TinyTinni in https://github.com/assimp/assimp/pull/6122 +* Refactor by @kimkulling in https://github.com/assimp/assimp/pull/6127 +* support for cmake findpackage module mode by @kiroeko in https://github.com/assimp/assimp/pull/6121 +* Replace exception by error in log by @kimkulling in https://github.com/assimp/assimp/pull/6133 +* Fix a out of bound buffer access in ParsingUtils GetNextLine by @qingyouzhao in https://github.com/assimp/assimp/pull/6134 +* Fix a bug where string erases throws out of range by @qingyouzhao in https://github.com/assimp/assimp/pull/6135 +* Fix: Support uint16 indices in OpenGEX as well by @kimkulling in https://github.com/assimp/assimp/pull/6137 +* Fix crashes by @kimkulling in https://github.com/assimp/assimp/pull/6138 +* + Only the recognition of KTX2 compressed images as texture objects within the glb model is currently handled. by @copycd in https://github.com/assimp/assimp/pull/6139 +* add missing constants by @daef in https://github.com/assimp/assimp/pull/6116 +* Fix warning abut inexistent warning by @limdor in https://github.com/assimp/assimp/pull/6153 +* Fix: Fix leak when sortbyp failes with exception by @kimkulling in https://github.com/assimp/assimp/pull/6166 +* Update contrib/zip to fix data loss warning by @limdor in https://github.com/assimp/assimp/pull/6152 +* Fix out-of-bounds dereferencing by @Marti2203 in https://github.com/assimp/assimp/pull/6150 +* [#5983] Fix bugs introduced in fbx export by @JulianKnodt in https://github.com/assimp/assimp/pull/6000 +* Doc: add C++ / c minimum by @kimkulling in https://github.com/assimp/assimp/pull/6187 +* Unreal refactorings by @kimkulling in https://github.com/assimp/assimp/pull/6182 +* update draco lib by @mosfet80 in https://github.com/assimp/assimp/pull/6094 +* fix: missing OS separator in outfile by @Latios96 in https://github.com/assimp/assimp/pull/6098 +* Add Missing Strings to aiTextureTypeToString by @crasong in https://github.com/assimp/assimp/pull/6188 +* Fix issue compiling when assimp added as subdirectory by @plemanski in https://github.com/assimp/assimp/pull/6186 +* Add clamping logic for to_ktime by @Marti2203 in https://github.com/assimp/assimp/pull/6149 +* Add explicit "fallthrough" to switch by @tellypresence in https://github.com/assimp/assimp/pull/6143 +* Fix HUNTER_ERROR_PAGE by @deccer in https://github.com/assimp/assimp/pull/6200 +* Fix a bug in importing binary PLY file (#1) by @yurik42 in https://github.com/assimp/assimp/pull/6060 +* Fix export fbx PolygonVertexIndex by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/6102 +* fix: closes #6069 CVE-2025-3196 by @VinzSpring in https://github.com/assimp/assimp/pull/6154 +* Fix: Add "preservePivots" condition when importing FBX animation by @Nor-s in https://github.com/assimp/assimp/pull/6115 +* Version: Adapt version by @kimkulling in https://github.com/assimp/assimp/pull/6212 + +## New Contributors +* @Begasus made their first contribution in https://github.com/assimp/assimp/pull/5255 +* @ockeymm made their first contribution in https://github.com/assimp/assimp/pull/5252 +* @fvbj made their first contribution in https://github.com/assimp/assimp/pull/5243 +* @JulianKnodt made their first contribution in https://github.com/assimp/assimp/pull/5295 +* @sloriot made their first contribution in https://github.com/assimp/assimp/pull/5270 +* @Ipomoea made their first contribution in https://github.com/assimp/assimp/pull/5271 +* @aumuell made their first contribution in https://github.com/assimp/assimp/pull/5278 +* @TarcioV made their first contribution in https://github.com/assimp/assimp/pull/5279 +* @copycd made their first contribution in https://github.com/assimp/assimp/pull/5294 +* @cuppajoeman made their first contribution in https://github.com/assimp/assimp/pull/5312 +* @ttxine made their first contribution in https://github.com/assimp/assimp/pull/5322 +* @Futuremappermydud made their first contribution in https://github.com/assimp/assimp/pull/5356 +* @MarkaRagnos0815 made their first contribution in https://github.com/assimp/assimp/pull/5359 +* @0xf0ad made their first contribution in https://github.com/assimp/assimp/pull/5376 +* @seanth made their first contribution in https://github.com/assimp/assimp/pull/5426 +* @tigert1998 made their first contribution in https://github.com/assimp/assimp/pull/5436 +* @GalenXiao made their first contribution in https://github.com/assimp/assimp/pull/5361 +* @Th3T3chn0G1t made their first contribution in https://github.com/assimp/assimp/pull/5397 +* @etam made their first contribution in https://github.com/assimp/assimp/pull/5462 +* @adfwer233 made their first contribution in https://github.com/assimp/assimp/pull/5480 +* @LukasBanana made their first contribution in https://github.com/assimp/assimp/pull/5490 +* @thenanisore made their first contribution in https://github.com/assimp/assimp/pull/5525 +* @RoboSchmied made their first contribution in https://github.com/assimp/assimp/pull/5518 +* @AlexTMjugador made their first contribution in https://github.com/assimp/assimp/pull/5516 +* @tomheaton made their first contribution in https://github.com/assimp/assimp/pull/5507 +* @alexrp made their first contribution in https://github.com/assimp/assimp/pull/5535 +* @ZeunO8 made their first contribution in https://github.com/assimp/assimp/pull/5545 +* @Succ3s made their first contribution in https://github.com/assimp/assimp/pull/5550 +* @johannesugb made their first contribution in https://github.com/assimp/assimp/pull/5542 +* @xiaoxiaopifu made their first contribution in https://github.com/assimp/assimp/pull/5561 +* @uyjulian made their first contribution in https://github.com/assimp/assimp/pull/5569 +* @dbs4261 made their first contribution in https://github.com/assimp/assimp/pull/5577 +* @vengine made their first contribution in https://github.com/assimp/assimp/pull/5575 +* @BradlyLanducci made their first contribution in https://github.com/assimp/assimp/pull/5600 +* @micott made their first contribution in https://github.com/assimp/assimp/pull/5608 +* @ycn2022 made their first contribution in https://github.com/assimp/assimp/pull/5624 +* @ThatOSDev made their first contribution in https://github.com/assimp/assimp/pull/5639 +* @mapret made their first contribution in https://github.com/assimp/assimp/pull/5640 +* @thearchivalone made their first contribution in https://github.com/assimp/assimp/pull/5650 +* @sgayda2 made their first contribution in https://github.com/assimp/assimp/pull/5658 +* @JensEhrhardt-eOPUS made their first contribution in https://github.com/assimp/assimp/pull/5432 +* @Kimbatt made their first contribution in https://github.com/assimp/assimp/pull/5695 +* @natevm made their first contribution in https://github.com/assimp/assimp/pull/5713 +* @mkuritsu made their first contribution in https://github.com/assimp/assimp/pull/5693 +* @Sanchikuuus made their first contribution in https://github.com/assimp/assimp/pull/5101 +* @imdongye made their first contribution in https://github.com/assimp/assimp/pull/5728 +* @ochafik made their first contribution in https://github.com/assimp/assimp/pull/5681 +* @fuhaixi made their first contribution in https://github.com/assimp/assimp/pull/5675 +* @AKosmachyov made their first contribution in https://github.com/assimp/assimp/pull/5648 +* @Fav made their first contribution in https://github.com/assimp/assimp/pull/5647 +* @cla7aye15I4nd made their first contribution in https://github.com/assimp/assimp/pull/5765 +* @lxw404 made their first contribution in https://github.com/assimp/assimp/pull/5751 +* @PatrickDahlin made their first contribution in https://github.com/assimp/assimp/pull/5780 +* @Pichas made their first contribution in https://github.com/assimp/assimp/pull/5774 +* @chefrolle695 made their first contribution in https://github.com/assimp/assimp/pull/5826 +* @qingyouzhao made their first contribution in https://github.com/assimp/assimp/pull/5801 +* @mischmit made their first contribution in https://github.com/assimp/assimp/pull/5810 +* @AMZN-Gene made their first contribution in https://github.com/assimp/assimp/pull/5852 +* @jwbla made their first contribution in https://github.com/assimp/assimp/pull/5863 +* @david-campos made their first contribution in https://github.com/assimp/assimp/pull/5844 +* @miselin made their first contribution in https://github.com/assimp/assimp/pull/5881 +* @hankarun made their first contribution in https://github.com/assimp/assimp/pull/5902 +* @HandsomeXi made their first contribution in https://github.com/assimp/assimp/pull/5883 +* @lijenicol made their first contribution in https://github.com/assimp/assimp/pull/5884 +* @kursataktas made their first contribution in https://github.com/assimp/assimp/pull/5887 +* @tyler92 made their first contribution in https://github.com/assimp/assimp/pull/5918 +* @scschaefer made their first contribution in https://github.com/assimp/assimp/pull/5891 +* @stekap000 made their first contribution in https://github.com/assimp/assimp/pull/5943 +* @crazyjackel made their first contribution in https://github.com/assimp/assimp/pull/5945 +* @DwayneCoussement made their first contribution in https://github.com/assimp/assimp/pull/5920 +* @BurntRanch made their first contribution in https://github.com/assimp/assimp/pull/5954 +* @MikeChemi made their first contribution in https://github.com/assimp/assimp/pull/5962 +* @1323236654 made their first contribution in https://github.com/assimp/assimp/pull/5972 +* @snave333 made their first contribution in https://github.com/assimp/assimp/pull/5978 +* @fishguy6564 made their first contribution in https://github.com/assimp/assimp/pull/6001 +* @UnionTech-Software made their first contribution in https://github.com/assimp/assimp/pull/6036 +* @cielavenir made their first contribution in https://github.com/assimp/assimp/pull/6029 +* @yuntongzhang made their first contribution in https://github.com/assimp/assimp/pull/6055 +* @leliel-git made their first contribution in https://github.com/assimp/assimp/pull/6059 +* @Alexelnet made their first contribution in https://github.com/assimp/assimp/pull/6072 +* @yurivict made their first contribution in https://github.com/assimp/assimp/pull/6123 +* @kiroeko made their first contribution in https://github.com/assimp/assimp/pull/6121 +* @limdor made their first contribution in https://github.com/assimp/assimp/pull/6153 +* @Marti2203 made their first contribution in https://github.com/assimp/assimp/pull/6150 +* @Latios96 made their first contribution in https://github.com/assimp/assimp/pull/6098 +* @crasong made their first contribution in https://github.com/assimp/assimp/pull/6188 +* @plemanski made their first contribution in https://github.com/assimp/assimp/pull/6186 +* @deccer made their first contribution in https://github.com/assimp/assimp/pull/6200 +* @yurik42 made their first contribution in https://github.com/assimp/assimp/pull/6060 +* @VinzSpring made their first contribution in https://github.com/assimp/assimp/pull/6154 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.3.1...v6.0.1 + +# 6.0.0 +## What's Changed +* Fix building on Haiku by @Begasus in https://github.com/assimp/assimp/pull/5255 +* Reduce memory consumption in JoinVerticesProcess::ProcessMesh() signi… by @ockeymm in https://github.com/assimp/assimp/pull/5252 +* Fix: Add check for invalid input argument by @kimkulling in https://github.com/assimp/assimp/pull/5258 +* Replace an assert by a error log. by @kimkulling in https://github.com/assimp/assimp/pull/5260 +* Extension of skinning data export to GLB/GLTF format by @fvbj in https://github.com/assimp/assimp/pull/5243 +* Fix output floating-point values to fbx by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/5265 +* Update ImproveCacheLocality.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5268 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5277 +* Deep arsdk bone double free by @kimkulling in https://github.com/assimp/assimp/pull/5291 +* Fix Spelling error by @JulianKnodt in https://github.com/assimp/assimp/pull/5295 +* use size in order to be compatible with float and double by @sloriot in https://github.com/assimp/assimp/pull/5270 +* Fix: Add missing transformation for normalized normals. by @kimkulling in https://github.com/assimp/assimp/pull/5301 +* Fix: Implicit Conversion Error by @Ipomoea in https://github.com/assimp/assimp/pull/5271 +* Fix add checks for indices by @kimkulling in https://github.com/assimp/assimp/pull/5306 +* Update FBXBinaryTokenizer.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5311 +* link to external minizip with full path by @aumuell in https://github.com/assimp/assimp/pull/5278 +* utf8 header not found by @TarcioV in https://github.com/assimp/assimp/pull/5279 +* Rm unnecessary deg->radian conversion in FBX exporter by @JulianKnodt in https://github.com/assimp/assimp/pull/5281 +* Fix empty mesh handling by @kimkulling in https://github.com/assimp/assimp/pull/5318 +* Refactoring: Some cleanups by @kimkulling in https://github.com/assimp/assimp/pull/5319 +* Fix invalid read of `uint` from `uvwsrc` by @JulianKnodt in https://github.com/assimp/assimp/pull/5282 +* Remove double delete by @kimkulling in https://github.com/assimp/assimp/pull/5325 +* fix mesh-name error. by @copycd in https://github.com/assimp/assimp/pull/5294 +* COLLADA fixes for textures in C4D input by @wmatyjewicz in https://github.com/assimp/assimp/pull/5293 +* Use the correct allocator for deleting objects in case of duplicate a… by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5305 +* Fix container overflow in MMD parser by @aavenel in https://github.com/assimp/assimp/pull/5309 +* Fix: PLY heap buffer overflow by @aavenel in https://github.com/assimp/assimp/pull/5310 +* Update Readme.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5312 +* Update Readme.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5313 +* Fix: Check if index for mesh access is out of range by @kimkulling in https://github.com/assimp/assimp/pull/5338 +* Update FBXConverter.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5349 +* FBX: Use correct time scaling by @kimkulling in https://github.com/assimp/assimp/pull/5355 +* Drop explicit inclusion of contrib/ headers by @umlaeute in https://github.com/assimp/assimp/pull/5316 +* Update Build.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5314 +* Fix buffer overflow in FBX::Util::DecodeBase64() by @ttxine in https://github.com/assimp/assimp/pull/5322 +* Readme.md: correct 2 errors in section headers by @stephengold in https://github.com/assimp/assimp/pull/5351 +* Fix double free in Video::~Video() by @ttxine in https://github.com/assimp/assimp/pull/5323 +* FBXMeshGeometry: solve issue #5116 using patch provided by darktjm by @stephengold in https://github.com/assimp/assimp/pull/5333 +* Fix target names not being imported on some gLTF2 models by @Futuremappermydud in https://github.com/assimp/assimp/pull/5356 +* correct grammar/typographic errors in comments (8 files) by @stephengold in https://github.com/assimp/assimp/pull/5343 +* KHR_materials_specular fixes by @rudybear in https://github.com/assimp/assimp/pull/5347 +* Disable Hunter by @kimkulling in https://github.com/assimp/assimp/pull/5388 +* fixed several issues by @MarkaRagnos0815 in https://github.com/assimp/assimp/pull/5359 +* Fix leak by @kimkulling in https://github.com/assimp/assimp/pull/5391 +* Check validity of archive without parsing by @kimkulling in https://github.com/assimp/assimp/pull/5393 +* Fix integer overflow by @kimkulling in https://github.com/assimp/assimp/pull/5394 +* Add a test before generating the txture folder by @kimkulling in https://github.com/assimp/assimp/pull/5400 +* Build: Disable building zlib for non-windows by @kimkulling in https://github.com/assimp/assimp/pull/5401 +* null check. by @copycd in https://github.com/assimp/assimp/pull/5402 +* Bump actions/upload-artifact from 3 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5384 +* fix: KHR_materials_pbrSpecularGlossiness/diffuseFactor convert to pbr… by @guguTang in https://github.com/assimp/assimp/pull/5410 +* fix building errors for MinGW by @0xf0ad in https://github.com/assimp/assimp/pull/5376 +* dynamic_cast error. by @copycd in https://github.com/assimp/assimp/pull/5406 +* Add missing IRR textures by @tellypresence in https://github.com/assimp/assimp/pull/5374 +* Update Dockerfile by @kimkulling in https://github.com/assimp/assimp/pull/5412 +* Fix handling of X3D IndexedLineSet nodes by @andre-schulz in https://github.com/assimp/assimp/pull/5362 +* Improve acc file loading by @IOBYTE in https://github.com/assimp/assimp/pull/5360 +* Readme.md: present hyperlinks in a more uniform style by @stephengold in https://github.com/assimp/assimp/pull/5364 +* FBX Blendshape `FullWeight: Vec` -> `FullWeight: Vec` by @JulianKnodt in https://github.com/assimp/assimp/pull/5441 +* Fix for issues #5422, #3411, and #5443 -- DXF insert scaling fix and colour fix by @seanth in https://github.com/assimp/assimp/pull/5426 +* Update StbCommon.h to stay up-to-date with stb_image.h. by @tigert1998 in https://github.com/assimp/assimp/pull/5436 +* Introduce aiBuffer by @kimkulling in https://github.com/assimp/assimp/pull/5444 +* Add bounds checks to the parsing utilities. by @kimkulling in https://github.com/assimp/assimp/pull/5421 +* Fix crash in viewer by @kimkulling in https://github.com/assimp/assimp/pull/5446 +* Static code analysis fixes by @kimkulling in https://github.com/assimp/assimp/pull/5447 +* Kimkulling/fix bahavior of remove redundat mats issue 5438 by @kimkulling in https://github.com/assimp/assimp/pull/5451 +* Fix X importer breakage introduced in commit f844c33 by @tellypresence in https://github.com/assimp/assimp/pull/5372 +* Fileformats.md: clarify that import of .blend files is deprecated by @stephengold in https://github.com/assimp/assimp/pull/5350 +* feat:1.add 3mf vertex color read 2.fix 3mf read texture bug by @GalenXiao in https://github.com/assimp/assimp/pull/5361 +* More GLTF loading hardening by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5415 +* Bump actions/cache from 3 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5431 +* Update CMakeLists.txt by @mosfet80 in https://github.com/assimp/assimp/pull/5379 +* `Blendshape`->`Geometry` in FBX Export by @JulianKnodt in https://github.com/assimp/assimp/pull/5419 +* Fix identity matrix check by @fvbj in https://github.com/assimp/assimp/pull/5445 +* Fix PyAssimp under Python >= 3.12 and macOS library search support by @Th3T3chn0G1t in https://github.com/assimp/assimp/pull/5397 +* Add ISC LICENSE file by @severin-lemaignan in https://github.com/assimp/assimp/pull/5465 +* ColladaParser: check values length by @etam in https://github.com/assimp/assimp/pull/5462 +* Include defs in not cpp-section by @kimkulling in https://github.com/assimp/assimp/pull/5466 +* Add correct double zero check by @kimkulling in https://github.com/assimp/assimp/pull/5471 +* Add zlib-header to ZipArchiveIOSystem.h by @kimkulling in https://github.com/assimp/assimp/pull/5473 +* Add 2024 to copyright infos by @kimkulling in https://github.com/assimp/assimp/pull/5475 +* Append a new setting "AI_CONFIG_EXPORT_FBX_TRANSPARENCY_FACTOR_REFER_TO_OPACITY" by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/5450 +* Eliminate non-ascii comments in clipper by @adfwer233 in https://github.com/assimp/assimp/pull/5480 +* Fix compilation for MSVC14. by @LukasBanana in https://github.com/assimp/assimp/pull/5490 +* Add correction of fbx model rotation by @kimkulling in https://github.com/assimp/assimp/pull/5494 +* Delete tools/make directory by @mosfet80 in https://github.com/assimp/assimp/pull/5491 +* Delete packaging/windows-mkzip directory by @mosfet80 in https://github.com/assimp/assimp/pull/5492 +* Fix #5420 duplicate degrees to radians conversion in fbx importer by @Biohazard90 in https://github.com/assimp/assimp/pull/5427 +* Respect merge identical vertices in ObjExporter by @JulianKnodt in https://github.com/assimp/assimp/pull/5521 +* Fix utDefaultIOStream test under MinGW by @thenanisore in https://github.com/assimp/assimp/pull/5525 +* Fix typos by @RoboSchmied in https://github.com/assimp/assimp/pull/5518 +* Add initial macOS support to C4D importer by @AlexTMjugador in https://github.com/assimp/assimp/pull/5516 +* Update hunter into CMakeLists.txt by @mosfet80 in https://github.com/assimp/assimp/pull/5505 +* Fix: add missing import for `AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON_DEFAULT` by @tomheaton in https://github.com/assimp/assimp/pull/5507 +* updated json by @mosfet80 in https://github.com/assimp/assimp/pull/5501 +* Cleanup: Fix review findings by @kimkulling in https://github.com/assimp/assimp/pull/5528 +* Update CMakeLists.txt by @kimkulling in https://github.com/assimp/assimp/pull/5531 +* CMake: Allow linking draco statically if ASSIMP_BUILD_DRACO_STATIC is set. by @alexrp in https://github.com/assimp/assimp/pull/5535 +* updated minizip to last version by @mosfet80 in https://github.com/assimp/assimp/pull/5498 +* updated STBIMAGElib by @mosfet80 in https://github.com/assimp/assimp/pull/5500 +* fix issue #5461 (segfault after removing redundant materials) by @stephengold in https://github.com/assimp/assimp/pull/5467 +* Update ComputeUVMappingProcess.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5541 +* add some ASSIMP_INSTALL checks by @ZeunO8 in https://github.com/assimp/assimp/pull/5545 +* Fix SplitByBoneCount typo that prevented node updates by @Succ3s in https://github.com/assimp/assimp/pull/5550 +* Q3DLoader: Fix possible material string overflow by @kimkulling in https://github.com/assimp/assimp/pull/5556 +* Reverts the changes introduced by commit ad766cb in February 2022. by @johannesugb in https://github.com/assimp/assimp/pull/5542 +* fix a collada import bug by @xiaoxiaopifu in https://github.com/assimp/assimp/pull/5561 +* mention IQM loader in Fileformats.md by @Garux in https://github.com/assimp/assimp/pull/5560 +* Kimkulling/fix pyassimp compatibility by @kimkulling in https://github.com/assimp/assimp/pull/5563 +* fix ASE loader crash when *MATERIAL_COUNT or *NUMSUBMTLS is not specified or is 0 by @Garux in https://github.com/assimp/assimp/pull/5559 +* Add checks for invalid buffer and size by @kimkulling in https://github.com/assimp/assimp/pull/5570 +* Make sure for releases revision will be zero by @kimkulling in https://github.com/assimp/assimp/pull/5571 +* glTF2Importer: Support .vrm extension by @uyjulian in https://github.com/assimp/assimp/pull/5569 +* Prepare v5.4.1 by @kimkulling in https://github.com/assimp/assimp/pull/5573 +* Remove deprecated c++11 warnings by @kimkulling in https://github.com/assimp/assimp/pull/5576 +* fix ci by disabling tests by @kimkulling in https://github.com/assimp/assimp/pull/5583 +* Fix integer overflow by @kimkulling in https://github.com/assimp/assimp/pull/5581 +* Assimp viewer fixes by @JLouis-B in https://github.com/assimp/assimp/pull/5582 +* Optimize readability by @kimkulling in https://github.com/assimp/assimp/pull/5578 +* Temporary fix for #5557 GCC 13+ build issue -Warray-bounds by @dbs4261 in https://github.com/assimp/assimp/pull/5577 +* Fix a bug that could cause assertion failure. by @vengine in https://github.com/assimp/assimp/pull/5575 +* Fix possible nullptr dereferencing. by @kimkulling in https://github.com/assimp/assimp/pull/5595 +* Update ObjFileParser.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5598 +* Fix for #5592 Disabled maybe-uninitialized error for AssetLib/Obj/ObjFileParser.cpp by @dbs4261 in https://github.com/assimp/assimp/pull/5593 +* updated zip by @mosfet80 in https://github.com/assimp/assimp/pull/5499 +* Postprocessing: Fix endless loop by @kimkulling in https://github.com/assimp/assimp/pull/5605 +* Build: Fix compilation for VS-2022 debug mode - warning by @kimkulling in https://github.com/assimp/assimp/pull/5606 +* Converted a size_t to mz_uint that was being treated as an error by @BradlyLanducci in https://github.com/assimp/assimp/pull/5600 +* Add trim to xml string parsing by @kimkulling in https://github.com/assimp/assimp/pull/5611 +* Replace duplicated trim by @kimkulling in https://github.com/assimp/assimp/pull/5613 +* Move aiScene constructor by @kimkulling in https://github.com/assimp/assimp/pull/5614 +* Move revision.h and revision.h.in to include folder by @kimkulling in https://github.com/assimp/assimp/pull/5615 +* Update MDLMaterialLoader.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5620 +* Create inno_setup by @kimkulling in https://github.com/assimp/assimp/pull/5621 +* clean HunterGate.cmake by @mosfet80 in https://github.com/assimp/assimp/pull/5619 +* Draft: Update init of aiString by @kimkulling in https://github.com/assimp/assimp/pull/5623 +* Fix init aistring issue 5622 inpython module by @kimkulling in https://github.com/assimp/assimp/pull/5625 +* update dotnet example by @mosfet80 in https://github.com/assimp/assimp/pull/5618 +* Make stepfile schema validation more robust. by @kimkulling in https://github.com/assimp/assimp/pull/5627 +* fix PLY binary export color from float to uchar by @micott in https://github.com/assimp/assimp/pull/5608 +* Some FBXs do not have "Materials" information, which can cause parsing errors by @ycn2022 in https://github.com/assimp/assimp/pull/5624 +* Fix collada uv channels - temporary was stored and then updated. by @StepanHrbek in https://github.com/assimp/assimp/pull/5630 +* remove ASE parsing break by @Garux in https://github.com/assimp/assimp/pull/5634 +* FBX-Exporter: Fix nullptr dereferencing by @kimkulling in https://github.com/assimp/assimp/pull/5638 +* Fix FBX exporting incorrect bone order by @JulianKnodt in https://github.com/assimp/assimp/pull/5435 +* fixes potential memory leak on malformed obj file by @TinyTinni in https://github.com/assimp/assimp/pull/5645 +* Update zip.c by @ThatOSDev in https://github.com/assimp/assimp/pull/5639 +* Fixes some uninit bool loads by @TinyTinni in https://github.com/assimp/assimp/pull/5644 +* Fix names of enum values in docstring of aiProcess_FindDegenerates by @mapret in https://github.com/assimp/assimp/pull/5640 +* Fix: StackAllocator Undefined Reference fix by @thearchivalone in https://github.com/assimp/assimp/pull/5650 +* Plx: Fix out of bound access by @kimkulling in https://github.com/assimp/assimp/pull/5651 +* Docker: Fix security finding by @kimkulling in https://github.com/assimp/assimp/pull/5655 +* Fix potential heapbuffer overflow in md5 parsing by @TinyTinni in https://github.com/assimp/assimp/pull/5652 +* Replace raw pointers by std::string by @kimkulling in https://github.com/assimp/assimp/pull/5656 +* Fix compile warning by @kimkulling in https://github.com/assimp/assimp/pull/5657 +* Allow empty slots in mTextureCoords by @StepanHrbek in https://github.com/assimp/assimp/pull/5636 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5663 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5665 +* [USD] Integrate "tinyusdz" project by @tellypresence in https://github.com/assimp/assimp/pull/5628 +* Kimkulling/fix double precision tests by @kimkulling in https://github.com/assimp/assimp/pull/5660 +* Update Python structs with missing fields that were causing core dumps by @vjf in https://github.com/assimp/assimp/pull/5673 +* Introduce interpolation mode to vectro and quaternion keys by @kimkulling in https://github.com/assimp/assimp/pull/5674 +* Fix a fuzz test heap buffer overflow in mdl material loader by @sgayda2 in https://github.com/assimp/assimp/pull/5658 +* Mosfet80 updatedpoli2tri by @kimkulling in https://github.com/assimp/assimp/pull/5682 +* CalcTangents: zero vector is invalid for tangent/bitangent by @JensEhrhardt-eOPUS in https://github.com/assimp/assimp/pull/5432 +* A fuzzed stride could cause the max count to become negative and henc… by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5414 +* Return false instead of crash by @kimkulling in https://github.com/assimp/assimp/pull/5685 +* Make coord transfor for hs1 files optional by @kimkulling in https://github.com/assimp/assimp/pull/5687 +* Update DefaultIOSystem.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5697 +* FBX exporter - handle multiple vertex color channels by @Kimbatt in https://github.com/assimp/assimp/pull/5695 +* Fixing static builds on Windows by @natevm in https://github.com/assimp/assimp/pull/5713 +* Added AND condition in poly2tri dll_symbol.h to only define macros fo… by @mkuritsu in https://github.com/assimp/assimp/pull/5693 +* Fix MSVC PDBs and permit them to be disabled if required by @RichardTea in https://github.com/assimp/assimp/pull/5710 +* Use DRACO_GLTF_BITSTREAM by @RichardTea in https://github.com/assimp/assimp/pull/5709 +* include Exceptional.h in 3DSExporter.cpp by @Fiskmans in https://github.com/assimp/assimp/pull/5707 +* Remove recursive include by @Fiskmans in https://github.com/assimp/assimp/pull/5705 +* Fix: Possible out-of-bound read in findDegenerate by @TinyTinni in https://github.com/assimp/assimp/pull/5679 +* Revert variable name by @tellypresence in https://github.com/assimp/assimp/pull/5715 +* Add compile option /source-charset:utf-8 for MSVC by @kenichiice in https://github.com/assimp/assimp/pull/5716 +* Fix leak in loader by @kimkulling in https://github.com/assimp/assimp/pull/5718 +* Expose aiGetEmbeddedTexture to C-API by @sacereda in https://github.com/assimp/assimp/pull/5382 +* Sparky kitty studios master by @kimkulling in https://github.com/assimp/assimp/pull/5727 +* Added more Maya materials by @Sanchikuuus in https://github.com/assimp/assimp/pull/5101 +* Fix to check both types of slashes in GetShortFilename by @imdongye in https://github.com/assimp/assimp/pull/5728 +* Bump actions/download-artifact from 1 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5732 +* Bump actions/upload-artifact from 1 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5731 +* Bump softprops/action-gh-release from 1 to 2 by @dependabot in https://github.com/assimp/assimp/pull/5730 +* Fix copying private data when source pointer is NULL by @vjf in https://github.com/assimp/assimp/pull/5733 +* Fix potential memory leak in SceneCombiner for LWS/IRR/MD3 loader by @TinyTinni in https://github.com/assimp/assimp/pull/5721 +* Fix to correctly determine 'multi-configuration' on Windows by @kenichiice in https://github.com/assimp/assimp/pull/5720 +* Fix casting typo in D3MFExporter::writeBaseMaterials by @ochafik in https://github.com/assimp/assimp/pull/5681 +* FBX: add metadata of ainode as properties by @fuhaixi in https://github.com/assimp/assimp/pull/5675 +* feat: add option for creating XCFramework and configure minimum iOS target by @AKosmachyov in https://github.com/assimp/assimp/pull/5648 +* Update PyAssimp structs with Skeleton & SkeletonBone members by @vjf in https://github.com/assimp/assimp/pull/5734 +* The total length is incorrect when exporting gltf2 by @Fav in https://github.com/assimp/assimp/pull/5647 +* `build`: Add ccache support by @ochafik in https://github.com/assimp/assimp/pull/5686 +* Update ccpp.yml by @kimkulling in https://github.com/assimp/assimp/pull/5740 +* Ply-Importer: Fix vulnerability by @kimkulling in https://github.com/assimp/assimp/pull/5739 +* prepare v5.4.3 by @kimkulling in https://github.com/assimp/assimp/pull/5741 +* Zero-length mChildren arrays should be nullptr by @RichardTea in https://github.com/assimp/assimp/pull/5749 +* Allow usage of pugixml from a superproject by @diiigle in https://github.com/assimp/assimp/pull/5752 +* Prevents PLY from parsing duplicate defined elements by @TinyTinni in https://github.com/assimp/assimp/pull/5743 +* Add option to ignore FBX custom axes by @RichardTea in https://github.com/assimp/assimp/pull/5754 +* Kimkulling/mark blender versions as not supported by @kimkulling in https://github.com/assimp/assimp/pull/5370 +* Fix leak by @kimkulling in https://github.com/assimp/assimp/pull/5762 +* Fix invalid access by @cla7aye15I4nd in https://github.com/assimp/assimp/pull/5765 +* Fix buffer overflow in MD3Loader by @cla7aye15I4nd in https://github.com/assimp/assimp/pull/5763 +* Fix stack overflow by @cla7aye15I4nd in https://github.com/assimp/assimp/pull/5764 +* FBX Import - Restored Absolute Transform Calculation by @lxw404 in https://github.com/assimp/assimp/pull/5751 +* Fix naming in aiMaterial comment by @PatrickDahlin in https://github.com/assimp/assimp/pull/5780 +* Update dll_symbol.h by @kimkulling in https://github.com/assimp/assimp/pull/5781 +* Fix for build with ASSIMP_BUILD_NO_VALIDATEDS_PROCESS by @Pichas in https://github.com/assimp/assimp/pull/5774 +* Update CMakeLists.txt by @kimkulling in https://github.com/assimp/assimp/pull/5782 +* FBX Blendshapes: Do not require normals by @JulianKnodt in https://github.com/assimp/assimp/pull/5776 +* Update Build.md by @kimkulling in https://github.com/assimp/assimp/pull/5796 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5797 +* SplitLargeMeshes: Fix crash by @kimkulling in https://github.com/assimp/assimp/pull/5799 +* Installer: fix images for installer by @kimkulling in https://github.com/assimp/assimp/pull/5800 +* Bugfix/installer add missing images by @kimkulling in https://github.com/assimp/assimp/pull/5803 +* Fix bug introduced in commit 168ae22 of 27 Oct 2019 by @tellypresence in https://github.com/assimp/assimp/pull/5813 +* Fix issue 5767: Can't load USD from memory by @Pichas in https://github.com/assimp/assimp/pull/5818 +* Fix FBX animation bug (issue 3390) by @tellypresence in https://github.com/assimp/assimp/pull/5815 +* [Fix issue 5823] Hotfix for broken lightwave normals by @tellypresence in https://github.com/assimp/assimp/pull/5824 +* Fixed bug in DefaultLogger::set by @chefrolle695 in https://github.com/assimp/assimp/pull/5826 +* Fix a bug in the assbin loader that reads uninitialized memory by @qingyouzhao in https://github.com/assimp/assimp/pull/5801 +* Fix issue 2889 (molecule_ascii.cob load failure): change integers to floating point values in color triplets by @tellypresence in https://github.com/assimp/assimp/pull/5819 +* Add unit tests for X3D models which were broken at 5 Oct 2020 commit 3b9d4cf by @tellypresence in https://github.com/assimp/assimp/pull/5828 +* Update inno_setup-actions by @mosfet80 in https://github.com/assimp/assimp/pull/5833 +* Simplify re-enabling M3D build support by @tellypresence in https://github.com/assimp/assimp/pull/5835 +* Update hunter by @mosfet80 in https://github.com/assimp/assimp/pull/5831 +* Store current exception when caught in ASSIMP_CATCH_GLOBAL_EXCEPTIONS by @mischmit in https://github.com/assimp/assimp/pull/5810 +* Fix issue 5816 (cone.nff load failure): repair faulty line in 3D model file by @tellypresence in https://github.com/assimp/assimp/pull/5817 +* Readme: Add project activity view item by @kimkulling in https://github.com/assimp/assimp/pull/5854 +* Cleanup Unit Tests Output by @AMZN-Gene in https://github.com/assimp/assimp/pull/5852 +* USD Skinned Mesh by @AMZN-Gene in https://github.com/assimp/assimp/pull/5812 +* Update tinyusdz by @tellypresence in https://github.com/assimp/assimp/pull/5849 +* +Add vertex duplication during face normal generation by @diiigle in https://github.com/assimp/assimp/pull/5805 +* Fix use of uninitialized value. by @feuerste in https://github.com/assimp/assimp/pull/5867 +* Update CMakeLists.txt to fix gcc/clang++ issue by @jwbla in https://github.com/assimp/assimp/pull/5863 +* Add reference screenshots for complex bundled test 3D model files by @tellypresence in https://github.com/assimp/assimp/pull/5822 +* Obj: Fix Sonarcube findings by @kimkulling in https://github.com/assimp/assimp/pull/5873 +* Try to resolve image paths by replacing backslashes or forward slashes in EmbedTexturesProcess by @david-campos in https://github.com/assimp/assimp/pull/5844 +* Material: Fix the build for c compiler by @kimkulling in https://github.com/assimp/assimp/pull/5879 +* Material: Fix sonarcube finding by @kimkulling in https://github.com/assimp/assimp/pull/5880 +* Remove strcpy. by @kimkulling in https://github.com/assimp/assimp/pull/5802 +* Fix potential uninitialized variable in clipper by @miselin in https://github.com/assimp/assimp/pull/5881 +* Check that mMaterials not null before access by @JulianKnodt in https://github.com/assimp/assimp/pull/5874 +* Cleanup: Delete code/.editorconfig by @kimkulling in https://github.com/assimp/assimp/pull/5889 +* Readme.md: Add sonarcube badge by @kimkulling in https://github.com/assimp/assimp/pull/5893 +* Obj: fix nullptr access. by @kimkulling in https://github.com/assimp/assimp/pull/5894 +* Update cpp-pm / hunter by @mosfet80 in https://github.com/assimp/assimp/pull/5885 +* Add CI to automatically build and attach binaries to releases by @Saalvage in https://github.com/assimp/assimp/pull/5892 +* Simplify JoinVerticesProcess by @JulianKnodt in https://github.com/assimp/assimp/pull/5895 +* USD Keyframe Animations by @AMZN-Gene in https://github.com/assimp/assimp/pull/5856 +* Fix compiler error when double precision is selected, by @hankarun in https://github.com/assimp/assimp/pull/5902 +* Synchronize `DefaultLogger` by @Saalvage in https://github.com/assimp/assimp/pull/5898 +* Do not create GLTF Mesh if no faces by @JulianKnodt in https://github.com/assimp/assimp/pull/5878 +* FBX Blendshape: export float & same # verts by @JulianKnodt in https://github.com/assimp/assimp/pull/5775 +* bugfix: Fixed the issue that draco compressed gltf files cannot be lo… by @HandsomeXi in https://github.com/assimp/assimp/pull/5883 +* pbrt: Validate mesh in WriteMesh before AttributeBegin call by @lijenicol in https://github.com/assimp/assimp/pull/5884 +* Introducing assimp Guru on Gurubase.io by @kursataktas in https://github.com/assimp/assimp/pull/5887 +* Fix: Fix build for mingw10 by @kimkulling in https://github.com/assimp/assimp/pull/5916 +* Fix use after free in the CallbackToLogRedirector by @tyler92 in https://github.com/assimp/assimp/pull/5918 +* USD Mesh Node Fix by @AMZN-Gene in https://github.com/assimp/assimp/pull/5915 +* Fixed warnings by @sacereda in https://github.com/assimp/assimp/pull/5903 +* Replace C# port with maintained fork by @Saalvage in https://github.com/assimp/assimp/pull/5922 +* Fix heap-buffer-overflow in OpenDDLParser by @tyler92 in https://github.com/assimp/assimp/pull/5919 +* Fix parsing of comments at the end of lines for tokens with variable number of elements. (#5890) by @scschaefer in https://github.com/assimp/assimp/pull/5891 +* Fix buffer overflow in MD5Parser::SkipSpacesAndLineEnd by @tyler92 in https://github.com/assimp/assimp/pull/5921 +* Fix: Fix name collision by @kimkulling in https://github.com/assimp/assimp/pull/5937 +* Bug/evaluate matrix4x4 access by @kimkulling in https://github.com/assimp/assimp/pull/5936 +* glTF importers: Avoid strncpy truncating away the ' \0' character by @david-campos in https://github.com/assimp/assimp/pull/5931 +* Export tangents in GLTF by @JulianKnodt in https://github.com/assimp/assimp/pull/5900 +* Disable logs for fuzzer by default by @tyler92 in https://github.com/assimp/assimp/pull/5938 +* Fix docs for aiImportFileExWithProperties to not talk about the importer keeping the Scene alive by @david-campos in https://github.com/assimp/assimp/pull/5925 +* Fix stack overflow in LWS loader by @tyler92 in https://github.com/assimp/assimp/pull/5941 +* Introduce VRML format (.wrl and .x3dv) 3D model support by @tellypresence in https://github.com/assimp/assimp/pull/5857 +* Verify negative values in Quake1 MDL header by @tyler92 in https://github.com/assimp/assimp/pull/5940 +* Fix heap buffer overflow in HMP loader by @tyler92 in https://github.com/assimp/assimp/pull/5939 +* pragma warning bug fix when using g++ on windows by @stekap000 in https://github.com/assimp/assimp/pull/5943 +* AssbinImporter::ReadInternFile now closes stream before throwing by @david-campos in https://github.com/assimp/assimp/pull/5927 +* Updated Material.cpp to Add Missing Texture Types to String by @crazyjackel in https://github.com/assimp/assimp/pull/5945 +* Docker: Optimize usage by @kimkulling in https://github.com/assimp/assimp/pull/5948 +* Bugfix/cosmetic code cleanup by @kimkulling in https://github.com/assimp/assimp/pull/5947 +* Add arm64-simulator support to iOS build script by @DwayneCoussement in https://github.com/assimp/assimp/pull/5920 +* Add aiProcess_ValidateDataStructure flag to the fuzzer by @tyler92 in https://github.com/assimp/assimp/pull/5951 +* Update OpenDDLParser.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5953 +* [AMF] Fix texture mapping by @tellypresence in https://github.com/assimp/assimp/pull/5949 +* [FBX] Allow export multi materials per node by @JulianKnodt in https://github.com/assimp/assimp/pull/5888 +* Assimp master head fixes for failure to compile by @enginmanap in https://github.com/assimp/assimp/pull/5899 +* Prefix MTL textures with the MTL directory path by @david-campos in https://github.com/assimp/assimp/pull/5928 +* Add customExtension support to the scene by @BurntRanch in https://github.com/assimp/assimp/pull/5954 +* Avoid exporting all primitives, which are not triangles. by @kimkulling in https://github.com/assimp/assimp/pull/5964 +* Added GLTF Extension KHR_materials_anisotropy by @luho383 in https://github.com/assimp/assimp/pull/5950 +* Add POST_BUILD option to ADD_CUSTOM_COMMAND by @MikeChemi in https://github.com/assimp/assimp/pull/5962 +* Fix heap buffer overflow in PLY parser by @tyler92 in https://github.com/assimp/assimp/pull/5956 +* Optimise building tinyusd library by @Pichas in https://github.com/assimp/assimp/pull/5959 +* Add gltf metallic-roughness texture type by @tellypresence in https://github.com/assimp/assimp/pull/5968 +* fix: reduce gltf2 export time by @1323236654 in https://github.com/assimp/assimp/pull/5972 +* Flag Documentation Fix by @snave333 in https://github.com/assimp/assimp/pull/5978 +* Doc: Make hint clearer by @kimkulling in https://github.com/assimp/assimp/pull/5988 +* Clean STEPFileReader.cpp by @mosfet80 in https://github.com/assimp/assimp/pull/5973 +* Update Readme.md: Add new viewer by @kimkulling in https://github.com/assimp/assimp/pull/5991 +* Doc: Separate viewer by @kimkulling in https://github.com/assimp/assimp/pull/5995 +* Use correct data type for animation key by @kimkulling in https://github.com/assimp/assimp/pull/5998 +* Use ear-cutting library for triangulation by @Saalvage in https://github.com/assimp/assimp/pull/5977 +* Fixing PyAssimp misalignment errors with certain structures by @fishguy6564 in https://github.com/assimp/assimp/pull/6001 +* Bugfix/fix mingw issue 5975 by @kimkulling in https://github.com/assimp/assimp/pull/6005 +* IFC: Remove redundand check by @kimkulling in https://github.com/assimp/assimp/pull/6006 +* Obj: remove smooth-normals postprocessing by @kimkulling in https://github.com/assimp/assimp/pull/6031 +* Refactorings: glTF cleanups by @kimkulling in https://github.com/assimp/assimp/pull/6028 +* Fix memory leak in OpenGEXImporter by @UnionTech-Software in https://github.com/assimp/assimp/pull/6036 +* Use std::copy to copy array and remove user destructor to make sure is_trivially_copyable in order to avoid -Wno-error=nontrivial-memcall by @cielavenir in https://github.com/assimp/assimp/pull/6029 +* Fix: Let OpenGEX accept color3 types by @kimkulling in https://github.com/assimp/assimp/pull/6040 +* ASE: Fix possible out of bound access. by @kimkulling in https://github.com/assimp/assimp/pull/6045 +* MDL: Limit max texture sizes by @kimkulling in https://github.com/assimp/assimp/pull/6046 +* MDL: Fix overflow check by @kimkulling in https://github.com/assimp/assimp/pull/6047 +* Fix: Avoid override in line parsing by @kimkulling in https://github.com/assimp/assimp/pull/6048 +* Bugfix: Fix possible nullptr dereferencing by @kimkulling in https://github.com/assimp/assimp/pull/6049 +* Potential fix for code scanning alert no. 63: Potential use after free by @kimkulling in https://github.com/assimp/assimp/pull/6050 +* ASE: Use correct vertex container by @kimkulling in https://github.com/assimp/assimp/pull/6051 +* CMS: Fix possible overflow access by @kimkulling in https://github.com/assimp/assimp/pull/6052 +* [OpenGEX] disable partial implementation of light import (causes model load failure) by @tellypresence in https://github.com/assimp/assimp/pull/6044 +* Update tinyusdz git hash (fix USD animation) by @tellypresence in https://github.com/assimp/assimp/pull/6034 +* [draft] Check the hunter build by @kimkulling in https://github.com/assimp/assimp/pull/6061 +* NDO: Fix possible overflow access by @yuntongzhang in https://github.com/assimp/assimp/pull/6055 +* Fix Cinema4D Import by @krishty in https://github.com/assimp/assimp/pull/6062 +* Remove Redundant `virtual` by @krishty in https://github.com/assimp/assimp/pull/6064 +* feat: created the aiGetStringC_Str() function. by @leliel-git in https://github.com/assimp/assimp/pull/6059 +* Fix Whitespace by @krishty in https://github.com/assimp/assimp/pull/6063 +* Harmonize Importer #includes by @krishty in https://github.com/assimp/assimp/pull/6065 +* More `constexpr` by @krishty in https://github.com/assimp/assimp/pull/6066 +* Renamed and inlined hasSkeletons() to HasSkeletons() for API consistency by @Alexelnet in https://github.com/assimp/assimp/pull/6072 +* Fix set by @kimkulling in https://github.com/assimp/assimp/pull/6073 +* Bugfix/ensure collada parsing works issue 1488 by @kimkulling in https://github.com/assimp/assimp/pull/6087 +* Not to export empty "LayerElementNormal" or "LayerElementColor" nodes to fbx by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/6092 +* Use unique pointer to fix possible leak by @kimkulling in https://github.com/assimp/assimp/pull/6104 +* Refactoring of PR #6092 by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/6101 +* fix: Fix build on armv6/armv7 by @yurivict in https://github.com/assimp/assimp/pull/6123 +* Bugfix: Handling no of texture coordinates correctly by @kimkulling in https://github.com/assimp/assimp/pull/6124 +* fix: possible Heap-based Buffer Overflow in ConvertToUTF8 function by @TinyTinni in https://github.com/assimp/assimp/pull/6122 +* Refactor by @kimkulling in https://github.com/assimp/assimp/pull/6127 +* support for cmake findpackage module mode by @kiroeko in https://github.com/assimp/assimp/pull/6121 +* Replace exception by error in log by @kimkulling in https://github.com/assimp/assimp/pull/6133 +* Fix a out of bound buffer access in ParsingUtils GetNextLine by @qingyouzhao in https://github.com/assimp/assimp/pull/6134 +* Fix a bug where string erases throws out of range by @qingyouzhao in https://github.com/assimp/assimp/pull/6135 +* Fix: Support uint16 indices in OpenGEX as well by @kimkulling in https://github.com/assimp/assimp/pull/6137 +* Fix crashes by @kimkulling in https://github.com/assimp/assimp/pull/6138 +* + Only the recognition of KTX2 compressed images as texture objects within the glb model is currently handled. by @copycd in https://github.com/assimp/assimp/pull/6139 +* add missing constants by @daef in https://github.com/assimp/assimp/pull/6116 +* Fix warning abut inexistent warning by @limdor in https://github.com/assimp/assimp/pull/6153 +* Fix: Fix leak when sortbyp failes with exception by @kimkulling in https://github.com/assimp/assimp/pull/6166 +* Update contrib/zip to fix data loss warning by @limdor in https://github.com/assimp/assimp/pull/6152 +* Fix out-of-bounds dereferencing by @Marti2203 in https://github.com/assimp/assimp/pull/6150 +* [#5983] Fix bugs introduced in fbx export by @JulianKnodt in https://github.com/assimp/assimp/pull/6000 +* Doc: add C++ / c minimum by @kimkulling in https://github.com/assimp/assimp/pull/6187 +* Unreal refactorings by @kimkulling in https://github.com/assimp/assimp/pull/6182 +* update draco lib by @mosfet80 in https://github.com/assimp/assimp/pull/6094 +* fix: missing OS separator in outfile by @Latios96 in https://github.com/assimp/assimp/pull/6098 +* Add Missing Strings to aiTextureTypeToString by @crasong in https://github.com/assimp/assimp/pull/6188 +* Fix issue compiling when assimp added as subdirectory by @plemanski in https://github.com/assimp/assimp/pull/6186 +* Add clamping logic for to_ktime by @Marti2203 in https://github.com/assimp/assimp/pull/6149 +* Add explicit "fallthrough" to switch by @tellypresence in https://github.com/assimp/assimp/pull/6143 +* Fix HUNTER_ERROR_PAGE by @deccer in https://github.com/assimp/assimp/pull/6200 +* Fix a bug in importing binary PLY file (#1) by @yurik42 in https://github.com/assimp/assimp/pull/6060 +* Fix export fbx PolygonVertexIndex by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/6102 +* fix: closes #6069 CVE-2025-3196 by @VinzSpring in https://github.com/assimp/assimp/pull/6154 +* Fix: Add "preservePivots" condition when importing FBX animation by @Nor-s in https://github.com/assimp/assimp/pull/6115 + +## New Contributors +* @Begasus made their first contribution in https://github.com/assimp/assimp/pull/5255 +* @ockeymm made their first contribution in https://github.com/assimp/assimp/pull/5252 +* @fvbj made their first contribution in https://github.com/assimp/assimp/pull/5243 +* @JulianKnodt made their first contribution in https://github.com/assimp/assimp/pull/5295 +* @sloriot made their first contribution in https://github.com/assimp/assimp/pull/5270 +* @Ipomoea made their first contribution in https://github.com/assimp/assimp/pull/5271 +* @aumuell made their first contribution in https://github.com/assimp/assimp/pull/5278 +* @TarcioV made their first contribution in https://github.com/assimp/assimp/pull/5279 +* @copycd made their first contribution in https://github.com/assimp/assimp/pull/5294 +* @cuppajoeman made their first contribution in https://github.com/assimp/assimp/pull/5312 +* @ttxine made their first contribution in https://github.com/assimp/assimp/pull/5322 +* @Futuremappermydud made their first contribution in https://github.com/assimp/assimp/pull/5356 +* @MarkaRagnos0815 made their first contribution in https://github.com/assimp/assimp/pull/5359 +* @0xf0ad made their first contribution in https://github.com/assimp/assimp/pull/5376 +* @seanth made their first contribution in https://github.com/assimp/assimp/pull/5426 +* @tigert1998 made their first contribution in https://github.com/assimp/assimp/pull/5436 +* @GalenXiao made their first contribution in https://github.com/assimp/assimp/pull/5361 +* @Th3T3chn0G1t made their first contribution in https://github.com/assimp/assimp/pull/5397 +* @etam made their first contribution in https://github.com/assimp/assimp/pull/5462 +* @adfwer233 made their first contribution in https://github.com/assimp/assimp/pull/5480 +* @LukasBanana made their first contribution in https://github.com/assimp/assimp/pull/5490 +* @thenanisore made their first contribution in https://github.com/assimp/assimp/pull/5525 +* @RoboSchmied made their first contribution in https://github.com/assimp/assimp/pull/5518 +* @AlexTMjugador made their first contribution in https://github.com/assimp/assimp/pull/5516 +* @tomheaton made their first contribution in https://github.com/assimp/assimp/pull/5507 +* @alexrp made their first contribution in https://github.com/assimp/assimp/pull/5535 +* @ZeunO8 made their first contribution in https://github.com/assimp/assimp/pull/5545 +* @Succ3s made their first contribution in https://github.com/assimp/assimp/pull/5550 +* @johannesugb made their first contribution in https://github.com/assimp/assimp/pull/5542 +* @xiaoxiaopifu made their first contribution in https://github.com/assimp/assimp/pull/5561 +* @uyjulian made their first contribution in https://github.com/assimp/assimp/pull/5569 +* @dbs4261 made their first contribution in https://github.com/assimp/assimp/pull/5577 +* @vengine made their first contribution in https://github.com/assimp/assimp/pull/5575 +* @BradlyLanducci made their first contribution in https://github.com/assimp/assimp/pull/5600 +* @micott made their first contribution in https://github.com/assimp/assimp/pull/5608 +* @ycn2022 made their first contribution in https://github.com/assimp/assimp/pull/5624 +* @ThatOSDev made their first contribution in https://github.com/assimp/assimp/pull/5639 +* @mapret made their first contribution in https://github.com/assimp/assimp/pull/5640 +* @thearchivalone made their first contribution in https://github.com/assimp/assimp/pull/5650 +* @sgayda2 made their first contribution in https://github.com/assimp/assimp/pull/5658 +* @JensEhrhardt-eOPUS made their first contribution in https://github.com/assimp/assimp/pull/5432 +* @Kimbatt made their first contribution in https://github.com/assimp/assimp/pull/5695 +* @natevm made their first contribution in https://github.com/assimp/assimp/pull/5713 +* @mkuritsu made their first contribution in https://github.com/assimp/assimp/pull/5693 +* @Sanchikuuus made their first contribution in https://github.com/assimp/assimp/pull/5101 +* @imdongye made their first contribution in https://github.com/assimp/assimp/pull/5728 +* @ochafik made their first contribution in https://github.com/assimp/assimp/pull/5681 +* @fuhaixi made their first contribution in https://github.com/assimp/assimp/pull/5675 +* @AKosmachyov made their first contribution in https://github.com/assimp/assimp/pull/5648 +* @Fav made their first contribution in https://github.com/assimp/assimp/pull/5647 +* @cla7aye15I4nd made their first contribution in https://github.com/assimp/assimp/pull/5765 +* @lxw404 made their first contribution in https://github.com/assimp/assimp/pull/5751 +* @PatrickDahlin made their first contribution in https://github.com/assimp/assimp/pull/5780 +* @Pichas made their first contribution in https://github.com/assimp/assimp/pull/5774 +* @chefrolle695 made their first contribution in https://github.com/assimp/assimp/pull/5826 +* @qingyouzhao made their first contribution in https://github.com/assimp/assimp/pull/5801 +* @mischmit made their first contribution in https://github.com/assimp/assimp/pull/5810 +* @AMZN-Gene made their first contribution in https://github.com/assimp/assimp/pull/5852 +* @jwbla made their first contribution in https://github.com/assimp/assimp/pull/5863 +* @david-campos made their first contribution in https://github.com/assimp/assimp/pull/5844 +* @miselin made their first contribution in https://github.com/assimp/assimp/pull/5881 +* @hankarun made their first contribution in https://github.com/assimp/assimp/pull/5902 +* @HandsomeXi made their first contribution in https://github.com/assimp/assimp/pull/5883 +* @lijenicol made their first contribution in https://github.com/assimp/assimp/pull/5884 +* @kursataktas made their first contribution in https://github.com/assimp/assimp/pull/5887 +* @tyler92 made their first contribution in https://github.com/assimp/assimp/pull/5918 +* @scschaefer made their first contribution in https://github.com/assimp/assimp/pull/5891 +* @stekap000 made their first contribution in https://github.com/assimp/assimp/pull/5943 +* @crazyjackel made their first contribution in https://github.com/assimp/assimp/pull/5945 +* @DwayneCoussement made their first contribution in https://github.com/assimp/assimp/pull/5920 +* @BurntRanch made their first contribution in https://github.com/assimp/assimp/pull/5954 +* @MikeChemi made their first contribution in https://github.com/assimp/assimp/pull/5962 +* @1323236654 made their first contribution in https://github.com/assimp/assimp/pull/5972 +* @snave333 made their first contribution in https://github.com/assimp/assimp/pull/5978 +* @fishguy6564 made their first contribution in https://github.com/assimp/assimp/pull/6001 +* @UnionTech-Software made their first contribution in https://github.com/assimp/assimp/pull/6036 +* @cielavenir made their first contribution in https://github.com/assimp/assimp/pull/6029 +* @yuntongzhang made their first contribution in https://github.com/assimp/assimp/pull/6055 +* @leliel-git made their first contribution in https://github.com/assimp/assimp/pull/6059 +* @Alexelnet made their first contribution in https://github.com/assimp/assimp/pull/6072 +* @yurivict made their first contribution in https://github.com/assimp/assimp/pull/6123 +* @kiroeko made their first contribution in https://github.com/assimp/assimp/pull/6121 +* @limdor made their first contribution in https://github.com/assimp/assimp/pull/6153 +* @Marti2203 made their first contribution in https://github.com/assimp/assimp/pull/6150 +* @Latios96 made their first contribution in https://github.com/assimp/assimp/pull/6098 +* @crasong made their first contribution in https://github.com/assimp/assimp/pull/6188 +* @plemanski made their first contribution in https://github.com/assimp/assimp/pull/6186 +* @deccer made their first contribution in https://github.com/assimp/assimp/pull/6200 +* @yurik42 made their first contribution in https://github.com/assimp/assimp/pull/6060 +* @VinzSpring made their first contribution in https://github.com/assimp/assimp/pull/6154 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.3.1...v6.0.0 + +# 5.4.3 +## What's Changed +* Fix building on Haiku by @Begasus in https://github.com/assimp/assimp/pull/5255 +* Reduce memory consumption in JoinVerticesProcess::ProcessMesh() signi… by @ockeymm in https://github.com/assimp/assimp/pull/5252 +* Fix: Add check for invalid input argument by @kimkulling in https://github.com/assimp/assimp/pull/5258 +* Replace an assert by an error log. by @kimkulling in https://github.com/assimp/assimp/pull/5260 +* Extension of skinning data export to GLB/GLTF format by @fvbj in https://github.com/assimp/assimp/pull/5243 +* Fix output floating-point values to fbx by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/5265 +* Update ImproveCacheLocality.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5268 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5277 +* Deep arsdk bone double free by @kimkulling in https://github.com/assimp/assimp/pull/5291 +* Fix Spelling error by @JulianKnodt in https://github.com/assimp/assimp/pull/5295 +* Use size in order to be compatible with float and double by @sloriot in https://github.com/assimp/assimp/pull/5270 +* Fix: Add missing transformation for normalized normals. by @kimkulling in https://github.com/assimp/assimp/pull/5301 +* Fix: Implicit Conversion Error by @Ipomoea in https://github.com/assimp/assimp/pull/5271 +* Fix add checks for indices by @kimkulling in https://github.com/assimp/assimp/pull/5306 +* Update FBXBinaryTokenizer.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5311 +* link to external minizip with full path by @aumuell in https://github.com/assimp/assimp/pull/5278 +* utf8 header not found by @TarcioV in https://github.com/assimp/assimp/pull/5279 +* Rm unnecessary deg->radian conversion in FBX exporter by @JulianKnodt in https://github.com/assimp/assimp/pull/5281 +* Fix empty mesh handling by @kimkulling in https://github.com/assimp/assimp/pull/5318 +* Refactoring: Some cleanups by @kimkulling in https://github.com/assimp/assimp/pull/5319 +* Fix invalid read of `uint` from `uvwsrc` by @JulianKnodt in https://github.com/assimp/assimp/pull/5282 +* Remove double delete by @kimkulling in https://github.com/assimp/assimp/pull/5325 +* Fix mesh-name error. by @copycd in https://github.com/assimp/assimp/pull/5294 +* COLLADA fixes for textures in C4D input by @wmatyjewicz in https://github.com/assimp/assimp/pull/5293 +* Use the correct allocator for deleting objects in case of duplicate a… by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5305 +* Fix container overflow in MMD parser by @aavenel in https://github.com/assimp/assimp/pull/5309 +* Fix: PLY heap buffer overflow by @aavenel in https://github.com/assimp/assimp/pull/5310 +* Update Readme.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5312 +* Update Readme.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5313 +* Fix: Check if index for mesh access is out of range by @kimkulling in https://github.com/assimp/assimp/pull/5338 +* Update FBXConverter.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5349 +* FBX: Use correct time scaling by @kimkulling in https://github.com/assimp/assimp/pull/5355 +* Drop explicit inclusion of contrib/ headers by @umlaeute in https://github.com/assimp/assimp/pull/5316 +* Update Build.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5314 +* Fix buffer overflow in FBX::Util::DecodeBase64() by @ttxine in https://github.com/assimp/assimp/pull/5322 +* Readme.md: correct 2 errors in section headers by @stephengold in https://github.com/assimp/assimp/pull/5351 +* Fix double free in Video::~Video() by @ttxine in https://github.com/assimp/assimp/pull/5323 +* FBXMeshGeometry: solve issue #5116 using patch provided by darktjm by @stephengold in https://github.com/assimp/assimp/pull/5333 +* Fix target names not being imported on some gLTF2 models by @Futuremappermydud in https://github.com/assimp/assimp/pull/5356 +* correct grammar/typographic errors in comments (8 files) by @stephengold in https://github.com/assimp/assimp/pull/5343 +* KHR_materials_specular fixes by @rudybear in https://github.com/assimp/assimp/pull/5347 +* Disable Hunter by @kimkulling in https://github.com/assimp/assimp/pull/5388 +* fixed several issues by @MarkaRagnos0815 in https://github.com/assimp/assimp/pull/5359 +* Fix leak by @kimkulling in https://github.com/assimp/assimp/pull/5391 +* Check validity of archive without parsing by @kimkulling in https://github.com/assimp/assimp/pull/5393 +* Fix integer overflow by @kimkulling in https://github.com/assimp/assimp/pull/5394 +* Add a test before generating the txture folder by @kimkulling in https://github.com/assimp/assimp/pull/5400 +* Build: Disable building zlib for non-windows by @kimkulling in https://github.com/assimp/assimp/pull/5401 +* null check. by @copycd in https://github.com/assimp/assimp/pull/5402 +* Bump actions/upload-artifact from 3 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5384 +* fix: KHR_materials_pbrSpecularGlossiness/diffuseFactor convert to pbr… by @guguTang in https://github.com/assimp/assimp/pull/5410 +* fix building errors for MinGW by @0xf0ad in https://github.com/assimp/assimp/pull/5376 +* dynamic_cast error. by @copycd in https://github.com/assimp/assimp/pull/5406 +* Add missing IRR textures by @tellypresence in https://github.com/assimp/assimp/pull/5374 +* Update Dockerfile by @kimkulling in https://github.com/assimp/assimp/pull/5412 +* Fix handling of X3D IndexedLineSet nodes by @andre-schulz in https://github.com/assimp/assimp/pull/5362 +* Improve acc file loading by @IOBYTE in https://github.com/assimp/assimp/pull/5360 +* Readme.md: present hyperlinks in a more uniform style by @stephengold in https://github.com/assimp/assimp/pull/5364 +* FBX Blendshape `FullWeight: Vec` -> `FullWeight: Vec` by @JulianKnodt in https://github.com/assimp/assimp/pull/5441 +* Fix for issues #5422, #3411, and #5443 -- DXF insert scaling fix and colour fix by @seanth in https://github.com/assimp/assimp/pull/5426 +* Update StbCommon.h to stay up-to-date with stb_image.h. by @tigert1998 in https://github.com/assimp/assimp/pull/5436 +* Introduce aiBuffer by @kimkulling in https://github.com/assimp/assimp/pull/5444 +* Add bounds checks to the parsing utilities. by @kimkulling in https://github.com/assimp/assimp/pull/5421 +* Fix crash in viewer by @kimkulling in https://github.com/assimp/assimp/pull/5446 +* Static code analysis fixes by @kimkulling in https://github.com/assimp/assimp/pull/5447 +* Kimkulling/fix behavior of remove redundant mats issue 5438 by @kimkulling in https://github.com/assimp/assimp/pull/5451 +* Fix X importer breakage introduced in commit f844c33 by @tellypresence in https://github.com/assimp/assimp/pull/5372 +* Fileformats.md: clarify that import of .blend files is deprecated by @stephengold in https://github.com/assimp/assimp/pull/5350 +* feat:1.add 3mf vertex color read 2.fix 3mf read texture bug by @GalenXiao in https://github.com/assimp/assimp/pull/5361 +* More GLTF loading hardening by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5415 +* Bump actions/cache from 3 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5431 +* Update CMakeLists.txt by @mosfet80 in https://github.com/assimp/assimp/pull/5379 +* `Blendshape`->`Geometry` in FBX Export by @JulianKnodt in https://github.com/assimp/assimp/pull/5419 +* Fix identity matrix check by @fvbj in https://github.com/assimp/assimp/pull/5445 +* Fix PyAssimp under Python >= 3.12 and macOS library search support by @Th3T3chn0G1t in https://github.com/assimp/assimp/pull/5397 +* Add ISC LICENSE file by @severin-lemaignan in https://github.com/assimp/assimp/pull/5465 +* ColladaParser: check values length by @etam in https://github.com/assimp/assimp/pull/5462 +* Include defs in not cpp-section by @kimkulling in https://github.com/assimp/assimp/pull/5466 +* Add correct double zero check by @kimkulling in https://github.com/assimp/assimp/pull/5471 +* Add zlib-header to ZipArchiveIOSystem.h by @kimkulling in https://github.com/assimp/assimp/pull/5473 +* Add 2024 to copyright infos by @kimkulling in https://github.com/assimp/assimp/pull/5475 +* Append a new setting "AI_CONFIG_EXPORT_FBX_TRANSPARENCY_FACTOR_REFER_TO_OPACITY" by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/5450 +* Eliminate non-ascii comments in clipper by @adfwer233 in https://github.com/assimp/assimp/pull/5480 +* Fix compilation for MSVC14. by @LukasBanana in https://github.com/assimp/assimp/pull/5490 +* Add correction of fbx model rotation by @kimkulling in https://github.com/assimp/assimp/pull/5494 +* Delete tools/make directory by @mosfet80 in https://github.com/assimp/assimp/pull/5491 +* Delete packaging/windows-mkzip directory by @mosfet80 in https://github.com/assimp/assimp/pull/5492 +* Fix #5420 duplicate degrees to radians conversion in fbx importer by @Biohazard90 in https://github.com/assimp/assimp/pull/5427 +* Respect merge identical vertices in ObjExporter by @JulianKnodt in https://github.com/assimp/assimp/pull/5521 +* Fix utDefaultIOStream test under MinGW by @thenanisore in https://github.com/assimp/assimp/pull/5525 +* Fix typos by @RoboSchmied in https://github.com/assimp/assimp/pull/5518 +* Add initial macOS support to C4D importer by @AlexTMjugador in https://github.com/assimp/assimp/pull/5516 +* Update hunter into CMakeLists.txt by @mosfet80 in https://github.com/assimp/assimp/pull/5505 +* Fix: add a missing import for `AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON_DEFAULT` by @tomheaton in https://github.com/assimp/assimp/pull/5507 +* updated json by @mosfet80 in https://github.com/assimp/assimp/pull/5501 +* Cleanup: Fix review findings by @kimkulling in https://github.com/assimp/assimp/pull/5528 +* Update CMakeLists.txt by @kimkulling in https://github.com/assimp/assimp/pull/5531 +* CMake: Allow linking draco statically if ASSIMP_BUILD_DRACO_STATIC is set. by @alexrp in https://github.com/assimp/assimp/pull/5535 +* updated minizip to last version by @mosfet80 in https://github.com/assimp/assimp/pull/5498 +* updated STBIMAGElib by @mosfet80 in https://github.com/assimp/assimp/pull/5500 +* fix issue #5461 (segfault after removing redundant materials) by @stephengold in https://github.com/assimp/assimp/pull/5467 +* Update ComputeUVMappingProcess.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5541 +* add some ASSIMP_INSTALL checks by @ZeunO8 in https://github.com/assimp/assimp/pull/5545 +* Fix SplitByBoneCount typo that prevented node updates by @Succ3s in https://github.com/assimp/assimp/pull/5550 +* Q3DLoader: Fix possible material string overflow by @kimkulling in https://github.com/assimp/assimp/pull/5556 +* Reverts the changes introduced by commit ad766cb in February 2022. by @johannesugb in https://github.com/assimp/assimp/pull/5542 +* fix a collada import bug by @xiaoxiaopifu in https://github.com/assimp/assimp/pull/5561 +* mention IQM loader in Fileformats.md by @Garux in https://github.com/assimp/assimp/pull/5560 +* Kimkulling/fix pyassimp compatibility by @kimkulling in https://github.com/assimp/assimp/pull/5563 +* fix ASE loader crash when *MATERIAL_COUNT or *NUMSUBMTLS is not specified or is 0 by @Garux in https://github.com/assimp/assimp/pull/5559 +* Add checks for invalid buffer and size by @kimkulling in https://github.com/assimp/assimp/pull/5570 +* Make sure for release revision will be zero by @kimkulling in https://github.com/assimp/assimp/pull/5571 +* glTF2Importer: Support .vrm extension by @uyjulian in https://github.com/assimp/assimp/pull/5569 +* Prepare v5.4.1 by @kimkulling in https://github.com/assimp/assimp/pull/5573 +* Remove deprecated c++11 warnings by @kimkulling in https://github.com/assimp/assimp/pull/5576 +* fix ci by disabling tests by @kimkulling in https://github.com/assimp/assimp/pull/5583 +* Fix integer overflow by @kimkulling in https://github.com/assimp/assimp/pull/5581 +* Assimp viewer fixes by @JLouis-B in https://github.com/assimp/assimp/pull/5582 +* Optimize readability by @kimkulling in https://github.com/assimp/assimp/pull/5578 +* Temporary fix for #5557 GCC 13+ build issue -Warray-bounds by @dbs4261 in https://github.com/assimp/assimp/pull/5577 +* Fix a bug that could cause an assertion failure. by @vengine in https://github.com/assimp/assimp/pull/5575 +* Fix possible nullptr dereferencing. by @kimkulling in https://github.com/assimp/assimp/pull/5595 +* Update ObjFileParser.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5598 +* Fix for #5592 Disabled maybe-uninitialized error for AssetLib/Obj/ObjFileParser.cpp by @dbs4261 in https://github.com/assimp/assimp/pull/5593 +* updated zip by @mosfet80 in https://github.com/assimp/assimp/pull/5499 +* Postprocessing: Fix endless loop by @kimkulling in https://github.com/assimp/assimp/pull/5605 +* Build: Fix compilation for VS-2022 debug mode - warning by @kimkulling in https://github.com/assimp/assimp/pull/5606 +* Converted a size_t to mz_uint that was being treated as an error by @BradlyLanducci in https://github.com/assimp/assimp/pull/5600 +* Add trim to xml string parsing by @kimkulling in https://github.com/assimp/assimp/pull/5611 +* Replace duplicated trim by @kimkulling in https://github.com/assimp/assimp/pull/5613 +* Move aiScene constructor by @kimkulling in https://github.com/assimp/assimp/pull/5614 +* Move revision.h and revision.h.in to include folder by @kimkulling in https://github.com/assimp/assimp/pull/5615 +* Update MDLMaterialLoader.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5620 +* Create inno_setup by @kimkulling in https://github.com/assimp/assimp/pull/5621 +* clean HunterGate.cmake by @mosfet80 in https://github.com/assimp/assimp/pull/5619 +* Draft: Update init of aiString by @kimkulling in https://github.com/assimp/assimp/pull/5623 +* Fix init aiString issue 5622 in python module by @kimkulling in https://github.com/assimp/assimp/pull/5625 +* update dotnet example by @mosfet80 in https://github.com/assimp/assimp/pull/5618 +* Make step file schema validation more robust. by @kimkulling in https://github.com/assimp/assimp/pull/5627 +* fix PLY binary export color from float to uchar by @michaelsctts in https://github.com/assimp/assimp/pull/5608 +* Some FBXs do not have "Materials" information, which can cause parsing errors by @ycn2022 in https://github.com/assimp/assimp/pull/5624 +* Fix collada uv channels - temporary was stored and then updated. by @StepanHrbek in https://github.com/assimp/assimp/pull/5630 +* remove ASE parsing break by @Garux in https://github.com/assimp/assimp/pull/5634 +* FBX-Exporter: Fix nullptr dereferencing by @kimkulling in https://github.com/assimp/assimp/pull/5638 +* Fix FBX exporting incorrect bone order by @JulianKnodt in https://github.com/assimp/assimp/pull/5435 +* fixes potential memory leak on malformed obj file by @TinyTinni in https://github.com/assimp/assimp/pull/5645 +* Update zip.c by @ThatOSDev in https://github.com/assimp/assimp/pull/5639 +* Fixes some uninit bool loads by @TinyTinni in https://github.com/assimp/assimp/pull/5644 +* Fix names of enum values in docstring of aiProcess_FindDegenerates by @mapret in https://github.com/assimp/assimp/pull/5640 +* Fix: StackAllocator Undefined Reference fix by @bedwardly-down in https://github.com/assimp/assimp/pull/5650 +* Plx: Fix out-of-bound access by @kimkulling in https://github.com/assimp/assimp/pull/5651 +* Docker: Fix security finding by @kimkulling in https://github.com/assimp/assimp/pull/5655 +* Fix potential heapbuffer overflow in md5 parsing by @TinyTinni in https://github.com/assimp/assimp/pull/5652 +* Replace raw pointers by std::string by @kimkulling in https://github.com/assimp/assimp/pull/5656 +* Fix compile warning by @kimkulling in https://github.com/assimp/assimp/pull/5657 +* Allow empty slots in mTextureCoords by @StepanHrbek in https://github.com/assimp/assimp/pull/5636 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5663 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5665 +* [USD] Integrate "tinyusdz" project by @tellypresence in https://github.com/assimp/assimp/pull/5628 +* Kimkulling/fix double precision tests by @kimkulling in https://github.com/assimp/assimp/pull/5660 +* Update Python structs with missing fields that were causing core dumps by @vjf in https://github.com/assimp/assimp/pull/5673 +* Introduce interpolation mode to vector and quaternion keys by @kimkulling in https://github.com/assimp/assimp/pull/5674 +* Fix a fuzz test heap buffer overflow in mdl material loader by @sgayda2 in https://github.com/assimp/assimp/pull/5658 +* Mosfet80 updatedpoli2tri by @kimkulling in https://github.com/assimp/assimp/pull/5682 +* CalcTangents: zero vector is invalid for tangent/bitangent by @JensEhrhardt-eOPUS in https://github.com/assimp/assimp/pull/5432 +* A fuzzed stride could cause the max count to become negative and henc… by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5414 +* Return false instead of a crash by @kimkulling in https://github.com/assimp/assimp/pull/5685 +* Make coord transfor for hs1 files optional by @kimkulling in https://github.com/assimp/assimp/pull/5687 +* Update DefaultIOSystem.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5697 +* FBX exporter - handle multiple vertex color channels by @Kimbatt in https://github.com/assimp/assimp/pull/5695 +* Fixing static builds on Windows by @natevm in https://github.com/assimp/assimp/pull/5713 +* Added AND condition in poly2tri dll_symbol.h to only define macros fo… by @mkuritsu in https://github.com/assimp/assimp/pull/5693 +* Fix MSVC PDBs and permit them to be disabled if required by @RichardTea in https://github.com/assimp/assimp/pull/5710 +* Use DRACO_GLTF_BITSTREAM by @RichardTea in https://github.com/assimp/assimp/pull/5709 +* include Exceptional.h in 3DSExporter.cpp by @Fiskmans in https://github.com/assimp/assimp/pull/5707 +* Remove recursive include by @Fiskmans in https://github.com/assimp/assimp/pull/5705 +* Fix: Possible out-of-bound read in findDegenerate by @TinyTinni in https://github.com/assimp/assimp/pull/5679 +* Revert variable name by @tellypresence in https://github.com/assimp/assimp/pull/5715 +* Add compile option /source-charset:utf-8 for MSVC by @kenichiice in https://github.com/assimp/assimp/pull/5716 +* Fix leak in loader by @kimkulling in https://github.com/assimp/assimp/pull/5718 +* Expose aiGetEmbeddedTexture to C-API by @sacereda in https://github.com/assimp/assimp/pull/5382 +* Sparky kitty studios master by @kimkulling in https://github.com/assimp/assimp/pull/5727 +* Added more Maya materials by @Sanchikuuus in https://github.com/assimp/assimp/pull/5101 +* Fix to check both types of slashes in GetShortFilename by @imdongye in https://github.com/assimp/assimp/pull/5728 +* Bump actions/download-artifact from 1 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5732 +* Bump actions/upload-artifact from 1 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5731 +* Bump softprops/action-gh-release from 1 to 2 by @dependabot in https://github.com/assimp/assimp/pull/5730 +* Fix copying private data when the source pointer is NULL by @vjf in https://github.com/assimp/assimp/pull/5733 +* Fix potential memory leak in SceneCombiner for LWS/IRR/MD3 loader by @TinyTinni in https://github.com/assimp/assimp/pull/5721 +* Fix to correctly determine 'multi-configuration' on Windows by @kenichiice in https://github.com/assimp/assimp/pull/5720 +* Fix casting typo in D3MFExporter::writeBaseMaterials by @ochafik in https://github.com/assimp/assimp/pull/5681 +* FBX: add metadata of aiNode as properties by @fuhaixi in https://github.com/assimp/assimp/pull/5675 +* feat: add an option for creating XCFramework and configure minimum iOS target by @AKosmachyov in https://github.com/assimp/assimp/pull/5648 +* Update PyAssimp structs with Skeleton & SkeletonBone members by @vjf in https://github.com/assimp/assimp/pull/5734 +* The total length is incorrect when exporting gltf2 by @Fav in https://github.com/assimp/assimp/pull/5647 +* `build`: Add ccache support by @ochafik in https://github.com/assimp/assimp/pull/5686 +* Update ccpp.yml by @kimkulling in https://github.com/assimp/assimp/pull/5740 +* Ply-Importer: Fix vulnerability by @kimkulling in https://github.com/assimp/assimp/pull/5739 +* prepare v5.4.3 by @kimkulling in https://github.com/assimp/assimp/pull/5741 + +## New Contributors +* @Begasus made their first contribution in https://github.com/assimp/assimp/pull/5255 +* @ockeymm made their first contribution in https://github.com/assimp/assimp/pull/5252 +* @fvbj made their first contribution in https://github.com/assimp/assimp/pull/5243 +* @JulianKnodt made their first contribution in https://github.com/assimp/assimp/pull/5295 +* @sloriot made their first contribution in https://github.com/assimp/assimp/pull/5270 +* @Ipomoea made their first contribution in https://github.com/assimp/assimp/pull/5271 +* @aumuell made their first contribution in https://github.com/assimp/assimp/pull/5278 +* @TarcioV made their first contribution in https://github.com/assimp/assimp/pull/5279 +* @copycd made their first contribution in https://github.com/assimp/assimp/pull/5294 +* @cuppajoeman made their first contribution in https://github.com/assimp/assimp/pull/5312 +* @ttxine made their first contribution in https://github.com/assimp/assimp/pull/5322 +* @Futuremappermydud made their first contribution in https://github.com/assimp/assimp/pull/5356 +* @MarkaRagnos0815 made their first contribution in https://github.com/assimp/assimp/pull/5359 +* @0xf0ad made their first contribution in https://github.com/assimp/assimp/pull/5376 +* @seanth made their first contribution in https://github.com/assimp/assimp/pull/5426 +* @tigert1998 made their first contribution in https://github.com/assimp/assimp/pull/5436 +* @GalenXiao made their first contribution in https://github.com/assimp/assimp/pull/5361 +* @Th3T3chn0G1t made their first contribution in https://github.com/assimp/assimp/pull/5397 +* @etam made their first contribution in https://github.com/assimp/assimp/pull/5462 +* @adfwer233 made their first contribution in https://github.com/assimp/assimp/pull/5480 +* @LukasBanana made their first contribution in https://github.com/assimp/assimp/pull/5490 +* @thenanisore made their first contribution in https://github.com/assimp/assimp/pull/5525 +* @RoboSchmied made their first contribution in https://github.com/assimp/assimp/pull/5518 +* @AlexTMjugador made their first contribution in https://github.com/assimp/assimp/pull/5516 +* @tomheaton made their first contribution in https://github.com/assimp/assimp/pull/5507 +* @alexrp made their first contribution in https://github.com/assimp/assimp/pull/5535 +* @ZeunO8 made their first contribution in https://github.com/assimp/assimp/pull/5545 +* @Succ3s made their first contribution in https://github.com/assimp/assimp/pull/5550 +* @johannesugb made their first contribution in https://github.com/assimp/assimp/pull/5542 +* @xiaoxiaopifu made their first contribution in https://github.com/assimp/assimp/pull/5561 +* @uyjulian made their first contribution in https://github.com/assimp/assimp/pull/5569 +* @dbs4261 made their first contribution in https://github.com/assimp/assimp/pull/5577 +* @vengine made their first contribution in https://github.com/assimp/assimp/pull/5575 +* @BradlyLanducci made their first contribution in https://github.com/assimp/assimp/pull/5600 +* @michaelsctts made their first contribution in https://github.com/assimp/assimp/pull/5608 +* @ycn2022 made their first contribution in https://github.com/assimp/assimp/pull/5624 +* @ThatOSDev made their first contribution in https://github.com/assimp/assimp/pull/5639 +* @mapret made their first contribution in https://github.com/assimp/assimp/pull/5640 +* @bedwardly-down made their first contribution in https://github.com/assimp/assimp/pull/5650 +* @sgayda2 made their first contribution in https://github.com/assimp/assimp/pull/5658 +* @JensEhrhardt-eOPUS made their first contribution in https://github.com/assimp/assimp/pull/5432 +* @Kimbatt made their first contribution in https://github.com/assimp/assimp/pull/5695 +* @natevm made their first contribution in https://github.com/assimp/assimp/pull/5713 +* @mkuritsu made their first contribution in https://github.com/assimp/assimp/pull/5693 +* @Sanchikuuus made their first contribution in https://github.com/assimp/assimp/pull/5101 +* @imdongye made their first contribution in https://github.com/assimp/assimp/pull/5728 +* @ochafik made their first contribution in https://github.com/assimp/assimp/pull/5681 +* @fuhaixi made their first contribution in https://github.com/assimp/assimp/pull/5675 +* @AKosmachyov made their first contribution in https://github.com/assimp/assimp/pull/5648 +* @Fav made their first contribution in https://github.com/assimp/assimp/pull/5647 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.3.1...v5.4.3 + +# 5.4.2 +## What's Changed +* Fix building on Haiku by @Begasus in https://github.com/assimp/assimp/pull/5255 +* Reduce memory consumption in JoinVerticesProcess::ProcessMesh() signi… by @ockeymm in https://github.com/assimp/assimp/pull/5252 +* Fix: Add check for invalid input argument by @kimkulling in https://github.com/assimp/assimp/pull/5258 +* Replace an assert by a error log. by @kimkulling in https://github.com/assimp/assimp/pull/5260 +* Extension of skinning data export to GLB/GLTF format by @fvbj in https://github.com/assimp/assimp/pull/5243 +* Fix output floating-point values to fbx by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/5265 +* Update ImproveCacheLocality.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5268 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5277 +* Deep arsdk bone double free by @kimkulling in https://github.com/assimp/assimp/pull/5291 +* Fix Spelling error by @JulianKnodt in https://github.com/assimp/assimp/pull/5295 +* use size in order to be compatible with float and double by @sloriot in https://github.com/assimp/assimp/pull/5270 +* Fix: Add missing transformation for normalized normals. by @kimkulling in https://github.com/assimp/assimp/pull/5301 +* Fix: Implicit Conversion Error by @Ipomoea in https://github.com/assimp/assimp/pull/5271 +* Fix add checks for indices by @kimkulling in https://github.com/assimp/assimp/pull/5306 +* Update FBXBinaryTokenizer.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5311 +* link to external minizip with full path by @aumuell in https://github.com/assimp/assimp/pull/5278 +* utf8 header not found by @TarcioV in https://github.com/assimp/assimp/pull/5279 +* Rm unnecessary deg->radian conversion in FBX exporter by @JulianKnodt in https://github.com/assimp/assimp/pull/5281 +* Fix empty mesh handling by @kimkulling in https://github.com/assimp/assimp/pull/5318 +* Refactoring: Some cleanups by @kimkulling in https://github.com/assimp/assimp/pull/5319 +* Fix invalid read of `uint` from `uvwsrc` by @JulianKnodt in https://github.com/assimp/assimp/pull/5282 +* Remove double delete by @kimkulling in https://github.com/assimp/assimp/pull/5325 +* fix mesh-name error. by @copycd in https://github.com/assimp/assimp/pull/5294 +* COLLADA fixes for textures in C4D input by @wmatyjewicz in https://github.com/assimp/assimp/pull/5293 +* Use the correct allocator for deleting objects in case of duplicate a… by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5305 +* Fix container overflow in MMD parser by @aavenel in https://github.com/assimp/assimp/pull/5309 +* Fix: PLY heap buffer overflow by @aavenel in https://github.com/assimp/assimp/pull/5310 +* Update Readme.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5312 +* Update Readme.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5313 +* Fix: Check if index for mesh access is out of range by @kimkulling in https://github.com/assimp/assimp/pull/5338 +* Update FBXConverter.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5349 +* FBX: Use correct time scaling by @kimkulling in https://github.com/assimp/assimp/pull/5355 +* Drop explicit inclusion of contrib/ headers by @umlaeute in https://github.com/assimp/assimp/pull/5316 +* Update Build.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5314 +* Fix buffer overflow in FBX::Util::DecodeBase64() by @ttxine in https://github.com/assimp/assimp/pull/5322 +* Readme.md: correct 2 errors in section headers by @stephengold in https://github.com/assimp/assimp/pull/5351 +* Fix double free in Video::~Video() by @ttxine in https://github.com/assimp/assimp/pull/5323 +* FBXMeshGeometry: solve issue #5116 using patch provided by darktjm by @stephengold in https://github.com/assimp/assimp/pull/5333 +* Fix target names not being imported on some gLTF2 models by @Futuremappermydud in https://github.com/assimp/assimp/pull/5356 +* correct grammar/typographic errors in comments (8 files) by @stephengold in https://github.com/assimp/assimp/pull/5343 +* KHR_materials_specular fixes by @rudybear in https://github.com/assimp/assimp/pull/5347 +* Disable Hunter by @kimkulling in https://github.com/assimp/assimp/pull/5388 +* fixed several issues by @MarkaRagnos0815 in https://github.com/assimp/assimp/pull/5359 +* Fix leak by @kimkulling in https://github.com/assimp/assimp/pull/5391 +* Check validity of archive without parsing by @kimkulling in https://github.com/assimp/assimp/pull/5393 +* Fix integer overflow by @kimkulling in https://github.com/assimp/assimp/pull/5394 +* Add a test before generating the txture folder by @kimkulling in https://github.com/assimp/assimp/pull/5400 +* Build: Disable building zlib for non-windows by @kimkulling in https://github.com/assimp/assimp/pull/5401 +* null check. by @copycd in https://github.com/assimp/assimp/pull/5402 +* Bump actions/upload-artifact from 3 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5384 +* fix: KHR_materials_pbrSpecularGlossiness/diffuseFactor convert to pbr… by @guguTang in https://github.com/assimp/assimp/pull/5410 +* fix building errors for MinGW by @0xf0ad in https://github.com/assimp/assimp/pull/5376 +* dynamic_cast error. by @copycd in https://github.com/assimp/assimp/pull/5406 +* Add missing IRR textures by @tellypresence in https://github.com/assimp/assimp/pull/5374 +* Update Dockerfile by @kimkulling in https://github.com/assimp/assimp/pull/5412 +* Fix handling of X3D IndexedLineSet nodes by @andre-schulz in https://github.com/assimp/assimp/pull/5362 +* Improve acc file loading by @IOBYTE in https://github.com/assimp/assimp/pull/5360 +* Readme.md: present hyperlinks in a more uniform style by @stephengold in https://github.com/assimp/assimp/pull/5364 +* FBX Blendshape `FullWeight: Vec` -> `FullWeight: Vec` by @JulianKnodt in https://github.com/assimp/assimp/pull/5441 +* Fix for issues #5422, #3411, and #5443 -- DXF insert scaling fix and colour fix by @seanth in https://github.com/assimp/assimp/pull/5426 +* Update StbCommon.h to stay up-to-date with stb_image.h. by @tigert1998 in https://github.com/assimp/assimp/pull/5436 +* Introduce aiBuffer by @kimkulling in https://github.com/assimp/assimp/pull/5444 +* Add bounds checks to the parsing utilities. by @kimkulling in https://github.com/assimp/assimp/pull/5421 +* Fix crash in viewer by @kimkulling in https://github.com/assimp/assimp/pull/5446 +* Static code analysis fixes by @kimkulling in https://github.com/assimp/assimp/pull/5447 +* Kimkulling/fix bahavior of remove redundat mats issue 5438 by @kimkulling in https://github.com/assimp/assimp/pull/5451 +* Fix X importer breakage introduced in commit f844c33 by @tellypresence in https://github.com/assimp/assimp/pull/5372 +* Fileformats.md: clarify that import of .blend files is deprecated by @stephengold in https://github.com/assimp/assimp/pull/5350 +* feat:1.add 3mf vertex color read 2.fix 3mf read texture bug by @GalenXiao in https://github.com/assimp/assimp/pull/5361 +* More GLTF loading hardening by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5415 +* Bump actions/cache from 3 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5431 +* Update CMakeLists.txt by @mosfet80 in https://github.com/assimp/assimp/pull/5379 +* `Blendshape`->`Geometry` in FBX Export by @JulianKnodt in https://github.com/assimp/assimp/pull/5419 +* Fix identity matrix check by @fvbj in https://github.com/assimp/assimp/pull/5445 +* Fix PyAssimp under Python >= 3.12 and macOS library search support by @Th3T3chn0G1t in https://github.com/assimp/assimp/pull/5397 +* Add ISC LICENSE file by @severin-lemaignan in https://github.com/assimp/assimp/pull/5465 +* ColladaParser: check values length by @etam in https://github.com/assimp/assimp/pull/5462 +* Include defs in not cpp-section by @kimkulling in https://github.com/assimp/assimp/pull/5466 +* Add correct double zero check by @kimkulling in https://github.com/assimp/assimp/pull/5471 +* Add zlib-header to ZipArchiveIOSystem.h by @kimkulling in https://github.com/assimp/assimp/pull/5473 +* Add 2024 to copyright infos by @kimkulling in https://github.com/assimp/assimp/pull/5475 +* Append a new setting "AI_CONFIG_EXPORT_FBX_TRANSPARENCY_FACTOR_REFER_TO_OPACITY" by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/5450 +* Eliminate non-ascii comments in clipper by @adfwer233 in https://github.com/assimp/assimp/pull/5480 +* Fix compilation for MSVC14. by @LukasBanana in https://github.com/assimp/assimp/pull/5490 +* Add correction of fbx model rotation by @kimkulling in https://github.com/assimp/assimp/pull/5494 +* Delete tools/make directory by @mosfet80 in https://github.com/assimp/assimp/pull/5491 +* Delete packaging/windows-mkzip directory by @mosfet80 in https://github.com/assimp/assimp/pull/5492 +* Fix #5420 duplicate degrees to radians conversion in fbx importer by @Biohazard90 in https://github.com/assimp/assimp/pull/5427 +* Respect merge identical vertices in ObjExporter by @JulianKnodt in https://github.com/assimp/assimp/pull/5521 +* Fix utDefaultIOStream test under MinGW by @thenanisore in https://github.com/assimp/assimp/pull/5525 +* Fix typos by @RoboSchmied in https://github.com/assimp/assimp/pull/5518 +* Add initial macOS support to C4D importer by @AlexTMjugador in https://github.com/assimp/assimp/pull/5516 +* Update hunter into CMakeLists.txt by @mosfet80 in https://github.com/assimp/assimp/pull/5505 +* Fix: add missing import for `AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON_DEFAULT` by @tomheaton in https://github.com/assimp/assimp/pull/5507 +* updated json by @mosfet80 in https://github.com/assimp/assimp/pull/5501 +* Cleanup: Fix review findings by @kimkulling in https://github.com/assimp/assimp/pull/5528 +* Update CMakeLists.txt by @kimkulling in https://github.com/assimp/assimp/pull/5531 +* CMake: Allow linking draco statically if ASSIMP_BUILD_DRACO_STATIC is set. by @alexrp in https://github.com/assimp/assimp/pull/5535 +* updated minizip to last version by @mosfet80 in https://github.com/assimp/assimp/pull/5498 +* updated STBIMAGElib by @mosfet80 in https://github.com/assimp/assimp/pull/5500 +* fix issue #5461 (segfault after removing redundant materials) by @stephengold in https://github.com/assimp/assimp/pull/5467 +* Update ComputeUVMappingProcess.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5541 +* add some ASSIMP_INSTALL checks by @ZeunO8 in https://github.com/assimp/assimp/pull/5545 +* Fix SplitByBoneCount typo that prevented node updates by @Succ3s in https://github.com/assimp/assimp/pull/5550 +* Q3DLoader: Fix possible material string overflow by @kimkulling in https://github.com/assimp/assimp/pull/5556 +* Reverts the changes introduced by commit ad766cb in February 2022. by @johannesugb in https://github.com/assimp/assimp/pull/5542 +* fix a collada import bug by @xiaoxiaopifu in https://github.com/assimp/assimp/pull/5561 +* mention IQM loader in Fileformats.md by @Garux in https://github.com/assimp/assimp/pull/5560 +* Kimkulling/fix pyassimp compatibility by @kimkulling in https://github.com/assimp/assimp/pull/5563 +* fix ASE loader crash when *MATERIAL_COUNT or *NUMSUBMTLS is not specified or is 0 by @Garux in https://github.com/assimp/assimp/pull/5559 +* Add checks for invalid buffer and size by @kimkulling in https://github.com/assimp/assimp/pull/5570 +* Make sure for releases revision will be zero by @kimkulling in https://github.com/assimp/assimp/pull/5571 +* glTF2Importer: Support .vrm extension by @uyjulian in https://github.com/assimp/assimp/pull/5569 +* Prepare v5.4.1 by @kimkulling in https://github.com/assimp/assimp/pull/5573 +* Remove deprecated c++11 warnings by @kimkulling in https://github.com/assimp/assimp/pull/5576 +* fix ci by disabling tests by @kimkulling in https://github.com/assimp/assimp/pull/5583 +* Fix integer overflow by @kimkulling in https://github.com/assimp/assimp/pull/5581 +* Assimp viewer fixes by @JLouis-B in https://github.com/assimp/assimp/pull/5582 +* Optimize readability by @kimkulling in https://github.com/assimp/assimp/pull/5578 +* Temporary fix for #5557 GCC 13+ build issue -Warray-bounds by @dbs4261 in https://github.com/assimp/assimp/pull/5577 +* Fix a bug that could cause assertion failure. by @vengine in https://github.com/assimp/assimp/pull/5575 +* Fix possible nullptr dereferencing. by @kimkulling in https://github.com/assimp/assimp/pull/5595 +* Update ObjFileParser.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5598 +* Fix for #5592 Disabled maybe-uninitialized error for AssetLib/Obj/ObjFileParser.cpp by @dbs4261 in https://github.com/assimp/assimp/pull/5593 +* updated zip by @mosfet80 in https://github.com/assimp/assimp/pull/5499 +* Postprocessing: Fix endless loop by @kimkulling in https://github.com/assimp/assimp/pull/5605 +* Build: Fix compilation for VS-2022 debug mode - warning by @kimkulling in https://github.com/assimp/assimp/pull/5606 +* Converted a size_t to mz_uint that was being treated as an error by @BradlyLanducci in https://github.com/assimp/assimp/pull/5600 +* Add trim to xml string parsing by @kimkulling in https://github.com/assimp/assimp/pull/5611 +* Replace duplicated trim by @kimkulling in https://github.com/assimp/assimp/pull/5613 +* Move aiScene constructor by @kimkulling in https://github.com/assimp/assimp/pull/5614 +* Move revision.h and revision.h.in to include folder by @kimkulling in https://github.com/assimp/assimp/pull/5615 +* Update MDLMaterialLoader.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5620 +* Create inno_setup by @kimkulling in https://github.com/assimp/assimp/pull/5621 +* clean HunterGate.cmake by @mosfet80 in https://github.com/assimp/assimp/pull/5619 +* Draft: Update init of aiString by @kimkulling in https://github.com/assimp/assimp/pull/5623 +* Fix init aistring issue 5622 inpython module by @kimkulling in https://github.com/assimp/assimp/pull/5625 +* update dotnet example by @mosfet80 in https://github.com/assimp/assimp/pull/5618 +* Make stepfile schema validation more robust. by @kimkulling in https://github.com/assimp/assimp/pull/5627 +* fix PLY binary export color from float to uchar by @michaelsctts in https://github.com/assimp/assimp/pull/5608 +* Some FBXs do not have "Materials" information, which can cause parsing errors by @ycn2022 in https://github.com/assimp/assimp/pull/5624 +* Fix collada uv channels - temporary was stored and then updated. by @StepanHrbek in https://github.com/assimp/assimp/pull/5630 +* remove ASE parsing break by @Garux in https://github.com/assimp/assimp/pull/5634 +* FBX-Exporter: Fix nullptr dereferencing by @kimkulling in https://github.com/assimp/assimp/pull/5638 +* Fix FBX exporting incorrect bone order by @JulianKnodt in https://github.com/assimp/assimp/pull/5435 +* fixes potential memory leak on malformed obj file by @TinyTinni in https://github.com/assimp/assimp/pull/5645 +* Update zip.c by @ThatOSDev in https://github.com/assimp/assimp/pull/5639 +* Fixes some uninit bool loads by @TinyTinni in https://github.com/assimp/assimp/pull/5644 +* Fix names of enum values in docstring of aiProcess_FindDegenerates by @mapret in https://github.com/assimp/assimp/pull/5640 +* Fix: StackAllocator Undefined Reference fix by @bedwardly-down in https://github.com/assimp/assimp/pull/5650 +* Plx: Fix out of bound access by @kimkulling in https://github.com/assimp/assimp/pull/5651 + +## New Contributors +* @Begasus made their first contribution in https://github.com/assimp/assimp/pull/5255 +* @ockeymm made their first contribution in https://github.com/assimp/assimp/pull/5252 +* @fvbj made their first contribution in https://github.com/assimp/assimp/pull/5243 +* @JulianKnodt made their first contribution in https://github.com/assimp/assimp/pull/5295 +* @sloriot made their first contribution in https://github.com/assimp/assimp/pull/5270 +* @Ipomoea made their first contribution in https://github.com/assimp/assimp/pull/5271 +* @aumuell made their first contribution in https://github.com/assimp/assimp/pull/5278 +* @TarcioV made their first contribution in https://github.com/assimp/assimp/pull/5279 +* @copycd made their first contribution in https://github.com/assimp/assimp/pull/5294 +* @cuppajoeman made their first contribution in https://github.com/assimp/assimp/pull/5312 +* @ttxine made their first contribution in https://github.com/assimp/assimp/pull/5322 +* @Futuremappermydud made their first contribution in https://github.com/assimp/assimp/pull/5356 +* @MarkaRagnos0815 made their first contribution in https://github.com/assimp/assimp/pull/5359 +* @0xf0ad made their first contribution in https://github.com/assimp/assimp/pull/5376 +* @seanth made their first contribution in https://github.com/assimp/assimp/pull/5426 +* @tigert1998 made their first contribution in https://github.com/assimp/assimp/pull/5436 +* @GalenXiao made their first contribution in https://github.com/assimp/assimp/pull/5361 +* @Th3T3chn0G1t made their first contribution in https://github.com/assimp/assimp/pull/5397 +* @etam made their first contribution in https://github.com/assimp/assimp/pull/5462 +* @adfwer233 made their first contribution in https://github.com/assimp/assimp/pull/5480 +* @LukasBanana made their first contribution in https://github.com/assimp/assimp/pull/5490 +* @thenanisore made their first contribution in https://github.com/assimp/assimp/pull/5525 +* @RoboSchmied made their first contribution in https://github.com/assimp/assimp/pull/5518 +* @AlexTMjugador made their first contribution in https://github.com/assimp/assimp/pull/5516 +* @tomheaton made their first contribution in https://github.com/assimp/assimp/pull/5507 +* @alexrp made their first contribution in https://github.com/assimp/assimp/pull/5535 +* @ZeunO8 made their first contribution in https://github.com/assimp/assimp/pull/5545 +* @Succ3s made their first contribution in https://github.com/assimp/assimp/pull/5550 +* @johannesugb made their first contribution in https://github.com/assimp/assimp/pull/5542 +* @xiaoxiaopifu made their first contribution in https://github.com/assimp/assimp/pull/5561 +* @uyjulian made their first contribution in https://github.com/assimp/assimp/pull/5569 +* @dbs4261 made their first contribution in https://github.com/assimp/assimp/pull/5577 +* @vengine made their first contribution in https://github.com/assimp/assimp/pull/5575 +* @BradlyLanducci made their first contribution in https://github.com/assimp/assimp/pull/5600 +* @michaelsctts made their first contribution in https://github.com/assimp/assimp/pull/5608 +* @ycn2022 made their first contribution in https://github.com/assimp/assimp/pull/5624 +* @ThatOSDev made their first contribution in https://github.com/assimp/assimp/pull/5639 +* @mapret made their first contribution in https://github.com/assimp/assimp/pull/5640 +* @bedwardly-down made their first contribution in https://github.com/assimp/assimp/pull/5650 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.3.1...v5.4.2 + +# 5.4.1 +## What's Changed +* CMake: Allow linking draco statically if ASSIMP_BUILD_DRACO_STATIC is set. by @alexrp in https://github.com/assimp/assimp/pull/5535 +* Deps: updated minizip to last version by @mosfet80 in https://github.com/assimp/assimp/pull/5498 +* Deps: updated STBIMAGElib by @mosfet80 in https://github.com/assimp/assimp/pull/5500 +* Fix issue #5461 (segfault after removing redundant materials) by @stephengold in https://github.com/assimp/assimp/pull/5467 +* Update ComputeUVMappingProcess.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5541 +* Add some ASSIMP_INSTALL checks by @ZeunO8 in https://github.com/assimp/assimp/pull/5545 +* Fix SplitByBoneCount typo that prevented node updates by @Succ3s in https://github.com/assimp/assimp/pull/5550 +* Q3DLoader: Fix possible material string overflow by @kimkulling in https://github.com/assimp/assimp/pull/5556 +* Reverts the changes introduced by commit ad766cb in February 2022. by @johannesugb in https://github.com/assimp/assimp/pull/5542 +* Fix a collada import bug by @xiaoxiaopifu in https://github.com/assimp/assimp/pull/5561 +* Mention IQM loader in Fileformats.md by @Garux in https://github.com/assimp/assimp/pull/5560 +* Kimkulling/fix pyassimp compatibility by @kimkulling in https://github.com/assimp/assimp/pull/5563 +* Fix ASE loader crash when *MATERIAL_COUNT or *NUMSUBMTLS is not specified or is 0 by @Garux in https://github.com/assimp/assimp/pull/5559 +* Add checks for invalid buffer and size by @kimkulling in https://github.com/assimp/assimp/pull/5570 +* Make sure for releases revision will be zero by @kimkulling in https://github.com/assimp/assimp/pull/5571 +* glTF2Importer: Support .vrm extension by @uyjulian in https://github.com/assimp/assimp/pull/5569 +* Prepare v5.4.1 by @kimkulling in https://github.com/assimp/assimp/pull/5573 + +## New Contributors +* @alexrp made their first contribution in https://github.com/assimp/assimp/pull/5535 +* @ZeunO8 made their first contribution in https://github.com/assimp/assimp/pull/5545 +* @Succ3s made their first contribution in https://github.com/assimp/assimp/pull/5550 +* @johannesugb made their first contribution in https://github.com/assimp/assimp/pull/5542 +* @xiaoxiaopifu made their first contribution in https://github.com/assimp/assimp/pull/5561 +* @uyjulian made their first contribution in https://github.com/assimp/assimp/pull/5569 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.4.0...v5.4.1 + +# 5.4.0 +## What's Changed +* Fix building on Haiku by @Begasus in https://github.com/assimp/assimp/pull/5255 +* Reduce memory consumption in JoinVerticesProcess::ProcessMesh() signi… by @ockeymm in https://github.com/assimp/assimp/pull/5252 +* Fix: Add check for invalid input argument by @kimkulling in https://github.com/assimp/assimp/pull/5258 +* Replace an assert by an error log. by @kimkulling in https://github.com/assimp/assimp/pull/5260 +* Extension of skinning data export to GLB/GLTF format by @fvbj in https://github.com/assimp/assimp/pull/5243 +* Fix output floating-point values to fbx by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/5265 +* Update ImproveCacheLocality.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5268 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5277 +* Deep arsdk bone double free by @kimkulling in https://github.com/assimp/assimp/pull/5291 +* Fix Spelling error by @JulianKnodt in https://github.com/assimp/assimp/pull/5295 +* use size to be compatible with float and double by @sloriot in https://github.com/assimp/assimp/pull/5270 +* Fix: Add missing transformation for normalized normals. by @kimkulling in https://github.com/assimp/assimp/pull/5301 +* Fix: Implicit Conversion Error by @Ipomoea in https://github.com/assimp/assimp/pull/5271 +* Fix add checks for indices by @kimkulling in https://github.com/assimp/assimp/pull/5306 +* Update FBXBinaryTokenizer.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5311 +* link to external minizip with full path by @aumuell in https://github.com/assimp/assimp/pull/5278 +* utf8 header not found by @TarcioV in https://github.com/assimp/assimp/pull/5279 +* Rm unnecessary deg->radian conversion in FBX exporter by @JulianKnodt in https://github.com/assimp/assimp/pull/5281 +* Fix empty mesh handling by @kimkulling in https://github.com/assimp/assimp/pull/5318 +* Refactoring: Some cleanups by @kimkulling in https://github.com/assimp/assimp/pull/5319 +* Fix invalid read of `uint` from `uvwsrc` by @JulianKnodt in https://github.com/assimp/assimp/pull/5282 +* Remove double delete by @kimkulling in https://github.com/assimp/assimp/pull/5325 +* fix the mesh-name error. by @copycd in https://github.com/assimp/assimp/pull/5294 +* COLLADA fixes for textures in C4D input by @wmatyjewicz in https://github.com/assimp/assimp/pull/5293 +* Use the correct allocator for deleting objects in case of duplicate a… by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5305 +* Fix container overflow in MMD parser by @aavenel in https://github.com/assimp/assimp/pull/5309 +* Fix: PLY heap buffer overflow by @aavenel in https://github.com/assimp/assimp/pull/5310 +* Update Readme.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5312 +* Update Readme.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5313 +* Fix: Check if index for mesh access is out of range by @kimkulling in https://github.com/assimp/assimp/pull/5338 +* Update FBXConverter.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5349 +* FBX: Use correct time scaling by @kimkulling in https://github.com/assimp/assimp/pull/5355 +* Drop explicit inclusion of contrib/ headers by @umlaeute in https://github.com/assimp/assimp/pull/5316 +* Update Build.md by @cuppajoeman in https://github.com/assimp/assimp/pull/5314 +* Fix buffer overflow in FBX::Util::DecodeBase64() by @ttxine in https://github.com/assimp/assimp/pull/5322 +* Readme.md: correct 2 errors in section headers by @stephengold in https://github.com/assimp/assimp/pull/5351 +* Fix double free in Video::~Video() by @ttxine in https://github.com/assimp/assimp/pull/5323 +* FBXMeshGeometry: solve issue #5116 using patch provided by darktjm by @stephengold in https://github.com/assimp/assimp/pull/5333 +* Fix target names not being imported on some gLTF2 models by @Futuremappermydud in https://github.com/assimp/assimp/pull/5356 +* correct grammar/typographic errors in comments (8 files) by @stephengold in https://github.com/assimp/assimp/pull/5343 +* KHR_materials_specular fixes by @rudybear in https://github.com/assimp/assimp/pull/5347 +* Disable Hunter by @kimkulling in https://github.com/assimp/assimp/pull/5388 +* fixed several issues by @MarkaRagnos0815 in https://github.com/assimp/assimp/pull/5359 +* Fix leak by @kimkulling in https://github.com/assimp/assimp/pull/5391 +* Check the validity of the archive without parsing by @kimkulling in https://github.com/assimp/assimp/pull/5393 +* Fix integer overflow by @kimkulling in https://github.com/assimp/assimp/pull/5394 +* Add a test before generating the texture folder by @kimkulling in https://github.com/assimp/assimp/pull/5400 +* Build: Disable building zlib for non-windows by @kimkulling in https://github.com/assimp/assimp/pull/5401 +* null check. by @copycd in https://github.com/assimp/assimp/pull/5402 +* Bump actions/upload-artifact from 3 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5384 +* fix: KHR_materials_pbrSpecularGlossiness/diffuseFactor convert to pbr… by @guguTang in https://github.com/assimp/assimp/pull/5410 +* fix building errors for MinGW by @0xf0ad in https://github.com/assimp/assimp/pull/5376 +* dynamic_cast error. by @copycd in https://github.com/assimp/assimp/pull/5406 +* Add missing IRR textures by @tellypresence in https://github.com/assimp/assimp/pull/5374 +* Update Dockerfile by @kimkulling in https://github.com/assimp/assimp/pull/5412 +* Fix handling of X3D IndexedLineSet nodes by @andre-schulz in https://github.com/assimp/assimp/pull/5362 +* Improve acc file loading by @IOBYTE in https://github.com/assimp/assimp/pull/5360 +* Readme.md: present hyperlinks in a more uniform style by @stephengold in https://github.com/assimp/assimp/pull/5364 +* FBX Blendshape `FullWeight: Vec` -> `FullWeight: Vec` by @JulianKnodt in https://github.com/assimp/assimp/pull/5441 +* Fix for issues #5422, #3411, and #5443 -- DXF insert scaling fix and colour fix by @seanth in https://github.com/assimp/assimp/pull/5426 +* Update StbCommon.h to stay up-to-date with stb_image.h. by @tigert1998 in https://github.com/assimp/assimp/pull/5436 +* Introduce aiBuffer by @kimkulling in https://github.com/assimp/assimp/pull/5444 +* Add bounds checks to the parsing utilities. by @kimkulling in https://github.com/assimp/assimp/pull/5421 +* Fix crash in viewer by @kimkulling in https://github.com/assimp/assimp/pull/5446 +* Static code analysis fixes by @kimkulling in https://github.com/assimp/assimp/pull/5447 +* Kimkulling/fix behavior of remove redundant mats issue 5438 by @kimkulling in https://github.com/assimp/assimp/pull/5451 +* Fix X importer breakage introduced in commit f844c33 by @tellypresence in https://github.com/assimp/assimp/pull/5372 +* Fileformats.md: clarify that import of .blend files is deprecated by @stephengold in https://github.com/assimp/assimp/pull/5350 +* feat:1.add 3mf vertex color read 2.fix 3mf read texture bug by @GalenXiao in https://github.com/assimp/assimp/pull/5361 +* More GLTF loading hardening by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5415 +* Bump actions/cache from 3 to 4 by @dependabot in https://github.com/assimp/assimp/pull/5431 +* Update CMakeLists.txt by @mosfet80 in https://github.com/assimp/assimp/pull/5379 +* `Blendshape`->`Geometry` in FBX Export by @JulianKnodt in https://github.com/assimp/assimp/pull/5419 +* Fix identity matrix check by @fvbj in https://github.com/assimp/assimp/pull/5445 +* Fix PyAssimp under Python >= 3.12 and macOS library search support by @Th3T3chn0G1t in https://github.com/assimp/assimp/pull/5397 +* Add ISC LICENSE file by @severin-lemaignan in https://github.com/assimp/assimp/pull/5465 +* ColladaParser: check values length by @etam in https://github.com/assimp/assimp/pull/5462 +* Include defs in not cpp-section by @kimkulling in https://github.com/assimp/assimp/pull/5466 +* Add correct double zero check by @kimkulling in https://github.com/assimp/assimp/pull/5471 +* Add zlib-header to ZipArchiveIOSystem.h by @kimkulling in https://github.com/assimp/assimp/pull/5473 +* Add 2024 to copyright infos by @kimkulling in https://github.com/assimp/assimp/pull/5475 +* Append a new setting "AI_CONFIG_EXPORT_FBX_TRANSPARENCY_FACTOR_REFER_TO_OPACITY" by @Riv1s-sSsA01 in https://github.com/assimp/assimp/pull/5450 +* Eliminate non-ascii comments in clipper by @adfwer233 in https://github.com/assimp/assimp/pull/5480 +* Fix compilation for MSVC14. by @LukasBanana in https://github.com/assimp/assimp/pull/5490 +* Add correction of fbx model rotation by @kimkulling in https://github.com/assimp/assimp/pull/5494 +* Delete tools/make directory by @mosfet80 in https://github.com/assimp/assimp/pull/5491 +* Delete packaging/windows-mkzip directory by @mosfet80 in https://github.com/assimp/assimp/pull/5492 +* Fix #5420 duplicate degrees to radians conversion in fbx importer by @Biohazard90 in https://github.com/assimp/assimp/pull/5427 +* Respect merge identical vertices in ObjExporter by @JulianKnodt in https://github.com/assimp/assimp/pull/5521 +* Fix utDefaultIOStream test under MinGW by @thenanisore in https://github.com/assimp/assimp/pull/5525 +* Fix typos by @RoboSchmied in https://github.com/assimp/assimp/pull/5518 +* Add initial macOS support to C4D importer by @AlexTMjugador in https://github.com/assimp/assimp/pull/5516 +* Update hunter into CMakeLists.txt by @mosfet80 in https://github.com/assimp/assimp/pull/5505 +* Fix: add a missing import for `AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON_DEFAULT` by @tomheaton in https://github.com/assimp/assimp/pull/5507 +* updated json by @mosfet80 in https://github.com/assimp/assimp/pull/5501 +* Cleanup: Fix review findings by @kimkulling in https://github.com/assimp/assimp/pull/5528 +* Update CMakeLists.txt by @kimkulling in https://github.com/assimp/assimp/pull/5531 + +## New Contributors +* @Begasus made their first contribution in https://github.com/assimp/assimp/pull/5255 +* @ockeymm made their first contribution in https://github.com/assimp/assimp/pull/5252 +* @fvbj made their first contribution in https://github.com/assimp/assimp/pull/5243 +* @JulianKnodt made their first contribution in https://github.com/assimp/assimp/pull/5295 +* @sloriot made their first contribution in https://github.com/assimp/assimp/pull/5270 +* @Ipomoea made their first contribution in https://github.com/assimp/assimp/pull/5271 +* @aumuell made their first contribution in https://github.com/assimp/assimp/pull/5278 +* @TarcioV made their first contribution in https://github.com/assimp/assimp/pull/5279 +* @copycd made their first contribution in https://github.com/assimp/assimp/pull/5294 +* @cuppajoeman made their first contribution in https://github.com/assimp/assimp/pull/5312 +* @ttxine made their first contribution in https://github.com/assimp/assimp/pull/5322 +* @Futuremappermydud made their first contribution in https://github.com/assimp/assimp/pull/5356 +* @MarkaRagnos0815 made their first contribution in https://github.com/assimp/assimp/pull/5359 +* @0xf0ad made their first contribution in https://github.com/assimp/assimp/pull/5376 +* @seanth made their first contribution in https://github.com/assimp/assimp/pull/5426 +* @tigert1998 made their first contribution in https://github.com/assimp/assimp/pull/5436 +* @GalenXiao made their first contribution in https://github.com/assimp/assimp/pull/5361 +* @Th3T3chn0G1t made their first contribution in https://github.com/assimp/assimp/pull/5397 +* @etam made their first contribution in https://github.com/assimp/assimp/pull/5462 +* @adfwer233 made their first contribution in https://github.com/assimp/assimp/pull/5480 +* @LukasBanana made their first contribution in https://github.com/assimp/assimp/pull/5490 +* @thenanisore made their first contribution in https://github.com/assimp/assimp/pull/5525 +* @RoboSchmied made their first contribution in https://github.com/assimp/assimp/pull/5518 +* @AlexTMjugador made their first contribution in https://github.com/assimp/assimp/pull/5516 +* @tomheaton made their first contribution in https://github.com/assimp/assimp/pull/5507 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.3.1...v5.4.0 + +# 5.3.0 +## What's Changed +* fix variable name by @mosfet80 in https://github.com/assimp/assimp/pull/5249 +* Bugfix: Remove unused header from types by @kimkulling in https://github.com/assimp/assimp/pull/5250 +* contrib/zip/src/zip.h: correct 2 spelling errors in comments by @stephengold in https://github.com/assimp/assimp/pull/5248 +* Updated cpp-pm/hunter into CMakeLists.txt by @mosfet80 in https://github.com/assimp/assimp/pull/5236 + +## New Contributors +* @stephengold made their first contribution in https://github.com/assimp/assimp/pull/5248 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.3.0...v5.3.1 + +## What's Changed +* Perfect forward val to utMaybe.cpp by @Skylion007 in https://github.com/assimp/assimp/pull/4717 +* Fix config documentation for STL pointcloud export by @kimkulling in https://github.com/assimp/assimp/pull/4721 +* Missing path by @ramzeng in https://github.com/assimp/assimp/pull/4723 +* Fix: Use ASCII treeview in assimp-cmd. by @kimkulling in https://github.com/assimp/assimp/pull/4728 +* Add check for wall switch from cmake by @kimkulling in https://github.com/assimp/assimp/pull/4731 +* Adjust cmake version by @waebbl in https://github.com/assimp/assimp/pull/4730 +* IMP: Reorganize doc by @kimkulling in https://github.com/assimp/assimp/pull/4732 +* FIX: Fix head overflow in MD5-parser. by @kimkulling in https://github.com/assimp/assimp/pull/4736 +* Introduce newer versions for MSVC Version by @kimkulling in https://github.com/assimp/assimp/pull/4739 +* Prefix symbols from stb_image.h by @p12tic in https://github.com/assimp/assimp/pull/4737 +* GitHub Workflows security hardening by @sashashura in https://github.com/assimp/assimp/pull/4734 +* FIX: C++ std::tuple constexpr initial list on old compiler by @feishengfei in https://github.com/assimp/assimp/pull/4742 +* Make FBX parser resilient to missing data streams by @FlorianBorn71 in https://github.com/assimp/assimp/pull/4738 +* fix incorrect documentation of defaults by @cwoac in https://github.com/assimp/assimp/pull/4745 +* Fixed issue with clang complaining about sprintf and vsprintf being depreciated by @slinky55 in https://github.com/assimp/assimp/pull/4744 +* Fix build error: ‘temp’ may be used uninitialized in this function by @rhabacker in https://github.com/assimp/assimp/pull/4754 +* FIX: Use correct epsilon by @kimkulling in https://github.com/assimp/assimp/pull/4756 +* Use correct flags for openddl for static libs by @kimkulling in https://github.com/assimp/assimp/pull/4757 +* Fix: Add missing handling for double export in json by @kimkulling in https://github.com/assimp/assimp/pull/4761 +* * fix bug reading ply file in case of presence of "end_header\n..." with starting by "\n" by @emvivre in https://github.com/assimp/assimp/pull/4755 +* Fixed error with trailing zero symbols as placeholder character by @Let0s in https://github.com/assimp/assimp/pull/4759 +* Fix: Avoid nullptr dereferencing + refactorings. by @kimkulling in https://github.com/assimp/assimp/pull/4776 +* chore: add missing std moves and perfect forwards by @Skylion007 in https://github.com/assimp/assimp/pull/4785 +* Update dependabot.yml by @kimkulling in https://github.com/assimp/assimp/pull/4794 +* Add missing header for Ubuntu 16 and Mac by @kimkulling in https://github.com/assimp/assimp/pull/4800 +* Don't hide out-of-memory during FBX import by @jakrams in https://github.com/assimp/assimp/pull/4801 +* Added support for KHR_materials_emissive_strength by @Beilinson in https://github.com/assimp/assimp/pull/4787 +* Add overflow check for invalid data. by @kimkulling in https://github.com/assimp/assimp/pull/4809 +* Add CIFuzz GitHub action by @DavidKorczynski in https://github.com/assimp/assimp/pull/4807 +* Fixed some grammar and spelling mistakes by @CMDR-JohnAlex in https://github.com/assimp/assimp/pull/4805 +* Introduce --parallel instead of .j by @kimkulling in https://github.com/assimp/assimp/pull/4813 +* Modernize smartptrs and use C++11 literals by @Skylion007 in https://github.com/assimp/assimp/pull/4792 +* [BlenderDNA.h] Declare explicit specializations by @tkoeppe in https://github.com/assimp/assimp/pull/4816 +* FIX: Fix possible division by zero by @kimkulling in https://github.com/assimp/assimp/pull/4820 +* Avoid undefined-shift in Assimp::ASE::Parser::ParseLV4MeshFace. by @kimkulling in https://github.com/assimp/assimp/pull/4829 +* Ensure the face pointer is not nullptr by @kimkulling in https://github.com/assimp/assimp/pull/4832 +* fix warnings-as-errors for msvc 2019 x64 by @Gargaj in https://github.com/assimp/assimp/pull/4825 +* Fixes Heap-buffer-overflow READ 4 in Assimp::ScenePreprocessor::ProcssMesh by @sashashura in https://github.com/assimp/assimp/pull/4836 +* Fixes Heap-buffer-overflow READ 1 in Assimp::MD5::MD5Parser::ParseHeader by @sashashura in https://github.com/assimp/assimp/pull/4837 +* Fixes Heap-buffer-overflow READ 1 in Assimp::ObjFileParser::getFace by @sashashura in https://github.com/assimp/assimp/pull/4838 +* Fixed bug when exporting binary FBX by @umesh-huawei in https://github.com/assimp/assimp/pull/4824 +* illegal token on right-side-of ::Windows by @rohit-kumar-j in https://github.com/assimp/assimp/pull/4846 +* Update unzip.c by @kimkulling in https://github.com/assimp/assimp/pull/4848 +* Refactoring: Move assert handler header to include by @kimkulling in https://github.com/assimp/assimp/pull/4850 +* sprintf to snprintf with known MAXLEN for buffer. by @sfjohnston in https://github.com/assimp/assimp/pull/4852 +* {cmake} Remove dead code by @asmaloney in https://github.com/assimp/assimp/pull/4858 +* Fix: Fix signed unsigned mismatch by @kimkulling in https://github.com/assimp/assimp/pull/4859 +* Fix: Fix possible division by zero by @kimkulling in https://github.com/assimp/assimp/pull/4861 +* Update the getting help section by @kimkulling in https://github.com/assimp/assimp/pull/4863 +* Fix several spelling mistakes by @asmaloney in https://github.com/assimp/assimp/pull/4855 +* Change mMethod type to enum aiMorphingMethod by @tellypresence in https://github.com/assimp/assimp/pull/4873 +* Remove deprecated comment by @kimkulling in https://github.com/assimp/assimp/pull/4876 +* Generalize JoinVerticesProcess for multiple UV and color channels by @drbct in https://github.com/assimp/assimp/pull/4872 +* Fix #4262 Build With M3D Import Only by @krishty in https://github.com/assimp/assimp/pull/4879 +* Fix #4877 by @MMory in https://github.com/assimp/assimp/pull/4878 +* Update LimitBoneWeightsProcess.cpp by @kimkulling in https://github.com/assimp/assimp/pull/4895 +* Remove /Zi compiler flag for MSVC, release config by @kimkulling in https://github.com/assimp/assimp/pull/4896 +* Ensure initializer exists by @kimkulling in https://github.com/assimp/assimp/pull/4897 +* Trim Trailing Whitespace by @krishty in https://github.com/assimp/assimp/pull/4882 +* Remove Useless “virtual” by @krishty in https://github.com/assimp/assimp/pull/4884 +* Replace Variables With Literals by @krishty in https://github.com/assimp/assimp/pull/4885 +* Fix: fix incorrect math for calculating the horizontal FOV of a perspective camera in gltf2 import #4435 by @shimaowo in https://github.com/assimp/assimp/pull/4886 +* Remove Stray Semicolon by @krishty in https://github.com/assimp/assimp/pull/4887 +* Tidy Up Constructors and Destructors by @krishty in https://github.com/assimp/assimp/pull/4888 +* Fix MSVC Warnings With “emplace_back()” by @krishty in https://github.com/assimp/assimp/pull/4889 +* Correctly consider aiProcess_FlipWindingOrder and aiProcess_MakeLeftHanded when generating normals by @lsnoel in https://github.com/assimp/assimp/pull/4892 +* Update morph mesh documentation now that gltf known to work by @tellypresence in https://github.com/assimp/assimp/pull/4904 +* Fix Build Without ArmaturePopulate Post Process Step by @krishty in https://github.com/assimp/assimp/pull/4880 +* Fix: Remove deprecated dependency. by @kimkulling in https://github.com/assimp/assimp/pull/4910 +* Optimized usedVertexIndices in JoinVerticesProcess by using bitmask instead of unordered_set by @AdamCichocki in https://github.com/assimp/assimp/pull/4901 +* Fix issue #4866 by continuing to reset read loop after hitting a comment by @PencilAmazing in https://github.com/assimp/assimp/pull/4899 +* Don't build zlib if ASSIMP_BUILD_ZLIB=OFF by @shaunrd0 in https://github.com/assimp/assimp/pull/4898 +* Unit test warning fixes by @turol in https://github.com/assimp/assimp/pull/4932 +* Fix Terragen loader by @turol in https://github.com/assimp/assimp/pull/4934 +* Fixes PLY reader when the header ends with \r\n by @TinyTinni in https://github.com/assimp/assimp/pull/4936 +* ACLoader: add support for reading more than one texture per object by @IOBYTE in https://github.com/assimp/assimp/pull/4935 +* Delete .coveralls.yml by @kimkulling in https://github.com/assimp/assimp/pull/4941 +* Fix: Fix memleak when exiting method by exception by @kimkulling in https://github.com/assimp/assimp/pull/4943 +* The member 'Flush()' needs to be marked as an override for msvc clang compiling by @jiannanya in https://github.com/assimp/assimp/pull/4945 +* Add skeleton doc by @kimkulling in https://github.com/assimp/assimp/pull/4946 +* Fix PyAssimp README typo by @shammellee in https://github.com/assimp/assimp/pull/4960 +* Add missing pod types. by @kimkulling in https://github.com/assimp/assimp/pull/4967 +* Fix implicit conversion errors on macOS by @aaronmjacobs in https://github.com/assimp/assimp/pull/4965 +* Update mesh.h by @kimkulling in https://github.com/assimp/assimp/pull/4962 +* Move string definitions into the conditional block to fix unused variable warnings by @turol in https://github.com/assimp/assimp/pull/4969 +* Fix: Fix typo in the doc by @kimkulling in https://github.com/assimp/assimp/pull/4974 +* Fix index out of bounds by @mjunix in https://github.com/assimp/assimp/pull/4970 +* Fix index out of bounds by @mjunix in https://github.com/assimp/assimp/pull/4971 +* fix regression in join vertices post process. by @ockeymm123 in https://github.com/assimp/assimp/pull/4940 +* Fix a leak in FBXDocument when duplicate object IDs are found by @avaneyev in https://github.com/assimp/assimp/pull/4963 +* LWO fixes by @turol in https://github.com/assimp/assimp/pull/4977 +* Fix build error when building SimpleTexturedDirectx11 with VS2022. by @Jackie9527 in https://github.com/assimp/assimp/pull/4989 +* Fix: Use C++17 compliant utf8 encoding. by @kimkulling in https://github.com/assimp/assimp/pull/4986 +* remove debug message from MemoryIOStream by @urshanselmann in https://github.com/assimp/assimp/pull/4994 +* After Kim's addition to metadata types, use it in the FBX converter by @FlorianBorn71 in https://github.com/assimp/assimp/pull/4999 +* Optimize subdivision process by @turol in https://github.com/assimp/assimp/pull/5000 +* upgrade draco to 1.5.6 by @Jackie9527 in https://github.com/assimp/assimp/pull/4978 +* C-API: Code cleanup by @kimkulling in https://github.com/assimp/assimp/pull/5004 +* upgrade stb_image to v2.28. by @Jackie9527 in https://github.com/assimp/assimp/pull/4991 +* bugfix the three vertices are collinear by @Jackie9527 in https://github.com/assimp/assimp/pull/4979 +* Kimkulling/refactoring geoutils by @kimkulling in https://github.com/assimp/assimp/pull/5009 +* Remove alarm badge by @kimkulling in https://github.com/assimp/assimp/pull/5011 +* Fix Half-Life 1 MDL importer bone hierarchy. by @malortie in https://github.com/assimp/assimp/pull/5007 +* Make Blender MVert no field optional by @turol in https://github.com/assimp/assimp/pull/5006 +* bugfix removes duplicated data. by @Jackie9527 in https://github.com/assimp/assimp/pull/4980 +* Validate node hierarchy parents by @turol in https://github.com/assimp/assimp/pull/5001 +* Add more ASE model unit tests by @turol in https://github.com/assimp/assimp/pull/5023 +* bugfix fails to check if the point in the triangle. by @Jackie9527 in https://github.com/assimp/assimp/pull/4981 +* Revert 3D model corrupted by a8a1ca9 by @tellypresence in https://github.com/assimp/assimp/pull/5019 +* Two bug fixes in Python port. by @MakerOfWyverns in https://github.com/assimp/assimp/pull/4985 +* Add more AMF unit tests by @turol in https://github.com/assimp/assimp/pull/5026 +* Create CODE_OF_CONDUCT.md by @kimkulling in https://github.com/assimp/assimp/pull/5030 +* Add UTF-8 versions of UTF-16LE IRR/IRRMesh files by @tellypresence in https://github.com/assimp/assimp/pull/5017 +* Test more files by @turol in https://github.com/assimp/assimp/pull/5031 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5034 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5035 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/5032 +* Fix link issue in UWP builds without functional replacement by @liedtkeInTUM in https://github.com/assimp/assimp/pull/5037 +* Add build options to fix issues with clang 15. by @Jackie9527 in https://github.com/assimp/assimp/pull/4993 +* Remove unused -Wno-shadow-field-in-constructor. by @Jackie9527 in https://github.com/assimp/assimp/pull/5052 +* Fix Issue #4486 using the fix described by @jianliang79 by @aniongithub in https://github.com/assimp/assimp/pull/5053 +* Fix warning related to nested-anon-types. by @Jackie9527 in https://github.com/assimp/assimp/pull/5040 +* GLTF Importer: Build a list of the actual vertices so it works well with shared attribute lists by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5003 +* FBX import: Fix camera rotation by @inhosens in https://github.com/assimp/assimp/pull/5025 +* std::getenv is not supported using uwp by @liedtkeInTUM in https://github.com/assimp/assimp/pull/5039 +* Fix warning related to format-non-iso. by @Jackie9527 in https://github.com/assimp/assimp/pull/5041 +* Fix warning related to unreachable-code. by @Jackie9527 in https://github.com/assimp/assimp/pull/5042 +* Fix pre transform vertices with cameras by @sutajo in https://github.com/assimp/assimp/pull/5056 +* glTF2: Fix incorrect camera position by @sutajo in https://github.com/assimp/assimp/pull/5055 +* ConvertToLHProcess now inverts viewing direction by @sutajo in https://github.com/assimp/assimp/pull/5057 +* Delete License.txt by @kimkulling in https://github.com/assimp/assimp/pull/5064 +* Fix possible dereferencing of invalid pointers. by @kimkulling in https://github.com/assimp/assimp/pull/5066 +* Fix: Fix leak in Scope class, FBX by @kimkulling in https://github.com/assimp/assimp/pull/5067 +* Replace relative paths with local assets/textures by @tellypresence in https://github.com/assimp/assimp/pull/5043 +* Fix: Avoid integer overflow in inversion operation by @kimkulling in https://github.com/assimp/assimp/pull/5068 +* Fix warning related to unreachable-code-return. by @Jackie9527 in https://github.com/assimp/assimp/pull/5045 +* Fix warning related to unreachable-code-break. by @Jackie9527 in https://github.com/assimp/assimp/pull/5046 +* Fix warning related to missing-noreturn. by @Jackie9527 in https://github.com/assimp/assimp/pull/5047 +* Remove unused -Wno-deprecated-copy-with-user-provided-dtor. by @Jackie9527 in https://github.com/assimp/assimp/pull/5048 +* Fix warning related to inconsistent-missing-destructor-override. by @Jackie9527 in https://github.com/assimp/assimp/pull/5049 +* Remove -Wno-deprecated-copy-with-dtor. by @Jackie9527 in https://github.com/assimp/assimp/pull/5051 +* Build Zlib if missing for other platforms by @danoli3 in https://github.com/assimp/assimp/pull/5063 +* Fix warning related to missing-variable-declarations. by @Jackie9527 in https://github.com/assimp/assimp/pull/5070 +* Add missing cast by @sutajo in https://github.com/assimp/assimp/pull/5073 +* Fix build warnings. by @Jackie9527 in https://github.com/assimp/assimp/pull/5075 +* fix unreachable code by @showintime in https://github.com/assimp/assimp/pull/5078 +* Kimkulling/refactoring geoutils by @kimkulling in https://github.com/assimp/assimp/pull/5086 +* Fix: Copy aiMetadata in SceneCombiner by @luho383 in https://github.com/assimp/assimp/pull/5092 +* Update: Enable export for fuzzer tests by @kimkulling in https://github.com/assimp/assimp/pull/5095 +* Florian born71 small allocation fix in fbx loader by @kimkulling in https://github.com/assimp/assimp/pull/5096 +* Small allocation fix in fbx loader by @FlorianBorn71 in https://github.com/assimp/assimp/pull/4494 +* Update ASELoader.cpp by @kimkulling in https://github.com/assimp/assimp/pull/5099 +* Updated DirectX Loader to assign appropriate material index in ConvertMaterials Function by @naota29 in https://github.com/assimp/assimp/pull/4806 +* Removed KHR_materials_pbrSpecularGlossiness, added KHR_materials_specular by @Beilinson in https://github.com/assimp/assimp/pull/4786 +* Fix librt link by @mwestphal in https://github.com/assimp/assimp/pull/5087 +* Fix pbrt exporter coordinate system and FoV by @skogler in https://github.com/assimp/assimp/pull/5082 +* Fix warning related to unused-function. by @Jackie9527 in https://github.com/assimp/assimp/pull/5083 +* C tech development corp gltf2 metadata export by @kimkulling in https://github.com/assimp/assimp/pull/5109 +* Update_ Use the latest ubuntu image and switch to ninja by @kimkulling in https://github.com/assimp/assimp/pull/5114 +* Fix Heap-buffer-overflow WRITE in Assimp::ObjFileImporter::createVertexArray by @sashashura in https://github.com/assimp/assimp/pull/5112 +* Update pugiXML library by @mosfet80 in https://github.com/assimp/assimp/pull/5125 +* Fix UNKNOWN READ in aiTexture::~aiTexture by @sashashura in https://github.com/assimp/assimp/pull/5129 +* Fixed missing config property lookup for removal of empty bones. by @Biohazard90 in https://github.com/assimp/assimp/pull/5133 +* Update cpp-pm / hunter by @mosfet80 in https://github.com/assimp/assimp/pull/5103 +* Fix Heap-buffer-overflow READ in Assimp::MD5::MD5MeshParser::MD5MeshParser by @sashashura in https://github.com/assimp/assimp/pull/5110 +* Skinning weights in gltf were broken by PR#5003 (vertex remapping) by @FlorianBorn71 in https://github.com/assimp/assimp/pull/5090 +* Fix memory leak by @sashashura in https://github.com/assimp/assimp/pull/5134 +* Fix UNKNOWN WRITE in Assimp::SortByPTypeProcess::Execute by @sashashura in https://github.com/assimp/assimp/pull/5138 +* Delete old unused patch by @mosfet80 in https://github.com/assimp/assimp/pull/5130 +* Add handling for negative indices. by @kimkulling in https://github.com/assimp/assimp/pull/5146 +* Fix Heap-buffer-overflow READ in Assimp::ObjFileParser::getFace by @sashashura in https://github.com/assimp/assimp/pull/5111 +* Fix UNKNOWN READ crash in UpdateMeshReferences by @sashashura in https://github.com/assimp/assimp/pull/5113 +* Fix Heap-buffer-overflow READ in Assimp::FileSystemFilter::Cleanup by @sashashura in https://github.com/assimp/assimp/pull/5117 +* Fix Stack-buffer-overflow READ in aiMaterial::AddBinaryProperty by @sashashura in https://github.com/assimp/assimp/pull/5120 +* Fix unknown write in Assimp::ObjFileMtlImporter::getFloatValue by @sashashura in https://github.com/assimp/assimp/pull/5119 +* Fix Memcpy-param-overlap in unzReadCurrentFile by @sashashura in https://github.com/assimp/assimp/pull/5121 +* Fix Heap-buffer-overflow READ in Assimp::MD5::MD5Parser::ParseSection by @sashashura in https://github.com/assimp/assimp/pull/5122 +* Fix UNKNOWN WRITE in std::__1::list by @sashashura in https://github.com/assimp/assimp/pull/5126 +* Fix Bad-cast to Assimp::D3DS::Material from invalid vptr in Assimp::ASE::Parser::ParseLV2MaterialBlock by @sashashura in https://github.com/assimp/assimp/pull/5127 +* Fix Objimported supports OBJ partially specified vertex colors by @emaame in https://github.com/assimp/assimp/pull/5140 +* Fix UNKNOWN READ in Assimp::MDLImporter::ParseSkinLump_3DGS_MDL7 by @sashashura in https://github.com/assimp/assimp/pull/5128 +* update utf8 from 2.3.4 to 3.2.3 by @mosfet80 in https://github.com/assimp/assimp/pull/5148 +* [pyassimp] bumped pyassimp version to 5.2.5 by @severin-lemaignan in https://github.com/assimp/assimp/pull/5151 +* switch to zlib 1.2.13 by @mosfet80 in https://github.com/assimp/assimp/pull/5147 +* show the correct pugixml version by @mosfet80 in https://github.com/assimp/assimp/pull/5149 +* Fix: disabled dangling-reference warning in gcc13 by @thegeeko in https://github.com/assimp/assimp/pull/5163 +* [pyassimp] Fix passing of file extension string. by @feuerste in https://github.com/assimp/assimp/pull/5164 +* Unify way to check readable blender files. by @feuerste in https://github.com/assimp/assimp/pull/5153 +* [pyassimp] Replace static list of file extensions with the actually supported ones. by @feuerste in https://github.com/assimp/assimp/pull/5162 +* Create licence.md by @kimkulling in https://github.com/assimp/assimp/pull/5167 +* Fix IRR and IRRMESH importers by @PencilAmazing in https://github.com/assimp/assimp/pull/5166 +* Fix UNKNOWN READ in Assimp::SMDImporter::ParseNodeInfo by @sashashura in https://github.com/assimp/assimp/pull/5168 +* Improve binary check for gltf and gltf2. by @feuerste in https://github.com/assimp/assimp/pull/5154 +* Add missing header. by @feuerste in https://github.com/assimp/assimp/pull/5172 +* Extend token search flag from alpha to graph. by @feuerste in https://github.com/assimp/assimp/pull/5155 +* Unify extension check for importers. by @feuerste in https://github.com/assimp/assimp/pull/5157 +* Update run-cmake into sanitizer.yml by @mosfet80 in https://github.com/assimp/assimp/pull/5159 +* Fix detection of `KHR_materials_specular` on glTF2 export. by @feuerste in https://github.com/assimp/assimp/pull/5176 +* Handle gcs cloud storage file extensions with versioning. by @feuerste in https://github.com/assimp/assimp/pull/5156 +* Remove /WX from CMakeLists for MSVC by @SirLynix in https://github.com/assimp/assimp/pull/5183 +* Fix malformed irr files by @tellypresence in https://github.com/assimp/assimp/pull/5182 +* Remove deprecated swig files. by @kimkulling in https://github.com/assimp/assimp/pull/5188 +* Add missing rapidjson headers to `glTF2Asset.inl`. by @feuerste in https://github.com/assimp/assimp/pull/5186 +* Bug fix and improvement to FBX camera field-of-view during import. by @sfjohnston in https://github.com/assimp/assimp/pull/5175 +* Be more precise regarding index buffer by @paroj in https://github.com/assimp/assimp/pull/5200 +* Fix UNKNOWN READ in Assimp::MDLImporter::InternReadFile_Quake1 by @sashashura in https://github.com/assimp/assimp/pull/5191 +* Fix violation of the strict aliasing rule in `BaseImporter::CheckMagicToken`. by @feuerste in https://github.com/assimp/assimp/pull/5174 +* Fix UNKNOWN READ in std::__1::basic_string, std::__1::allocator= 0' always true bug by @karjonas in https://github.com/assimp/assimp/pull/4434 +* Update AI_TEXTURE_TYPE_MAX by @RichardTea in https://github.com/assimp/assimp/pull/4421 +* Fix getting anisotropy in obj by @youkeyao in https://github.com/assimp/assimp/pull/4423 +* glTF2: Metallic roughness split by @sacereda in https://github.com/assimp/assimp/pull/4425 +* Add properties information on assimp info command line by @sacereda in https://github.com/assimp/assimp/pull/4426 +* Added missing ObjMaterial.h to CMakeLists by @TerenceRussell in https://github.com/assimp/assimp/pull/4431 +* Update version in doxy-config by @kimkulling in https://github.com/assimp/assimp/pull/4441 +* add ifndef guard for resolve to fails to compile by @jaefunk in https://github.com/assimp/assimp/pull/4437 +* Add USE_STATIC_CRT option by @EYHN in https://github.com/assimp/assimp/pull/4444 +* Fix nullptr dereferencing by @kimkulling in https://github.com/assimp/assimp/pull/4446 +* Fix stack-overflow in MDLLoader by @kimkulling in https://github.com/assimp/assimp/pull/4448 +* GLTF2 attribute name/parse bug fix by @Promit in https://github.com/assimp/assimp/pull/4451 + +## New Contributors +* @SolaToucher made their first contribution in https://github.com/assimp/assimp/pull/4416 +* @smartday made their first contribution in https://github.com/assimp/assimp/pull/4020 +* @JaroslavPribyl made their first contribution in https://github.com/assimp/assimp/pull/4403 +* @karjonas made their first contribution in https://github.com/assimp/assimp/pull/4434 +* @EYHN made their first contribution in https://github.com/assimp/assimp/pull/4444 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.2.2...v5.2.3 + +# 5.2.2 +## What's Changed +* Fix missing include for size_t by @malytomas in https://github.com/assimp/assimp/pull/4380 +* Kimkulling/introduce compression by @kimkulling in https://github.com/assimp/assimp/pull/4381 +* Refactoring: add usage of ai_epsilon to FBX-Importer. by @kimkulling in https://github.com/assimp/assimp/pull/4387 +* CMake: Fix Assimp target install rule fully specifying component by @jcfr in https://github.com/assimp/assimp/pull/4391 +* Fix stat for 32-bit Linux by @kimkulling in https://github.com/assimp/assimp/pull/4398 +* Update build script to fit "Visual Studio 16 2019" Generator by @BA7LYA in https://github.com/assimp/assimp/pull/4394 +* Update the calculation and orthogonalization for bitangent by @youkeyao in https://github.com/assimp/assimp/pull/4397 +* Update CMakeLists.txt by @kimkulling in https://github.com/assimp/assimp/pull/4399 +* Added support for "map_Bump -bm" by @TerenceRussell in https://github.com/assimp/assimp/pull/4393 + +## New Contributors +* @jcfr made their first contribution in https://github.com/assimp/assimp/pull/4391 +* @BA7LYA made their first contribution in https://github.com/assimp/assimp/pull/4394 +* @youkeyao made their first contribution in https://github.com/assimp/assimp/pull/4397 +* @TerenceRussell made their first contribution in https://github.com/assimp/assimp/pull/4393 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.2.0...v5.2.2 + +# 5.2.1 +## What's Changed +* ASE: Fix warning unreachable code by @kimkulling in https://github.com/assimp/assimp/pull/4355 +* HMP: Fix override during copying position data by @kimkulling in https://github.com/assimp/assimp/pull/4359 +* use fully qualified namespace in byteswap macros by @umlaeute in https://github.com/assimp/assimp/pull/4367 +* fix compilation with clangcl on windows by @malytomas in https://github.com/assimp/assimp/pull/4366 +* Delete .travis.sh by @kimkulling in https://github.com/assimp/assimp/pull/4371 +* Update ccpp.yml by @kimkulling in https://github.com/assimp/assimp/pull/4378 +* LWO: validate enum value before parsing it by @kimkulling in https://github.com/assimp/assimp/pull/4376 + + +**Full Changelog**: https://github.com/assimp/assimp/compare/5.2.0...v5.2.1 + +# 5.2.0 +## What's Changed +* Update copyrights by @kimkulling in https://github.com/assimp/assimp/pull/4335 +* Fix imported target include directory by @lopsided98 in https://github.com/assimp/assimp/pull/4337 +* Assimp Patch Android LTS NDK 23 Fix by @danoli3 in https://github.com/assimp/assimp/pull/4330 +* Allow dlclose of so library by avoiding unique symbols. by @TThulesen in https://github.com/assimp/assimp/pull/4204 +* Move Base64 encode/decode functionality to the common folder by @kovacsv in https://github.com/assimp/assimp/pull/4336 +* Locale independent meter scale by @tanolino in https://github.com/assimp/assimp/pull/4323 +* add Inter-Quake Model (IQM) Importer by @Garux in https://github.com/assimp/assimp/pull/4265 +* Collada: Read all instance_material child nodes by @jsigrist in https://github.com/assimp/assimp/pull/4339 +* Krishty new file detection by @kimkulling in https://github.com/assimp/assimp/pull/4342 +* ASE: Fix material parsing by @kimkulling in https://github.com/assimp/assimp/pull/4346 +* IFC Reading: Fix opening reading. by @bensewell in https://github.com/assimp/assimp/pull/4344 +* CMAKE: Respect top-level CMAKE_*_OUTPUT_DIRECTORY variables by @leonvictor in https://github.com/assimp/assimp/pull/4338 +* Udate version to 5.2.0 by @kimkulling in https://github.com/assimp/assimp/pull/4353 + +## New Contributors +* @lopsided98 made their first contribution in https://github.com/assimp/assimp/pull/4337 +* @danoli3 made their first contribution in https://github.com/assimp/assimp/pull/4330 +* @TThulesen made their first contribution in https://github.com/assimp/assimp/pull/4204 +* @jsigrist made their first contribution in https://github.com/assimp/assimp/pull/4339 +* @bensewell made their first contribution in https://github.com/assimp/assimp/pull/4344 +* @leonvictor made their first contribution in https://github.com/assimp/assimp/pull/4338 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.1.6...5.2.0 + +# 5.1.6 +## What's Changed +* Add link to used enum for a better understandability by @kimkulling in https://github.com/assimp/assimp/pull/4321 +* Fix fuzzer crashes by @alpire in https://github.com/assimp/assimp/pull/4324 +* Fix nullptr-dereferencing by @kimkulling in https://github.com/assimp/assimp/pull/4328 +* Fix bone fitted check in gltf2 exporter by @vpzomtrrfrt in https://github.com/assimp/assimp/pull/4318 +* Update to 5.1.6 by @kimkulling in https://github.com/assimp/assimp/pull/4333 + +## New Contributors +* @vpzomtrrfrt made their first contribution in https://github.com/assimp/assimp/pull/4318 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.1.5...v5.1.6 + +# 5.1.5 +## What's Changed +* Make sure no overflow can happen by @kimkulling in https://github.com/assimp/assimp/pull/4282 +* LWS-Import: Avoid access to empty string token by @kimkulling in https://github.com/assimp/assimp/pull/4283 +* MDL: Do not try to copy empty embedded texture by @kimkulling in https://github.com/assimp/assimp/pull/4284 +* Add console progresshandler by @kimkulling in https://github.com/assimp/assimp/pull/4293 +* CMake: Replace CMAKE_COMPILER_IS_MINGW by MINGW by @SirLynix in https://github.com/assimp/assimp/pull/4311 +* fix fbx import metalness by @VyacheslavVanin in https://github.com/assimp/assimp/pull/4259 +* RFC: BlenderScene: use explicit namespace instead of using namespace by @pseiderer in https://github.com/assimp/assimp/pull/4314 +* Support PBR properties/maps in Obj importer by @errissa in https://github.com/assimp/assimp/pull/4272 + +## New Contributors +* @SirLynix made their first contribution in https://github.com/assimp/assimp/pull/4311 +* @VyacheslavVanin made their first contribution in https://github.com/assimp/assimp/pull/4259 +* @errissa made their first contribution in https://github.com/assimp/assimp/pull/4272 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.1.4...v5.1.5 + +# 5.1.4 +## What's Changed +* Fix division by zero in PointInTriangle2D by @kimkulling in https://github.com/assimp/assimp/pull/4245 +* Fix nullptr dereferencing from std::shared_ptr by @kimkulling in https://github.com/assimp/assimp/pull/4249 +* Update HMPLoader.cpp by @kimkulling in https://github.com/assimp/assimp/pull/4250 +* Revert "FBXConverter : Fix timescales of FBX animations" by @inhosens in https://github.com/assimp/assimp/pull/4247 +* Use correct XmlParser-methods and add some missing casts by @kimkulling in https://github.com/assimp/assimp/pull/4253 +* Bug: Export crashes when any of the meshes contains texture coordinate names #4243 by @kovacsv in https://github.com/assimp/assimp/pull/4244 +* Bugfix/import crashes by @umlaeute in https://github.com/assimp/assimp/pull/4226 +* Fix a typo in the Visual-Studio Dll-Versions by @kimkulling in https://github.com/assimp/assimp/pull/4260 +* Enable C++11 and C99 by @kimkulling in https://github.com/assimp/assimp/pull/4261 +* Fixed cmake error: No known features for C compiler when using the assimp library from another project by @rumgot in https://github.com/assimp/assimp/pull/4256 +* fix test/models/3DS/IMAGE1.bmp: is jpg by @Garux in https://github.com/assimp/assimp/pull/4264 +* Fix compile error when ASSIMP_BUILD_NO_X3D_IMPORTER is define. by @RivIs-sssa01 in https://github.com/assimp/assimp/pull/4263 +* Update version to 5.1.4 by @kimkulling in https://github.com/assimp/assimp/pull/4266 + +## New Contributors +* @rumgot made their first contribution in https://github.com/assimp/assimp/pull/4256 +* @RivIs-sssa01 made their first contribution in https://github.com/assimp/assimp/pull/4263 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.1.3...v5.1.4 + +# 5.1.3 +## What's Changed +* Update blender importer to work with Blender 2.8+ files by @PencilAmazing in https://github.com/assimp/assimp/pull/4193 +* Added checks for out of bounds data access/writing by @ms-maxvollmer in https://github.com/assimp/assimp/pull/4211 +* Interpolate euler rotations for quaternion animations by @inhosens in https://github.com/assimp/assimp/pull/4216 +* Fix file-extension check for X3D-files by @umlaeute in https://github.com/assimp/assimp/pull/4217 +* Update CMakeLists.txt by @kimkulling in https://github.com/assimp/assimp/pull/4219 + +## New Contributors +* @PencilAmazing made their first contribution in https://github.com/assimp/assimp/pull/4193 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.1.2...v5.1.3 + +# 5.1.2 +## What's Changed +* Use adviced c++ flag to supress warning on mingw by @Rodousse in https://github.com/assimp/assimp/pull/4196 +* Fixed an incorrect indeiciesType in the glTF2 sparse accessor. by @ruyo in https://github.com/assimp/assimp/pull/4195 +* Prevent out-of-range memory writes by sparse accessors by @jakrams in https://github.com/assimp/assimp/pull/4207 +* Delete test/models/3DS/UVTransformTest directory by @kimkulling in https://github.com/assimp/assimp/pull/4212 + +## New Contributors +* @Rodousse made their first contribution in https://github.com/assimp/assimp/pull/4196 +* @jakrams made their first contribution in https://github.com/assimp/assimp/pull/4207 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.1.1...v5.1.2 + +# 5.1.1 +## What's Changed +* Delete irrXML_note.txt by @kimkulling in https://github.com/assimp/assimp/pull/4180 +* Update script_x64.iss by @kimkulling in https://github.com/assimp/assimp/pull/4181 +* Do not build ziplib when 3MF exporter is disabled. by @jdumas in https://github.com/assimp/assimp/pull/4173 +* Collada: Read value, not attribute by @RichardTea in https://github.com/assimp/assimp/pull/4187 +* Redefine deprecated glTF-specific PBR material macros by @RichardTea in https://github.com/assimp/assimp/pull/4184 +* On Windows/mingw in shared build mode append '-SOVERSION' to DLL base file name by @rhabacker in https://github.com/assimp/assimp/pull/4185 + +## New Contributors +* @jdumas made their first contribution in https://github.com/assimp/assimp/pull/4173 +* @rhabacker made their first contribution in https://github.com/assimp/assimp/pull/4185 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.1.0...v5.1.1 + +# 5.1.0 +## What's Changed +* Fix: Mismatched new/free in gltf2 importer (fixes #2668) by @theakman2 in https://github.com/assimp/assimp/pull/2669 +* fix issue textureCoords are messed up for multiple uvset by @thomasbiang in https://github.com/assimp/assimp/pull/2663 +* Add vcpkg installation instructions by @grdowns in https://github.com/assimp/assimp/pull/2680 +* Fix: Wrong aiAnimation::mTicksPerSecond for gltf2 imports (fixes #2662) by @theakman2 in https://github.com/assimp/assimp/pull/2666 +* gltf2.0 importer - Support for mesh morph animations added. by @vcebollada in https://github.com/assimp/assimp/pull/2675 +* Add AppVeyor build VS2019 by @escherstair in https://github.com/assimp/assimp/pull/2692 +* Enginmanap issue 2693 by @kimkulling in https://github.com/assimp/assimp/pull/2706 +* Findassimp.cmake: add hint for lib search path for Linux by @feniksa in https://github.com/assimp/assimp/pull/2699 +* Support Apple naming conventions - shared library by @mdinim in https://github.com/assimp/assimp/pull/2677 +* Cleanup headers by @kimkulling in https://github.com/assimp/assimp/pull/2708 +* ColladaExporter: improve name/id handling by @TGEnigma in https://github.com/assimp/assimp/pull/2690 +* Fix CMake import by @jherico in https://github.com/assimp/assimp/pull/2722 +* fix vs2013 build by @ardenpm in https://github.com/assimp/assimp/pull/2715 +* Fix gltf importer crash by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/2704 +* Update appveyor.yml by @kimkulling in https://github.com/assimp/assimp/pull/2723 +* Fix FBXConverter: use proper 64-bit constant by @ffontaine in https://github.com/assimp/assimp/pull/2697 +* Fix #2685 - library compiled by MinGW is unusable in MinGW. by @Zalewa in https://github.com/assimp/assimp/pull/2698 +* Update assimp legal and version by @RichardTea in https://github.com/assimp/assimp/pull/2709 +* Collada ZAE texture loading by @RichardTea in https://github.com/assimp/assimp/pull/2711 +* Fix multiple deallocation of memory for texture data. by @ardenpm in https://github.com/assimp/assimp/pull/2717 +* glTF2 fix glossinessFactor being put into the wrong object on export by @ardenpm in https://github.com/assimp/assimp/pull/2725 +* Fix lower casing material names in 3DS importer by @quanterion in https://github.com/assimp/assimp/pull/2726 +* Implemented armature lookup and updated FBX importer to properly support this by @RevoluPowered in https://github.com/assimp/assimp/pull/2731 +* Update CXMLReaderImpl.h by @tanolino in https://github.com/assimp/assimp/pull/2744 +* FBX orphan embedded textures fix by @muxanickms in https://github.com/assimp/assimp/pull/2741 +* Clang format added for code reformatting by @RevoluPowered in https://github.com/assimp/assimp/pull/2728 +* Added M3D format support by @bztsrc in https://github.com/assimp/assimp/pull/2736 +* Fix for exporting fbx bigger than 2GB by @muxanickms in https://github.com/assimp/assimp/pull/2751 +* closes https://github.com/assimp/assimp/issues/2684: normalize path by @kimkulling in https://github.com/assimp/assimp/pull/2757 +* closes https://github.com/assimp/assimp/issues/1320: make sure build … by @kimkulling in https://github.com/assimp/assimp/pull/2759 +* BUG - use noexcept only for C++11 and more by @jcarpent in https://github.com/assimp/assimp/pull/2758 +* Kimkullig dev by @kimkulling in https://github.com/assimp/assimp/pull/2764 +* Update .gitignore by @thewoz in https://github.com/assimp/assimp/pull/2748 +* closes https://github.com/assimp/assimp/issues/2733: update of zlip t… by @kimkulling in https://github.com/assimp/assimp/pull/2771 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/2775 +* Updated M3D SDK and some fixes by @bztsrc in https://github.com/assimp/assimp/pull/2766 +* ColladaParser: fix handling of empty XML-elements by @da-raf in https://github.com/assimp/assimp/pull/2727 +* Add function aiGetVersionPatch() to be able to display Assimp version as in Git tags by @LoicFr in https://github.com/assimp/assimp/pull/2780 +* MinGW support, profiling and signed error code by @bztsrc in https://github.com/assimp/assimp/pull/2783 +* Migenius fix doubleexport by @ardenpm in https://github.com/assimp/assimp/pull/2782 +* Migenius fix khrtexturetransform by @ardenpm in https://github.com/assimp/assimp/pull/2787 +* Update CMakeLists.txt by @kimkulling in https://github.com/assimp/assimp/pull/2789 +* Migenius fix dracocrash by @ardenpm in https://github.com/assimp/assimp/pull/2792 +* avoid weighting vertex repeatedly when joining identical vertices by @thomasbiang in https://github.com/assimp/assimp/pull/2752 +* Fix for memory leak in glTF2 Importer if an exception has been thrown by @muxanickms in https://github.com/assimp/assimp/pull/2770 +* Error string of Importer should contain a message in case of an exception by @muxanickms in https://github.com/assimp/assimp/pull/2769 +* Fix glTF validation error related to accessor min and max values by @coryf in https://github.com/assimp/assimp/pull/2779 +* Remove cout calls from FBX, LWO and B3D by @RichardTea in https://github.com/assimp/assimp/pull/2802 +* Modeller meta data by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/2810 +* MSVC: Disable optimisations in debug build by @RichardTea in https://github.com/assimp/assimp/pull/2801 +* Some cleanup of M3D support by @RichardTea in https://github.com/assimp/assimp/pull/2805 +* closes https://github.com/assimp/assimp/issues/2809: fix crash for sp… by @kimkulling in https://github.com/assimp/assimp/pull/2814 +* Backfacing odd negative scale 2383 by @RichardTea in https://github.com/assimp/assimp/pull/2818 +* Add a support for 3DSMax Physically Based Materials for FBX format by @muxanickms in https://github.com/assimp/assimp/pull/2827 +* Fix texcoord by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/2829 +* Update M3D ASCII exporter ident and extension by @RichardTea in https://github.com/assimp/assimp/pull/2819 +* Added CMake option to set the compiler warning to max (-Wall, /W4). Off by default by @dylankenneally in https://github.com/assimp/assimp/pull/2776 +* Fix typos by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/2841 +* Python fixes: ctypes declarations and cosmetics by @umlaeute in https://github.com/assimp/assimp/pull/2813 +* Made the CMake config more submodule friendly by @apanteleev in https://github.com/assimp/assimp/pull/2839 +* MSVC workarounds by @bztsrc in https://github.com/assimp/assimp/pull/2825 +* Update SMDLoader.cpp by @9739654 in https://github.com/assimp/assimp/pull/2843 +* Added support to load Half-Life 1 MDL files. by @malortie in https://github.com/assimp/assimp/pull/2838 +* Gltf import bug fix by @yunqiangshanbill in https://github.com/assimp/assimp/pull/2853 +* Fixed UV coordinate swapped twice in big endian. by @malortie in https://github.com/assimp/assimp/pull/2858 +* Collada and glTF modeller metadata by @RichardTea in https://github.com/assimp/assimp/pull/2820 +* fix: Don't combine Collada animations when channels are shared by @felipeek in https://github.com/assimp/assimp/pull/2855 +* Fix PlyExporter to support faces with 0 vertices by @Dunni in https://github.com/assimp/assimp/pull/2863 +* Fix possible null pointer exception on scene metadata when exporting a glTF2 file by @LoicFr in https://github.com/assimp/assimp/pull/2865 +* Update VertexTriangleAdjacency.cpp by @kimkulling in https://github.com/assimp/assimp/pull/2867 +* Update glTF2Importer.cpp by @kimkulling in https://github.com/assimp/assimp/pull/2866 +* Revert 3_bananas.amf.7z to working version by @turol in https://github.com/assimp/assimp/pull/2870 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/2868 +* Revert more broken test models to working versions by @turol in https://github.com/assimp/assimp/pull/2875 +* Add MD2 importer unit tests by @turol in https://github.com/assimp/assimp/pull/2877 +* Revert broken dwarf.cob test file and add MD5 and COB unit tests by @turol in https://github.com/assimp/assimp/pull/2891 +* Fix: gltf exporting memory leak by @runforu in https://github.com/assimp/assimp/pull/2892 +* Revert broken test files and improve error messages in Half-Life MDL loader by @turol in https://github.com/assimp/assimp/pull/2904 +* Suppressed MSVC++ warnings C4244 and C4267 by @matt77hias in https://github.com/assimp/assimp/pull/2905 +* [MDL] Updated header to use when checking file size. (Redone) by @malortie in https://github.com/assimp/assimp/pull/2908 +* Update .travis.yml by @kimkulling in https://github.com/assimp/assimp/pull/2887 +* Fixed memory leak in MDL importer. by @malortie in https://github.com/assimp/assimp/pull/2927 +* Removed name of unreferenced local variable in catch block by @matt77hias in https://github.com/assimp/assimp/pull/2910 +* Add all shipped .blend files to unit tests by @turol in https://github.com/assimp/assimp/pull/2907 +* Revert broken test files by @turol in https://github.com/assimp/assimp/pull/2932 +* Revert broken .X test model to working version by @turol in https://github.com/assimp/assimp/pull/2934 +* Add more unit tests by @turol in https://github.com/assimp/assimp/pull/2936 +* Fix Assimp patch version to match the last bug fix release by @LoicFr in https://github.com/assimp/assimp/pull/2884 +* Fix memory leak in .X importer by @turol in https://github.com/assimp/assimp/pull/2940 +* Updated copyright dates. by @malortie in https://github.com/assimp/assimp/pull/2933 +* [MDL HL1] Fixed children nodes not deleted. by @malortie in https://github.com/assimp/assimp/pull/2928 +* Updated places where read/write for achFormatHint (Redone). by @malortie in https://github.com/assimp/assimp/pull/2948 +* Added support to load HL1 MDL external texture files directly. by @malortie in https://github.com/assimp/assimp/pull/2952 +* Remove explicit setting of macos install_name by @RichardTea in https://github.com/assimp/assimp/pull/2962 +* Revert image files corrupted by a8a1ca9 by @tellypresence in https://github.com/assimp/assimp/pull/2960 +* Uniformized error codes (return values) in assimp_cmd. by @malortie in https://github.com/assimp/assimp/pull/2958 +* [MDL HL1] Fixed wrong texture format used. by @malortie in https://github.com/assimp/assimp/pull/2943 +* Refactored Assbin exporter and assimp_cmd binary serialization functions. by @malortie in https://github.com/assimp/assimp/pull/2967 +* closes https://github.com/assimp/assimp/issues/1592: by @kimkulling in https://github.com/assimp/assimp/pull/2968 +* Fix version revision formatting in glTF metadata by @LoicFr in https://github.com/assimp/assimp/pull/2941 +* Update EmbedTexturesProcess.cpp by @kimkulling in https://github.com/assimp/assimp/pull/2880 +* Refactored Assxml exporter and dump xml writer. by @malortie in https://github.com/assimp/assimp/pull/2972 +* Added missing checks for tempData and uvIndices sizes in all cases by @ms-maxvollmer in https://github.com/assimp/assimp/pull/2970 +* Fixed mValues allocated twice in SceneCombiner.cpp. by @malortie in https://github.com/assimp/assimp/pull/2978 +* Fixed a bunch of clang warnings by @hbina in https://github.com/assimp/assimp/pull/2976 +* Removed unnecessary checks that may result in false positives rejecting valid models. by @ms-maxvollmer in https://github.com/assimp/assimp/pull/2984 +* Renamed WriteDumb.cpp to WriteDump.cpp by @malortie in https://github.com/assimp/assimp/pull/2974 +* [MDL HL1] Removed texture dimensions limitation. by @malortie in https://github.com/assimp/assimp/pull/2942 +* Update FUNDING.yml by @kimkulling in https://github.com/assimp/assimp/pull/2990 +* Fixed TextureTypeToString defined multiple times. by @malortie in https://github.com/assimp/assimp/pull/2989 +* Fixed population of bone armature and node fields for some meshes by @Frooxius in https://github.com/assimp/assimp/pull/2987 +* Small changes in the CMake file in https://github.com/assimp/assimp/pull/2994 +* Import/export of embedded texture names for the glTF/glTF2 format by @LoicFr in https://github.com/assimp/assimp/pull/2969 +* Check input token length before copy by @ms-maxvollmer in https://github.com/assimp/assimp/pull/2971 +* Additional checks on invalid input by @bztsrc in https://github.com/assimp/assimp/pull/2973 +* Fixed size check to use correct value by @ms-maxvollmer in https://github.com/assimp/assimp/pull/2985 +* Fix: GLTF animation works on RTS not matrix; fix matrix related bug; … by @runforu in https://github.com/assimp/assimp/pull/2995 +* Use the translation matrix in gltf2 cameras for aiCamera.mPosition by @bubba in https://github.com/assimp/assimp/pull/2986 +* Added missing texture types when searching for invalid textures. by @malortie in https://github.com/assimp/assimp/pull/3000 +* minor code improvements for the obj code in https://github.com/assimp/assimp/pull/3003 +* Update .clang-format by @kimkulling in https://github.com/assimp/assimp/pull/3016 +* Fixed SimpleTexturedOpenGL sample. by @malortie in https://github.com/assimp/assimp/pull/3015 +* Keep post-processor intentions by @kimkulling in https://github.com/assimp/assimp/pull/3020 +* Fixed memory leaks in SimpleTexturedOpenGL sample. by @malortie in https://github.com/assimp/assimp/pull/3021 +* small changes in https://github.com/assimp/assimp/pull/3014 +* Made changes to write compiled binaries to a common directory. by @malortie in https://github.com/assimp/assimp/pull/3013 +* A bug when importing multiple gltf files by @inhosens in https://github.com/assimp/assimp/pull/3009 +* Removed uneeded expression in else() and endif() constructs. by @malortie in https://github.com/assimp/assimp/pull/3024 +* pkg-config: fix include path by @jcarpent in https://github.com/assimp/assimp/pull/3010 +* small improvements in the CMakeLists.txt file in https://github.com/assimp/assimp/pull/3022 +* Fix for #3037 [FATAL] SplitByBoneCountProcess::SplitMesh goes into infinite loop by @Nimer-88 in https://github.com/assimp/assimp/pull/3040 +* Fix for #3037 cause glTF2Importer creating bunch of bones with 0 for vertex with index 0 by @Nimer-88 in https://github.com/assimp/assimp/pull/3039 +* Fixed SimpleTexturedDirectX11 sample. by @malortie in https://github.com/assimp/assimp/pull/3053 +* Fixed wrong matrix type used in aiMatrix3x3t comparison operators. by @malortie in https://github.com/assimp/assimp/pull/3056 +* Only try to initialize members whose name starts with 'm' followed by an uppercase character by @shawwn in https://github.com/assimp/assimp/pull/3057 +* Fix zip issue by @kimkulling in https://github.com/assimp/assimp/pull/3058 +* Raised minimum CMake version to 3.0 for assimp_cmd and assimp_view. by @malortie in https://github.com/assimp/assimp/pull/3033 +* Added missing std namespace prefix to std types. by @malortie in https://github.com/assimp/assimp/pull/3055 +* cmake: double quotes around the by @maquefel in https://github.com/assimp/assimp/pull/3034 +* Minor changes in CMakeLists files. by @malortie in https://github.com/assimp/assimp/pull/3060 +* Blendshape Support in Assimp Gltf2/Glb2 Exporter (positions, normals) by @thomasbiang in https://github.com/assimp/assimp/pull/3063 +* Added test case for fix earlier submitted by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3067 +* Create ccpp.yml by @kimkulling in https://github.com/assimp/assimp/pull/3078 +* [WIP] Enable all warnings for Visual Studio. by @kimkulling in https://github.com/assimp/assimp/pull/3012 +* {cmake} Prefix options to avoid pollution when included as a submodule by @asmaloney in https://github.com/assimp/assimp/pull/3083 +* fix FBX no preservePivots bug by @aimoonchen in https://github.com/assimp/assimp/pull/3075 +* GLTF2: Fixed behavior of glTF2Importer::ImportNodes by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3069 +* Added missing functionalities to C API. by @malortie in https://github.com/assimp/assimp/pull/3089 +* Fixed FBX simple anim pre/post rotation handling by @napina in https://github.com/assimp/assimp/pull/3086 +* Add mac by @kimkulling in https://github.com/assimp/assimp/pull/3096 +* add windows build by @kimkulling in https://github.com/assimp/assimp/pull/3098 +* closes https://github.com/assimp/assimp/pull/3104: by @kimkulling in https://github.com/assimp/assimp/pull/3112 +* Fix funding by @kimkulling in https://github.com/assimp/assimp/pull/3114 +* Removed unneeded SceneDiffer.h includes. by @malortie in https://github.com/assimp/assimp/pull/3117 +* Fix gltf2 exporter memory crash by @thomasbiang in https://github.com/assimp/assimp/pull/3113 +* Fixed /W4 compile warnings in sample SimpleOpenGL. by @malortie in https://github.com/assimp/assimp/pull/3124 +* Fixed /W4 compile warnings in sample SimpleTexturedDirectx11. by @malortie in https://github.com/assimp/assimp/pull/3127 +* closes https://github.com/assimp/assimp/issues/2166: by @kimkulling in https://github.com/assimp/assimp/pull/3137 +* use GNUInstallDirs where possible (master branch) by @vmatare in https://github.com/assimp/assimp/pull/3126 +* Fixed /W4 compile warnings in Assimp viewer. by @malortie in https://github.com/assimp/assimp/pull/3129 +* Fixed /W4 compile warnings in sample SimpleTexturedOpenGL. by @malortie in https://github.com/assimp/assimp/pull/3125 +* Replaced NULL with nullptr for pointers in Assimp viewer. by @malortie in https://github.com/assimp/assimp/pull/3139 +* Replaced NULL with nullptr for pointers in sample SimpleTexturedOpenGL. by @malortie in https://github.com/assimp/assimp/pull/3141 +* Testcoverage improvements. by @kimkulling in https://github.com/assimp/assimp/pull/2885 +* Use checkoutv2 by @kimkulling in https://github.com/assimp/assimp/pull/3150 +* Added tests to C API missing functionalities in #3091 by @malortie in https://github.com/assimp/assimp/pull/3147 +* [RFC] cmake: targets: check lib or lib64 path by @maquefel in https://github.com/assimp/assimp/pull/3035 +* Minor fixes and improvements in sample SimpleOpenGL. by @malortie in https://github.com/assimp/assimp/pull/3036 +* ifdef the exporters as specifying stricter linker flags than what's in default CMake causes linking issues by @Nimer-88 in https://github.com/assimp/assimp/pull/3049 +* GLTF2: ExtractData now throws exception instead of returning false if data is invalid by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3068 +* GLTF2: Detect and abort recursive references by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3070 +* Replaced NULL with nullptr for pointers in sample SimpleTexturedDirectx11. by @malortie in https://github.com/assimp/assimp/pull/3131 +* 3MF fix by @Hehongyuanlove in https://github.com/assimp/assimp/pull/3158 +* Erase the remaining _INSTALL_PREFIX and LIBSUFFIX in CMake files by @Zalewa in https://github.com/assimp/assimp/pull/3155 +* Add support for glTF2 targetNames by @timuber in https://github.com/assimp/assimp/pull/3149 +* Update to 5.0.1 by @kimkulling in https://github.com/assimp/assimp/pull/3161 +* Optimized LimitBoneWeightsProcess. by @napina in https://github.com/assimp/assimp/pull/3085 +* Migenius migenius rsws53 mig 2 by @kimkulling in https://github.com/assimp/assimp/pull/3164 +* Fix to read orthographic camera data by @ardenpm in https://github.com/assimp/assimp/pull/3029 +* closes https://github.com/assimp/assimp/issues/3103: always enable wa… by @kimkulling in https://github.com/assimp/assimp/pull/3116 +* Iisue 3165 by @kimkulling in https://github.com/assimp/assimp/pull/3167 +* Use clang on Unix, msvc on Windows, Use Ninja everywhere by @lukka in https://github.com/assimp/assimp/pull/3168 +* Enable gcc on Linux on CI, fix warnings by @lukka in https://github.com/assimp/assimp/pull/3173 +* Add sanitizer support by @kimkulling in https://github.com/assimp/assimp/pull/3171 +* Opencollective opencollective by @kimkulling in https://github.com/assimp/assimp/pull/3170 +* Kimkulling dev by @kimkulling in https://github.com/assimp/assimp/pull/3196 +* Kimkulling dev by @kimkulling in https://github.com/assimp/assimp/pull/3197 +* closes https://github.com/assimp/assimp/issues/3190 : fix leak. by @kimkulling in https://github.com/assimp/assimp/pull/3202 +* Aaronfranke file formatting by @kimkulling in https://github.com/assimp/assimp/pull/3204 +* Fix for issue# 3206: GLTF2 blendshape import missing shapes https://github.com/assimp/assimp/issues/3206 by @thomasbiang in https://github.com/assimp/assimp/pull/3207 +* Remove duplicate flag by @kimkulling in https://github.com/assimp/assimp/pull/3208 +* fix incorrect header path on framework build by @sercand in https://github.com/assimp/assimp/pull/3209 +* Fixed bone splitting with excessive amount of bones with 0 weight by @rudybear in https://github.com/assimp/assimp/pull/3105 +* remove step prototype: does not work this way. by @kimkulling in https://github.com/assimp/assimp/pull/3212 +* integrate first fuzzer target. by @kimkulling in https://github.com/assimp/assimp/pull/3211 +* contrib/zlib: disable dynamic library building by @pseiderer in https://github.com/assimp/assimp/pull/3146 +* Fix fbx rotation ; by @hoshiryu in https://github.com/assimp/assimp/pull/3175 +* Collada: Ensure export uses unique Mesh Ids by @RichardTea in https://github.com/assimp/assimp/pull/3188 +* Zyndor master by @kimkulling in https://github.com/assimp/assimp/pull/3223 +* Migenius migenius fix ortho by @kimkulling in https://github.com/assimp/assimp/pull/3224 +* Inhosens master by @kimkulling in https://github.com/assimp/assimp/pull/3225 +* Collada unit test cleanup by @RichardTea in https://github.com/assimp/assimp/pull/3194 +* Any interest in Rust '18 port? by @dmgolembiowski in https://github.com/assimp/assimp/pull/3195 +* Export Collada Meshes on root aiNode by @RichardTea in https://github.com/assimp/assimp/pull/3205 +* Qarmin added check before using by @kimkulling in https://github.com/assimp/assimp/pull/3229 +* [gltf2 Export] More robust handling for non-finites and 0-length normals by @jercytryn in https://github.com/assimp/assimp/pull/3214 +* Add IMPORTED_CONFIGURATIONS property to cmake target. by @kalyan-kumar in https://github.com/assimp/assimp/pull/3215 +* [GLTF2] Fix infinite recursion in skin/node parsing by @M4T1A5 in https://github.com/assimp/assimp/pull/3226 +* Fix double free caused in FindInvalidDataProcess by @rmstyrczula in https://github.com/assimp/assimp/pull/3235 +* Verbose logging by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3232 +* Fixed rotation order bug in BVH Loader by @kshepherd2013 in https://github.com/assimp/assimp/pull/3233 +* File is duplicated by @kimkulling in https://github.com/assimp/assimp/pull/3241 +* Remove duplicated code by @kimkulling in https://github.com/assimp/assimp/pull/3242 +* Update utRemoveComponent.cpp by @kimkulling in https://github.com/assimp/assimp/pull/3243 +* Gltf2 Support Importing sparse accessor by @thomasbiang in https://github.com/assimp/assimp/pull/3219 +* Evaluated expressions and clean up some code in tests by @hbina in https://github.com/assimp/assimp/pull/3249 +* closes https://github.com/assimp/assimp/issues/3256: Remove redundand… by @kimkulling in https://github.com/assimp/assimp/pull/3262 +* Added rapidjson define to avoid warnings in c++17 by @AlecLafita in https://github.com/assimp/assimp/pull/3263 +* Perform sanity check only in debug by @kimkulling in https://github.com/assimp/assimp/pull/3265 +* Pyassimp - contextmanager for load function by @DavidBerger98 in https://github.com/assimp/assimp/pull/3271 +* Migenius migenius fix texcoord by @kimkulling in https://github.com/assimp/assimp/pull/3277 +* Fbx Import: support channel name in blendshape name by @thomasbiang in https://github.com/assimp/assimp/pull/3268 +* add a unittest. by @kimkulling in https://github.com/assimp/assimp/pull/3279 +* Gltf2 Export Target Names for Blendshapes by @thomasbiang in https://github.com/assimp/assimp/pull/3267 +* closes https://github.com/assimp/assimp/issues/3165: fix gcc build. by @kimkulling in https://github.com/assimp/assimp/pull/3248 +* Update issue templates by @kimkulling in https://github.com/assimp/assimp/pull/3284 +* closes https://github.com/assimp/assimp/issues/3253 : remove useless … by @kimkulling in https://github.com/assimp/assimp/pull/3287 +* Check invalid vertex id for bone weight by @infosia in https://github.com/assimp/assimp/pull/3288 +* Repo-Cleanup by @kimkulling in https://github.com/assimp/assimp/pull/3296 +* Allow users to customize the behavior of assert violations by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3297 +* FindInvalidDataProcess: Mark removed meshes as "out" by @rmstyrczula in https://github.com/assimp/assimp/pull/3294 +* Added arbitrary recursive metadata to allow for glTF2's extensions to… by @Evangel63 in https://github.com/assimp/assimp/pull/3298 +* rename fuzzer target by @kimkulling in https://github.com/assimp/assimp/pull/3299 +* Fix Maya PBR & stingray texture detection by @ifiddynine in https://github.com/assimp/assimp/pull/3293 +* Fixed variable in loop - HL1MDLLoader.cpp by @malortie in https://github.com/assimp/assimp/pull/3303 +* Move patreon to contribution by @kimkulling in https://github.com/assimp/assimp/pull/3302 +* Fix build when ASSIMP_DOUBLE_PRECISION is on. by @mahiuchun in https://github.com/assimp/assimp/pull/3301 +* closes https://github.com/assimp/assimp/issues/3305: remove merge issue. by @kimkulling in https://github.com/assimp/assimp/pull/3306 +* Improve ToBinary() for double precision. by @mahiuchun in https://github.com/assimp/assimp/pull/3309 +* Ensure asserts are defined where expected. by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3307 +* closes https://github.com/assimp/assimp/issues/3252: fix build. by @kimkulling in https://github.com/assimp/assimp/pull/3314 +* Use strrchr() when finding the '.' that begins the file extension. by @mahiuchun in https://github.com/assimp/assimp/pull/3300 +* use c-style cast in a c-file by @kimkulling in https://github.com/assimp/assimp/pull/3321 +* Customize Extras in Gltf2 Exporter with ExporterProperty Callback by @thomasbiang in https://github.com/assimp/assimp/pull/3280 +* Gltf2 Sparse Accessor Export (blendshape export using sparse accessor) by @thomasbiang in https://github.com/assimp/assimp/pull/3227 +* Loic fr master by @kimkulling in https://github.com/assimp/assimp/pull/3323 +* Fix Blender .fbx metalness detection by @ifiddynine in https://github.com/assimp/assimp/pull/3289 +* FBXExporter: Use scene metadata for global settings by @rmstyrczula in https://github.com/assimp/assimp/pull/3292 +* add triangle strip support to AC file loader by @IOBYTE in https://github.com/assimp/assimp/pull/3320 +* fix invalid pointer for bone animation by @infosia in https://github.com/assimp/assimp/pull/3330 +* Added macros to enable/disable GLTF1 and GLTF2 independently by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3311 +* Build viewer and publish artifacts on windows-msvc. by @AndrewJDR in https://github.com/assimp/assimp/pull/3322 +* DefaultIOStream: Remove assert on empty count by @rmstyrczula in https://github.com/assimp/assimp/pull/3326 +* Hunter-related build fixes by @rbsheth in https://github.com/assimp/assimp/pull/3327 +* clang with msvc backend by @MeyerFabian in https://github.com/assimp/assimp/pull/3337 +* Use #ifdef _MSC_VER for pragma warnings (Issue 3332) by @RichardTea in https://github.com/assimp/assimp/pull/3336 +* Issue 3334 cl d9025 by @RichardTea in https://github.com/assimp/assimp/pull/3335 +* ACLoader: Use Surface type enums by @RichardTea in https://github.com/assimp/assimp/pull/3333 +* Handle Gltf2 files where a value in a mesh index buffer is out of range. by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3329 +* Remove travis + assveyor. by @kimkulling in https://github.com/assimp/assimp/pull/3342 +* fix namespace issue in fuzzer. by @kimkulling in https://github.com/assimp/assimp/pull/3343 +* use correct include. by @kimkulling in https://github.com/assimp/assimp/pull/3344 +* add missing include for logging. by @kimkulling in https://github.com/assimp/assimp/pull/3345 +* Fix warning: comparison between unsigned and signed. by @kimkulling in https://github.com/assimp/assimp/pull/3346 +* Fix MinGW builds (issues related to pragmas and format strings) by @awr1 in https://github.com/assimp/assimp/pull/3328 +* Fixing more build warnings by @rbsheth in https://github.com/assimp/assimp/pull/3347 +* FBXExport: Fix crash if scene->mMetaData is null by @rmstyrczula in https://github.com/assimp/assimp/pull/3349 +* FBX Version/Size Check by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3350 +* Export opacity is 3DS by @kimkulling in https://github.com/assimp/assimp/pull/3357 +* Fix wrong function defines by @kimkulling in https://github.com/assimp/assimp/pull/3355 +* Added more undefined sanitizer flags by @qarmin in https://github.com/assimp/assimp/pull/3356 +* closes https://github.com/assimp/assimp/issues/2992: detect double support by @kimkulling in https://github.com/assimp/assimp/pull/3360 +* Fix nncorrectly named Assimp .dll by @kimkulling in https://github.com/assimp/assimp/pull/3362 +* Fixed runtime output directory overridden. by @malortie in https://github.com/assimp/assimp/pull/3363 +* Fix incorrect index by @kimkulling in https://github.com/assimp/assimp/pull/3369 +* NFF importer double precision support by @lsliegeo in https://github.com/assimp/assimp/pull/3372 +* Update utf8cpp to fix use of C++17 deprecated feature by @fuj1n in https://github.com/assimp/assimp/pull/3374 +* Update Jassimp's AiTextureType.java by @flowtsohg in https://github.com/assimp/assimp/pull/3386 +* Fix Bad Ownership Acquisition by @jnhyatt in https://github.com/assimp/assimp/pull/3385 +* add missing define to glTF importer by @Gargaj in https://github.com/assimp/assimp/pull/3387 +* Fix an unreferenced formal parameter warning on MSVC when no exporter… by @Naios in https://github.com/assimp/assimp/pull/3391 +* Make internal errors accessible by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3375 +* collada: set aiAnimation->mTicksPerSecond to 1000.0 by @crocdialer in https://github.com/assimp/assimp/pull/3383 +* Fix RapidJSON defines and add Hunter builds to CI by @rbsheth in https://github.com/assimp/assimp/pull/3382 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/3400 +* GLTF2: Throw instead of assert when input file is invalid. by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3394 +* Fix for build break due to warnings-as-errors. by @sherief in https://github.com/assimp/assimp/pull/3405 +* Pugi xml by @kimkulling in https://github.com/assimp/assimp/pull/2966 +* closes https://github.com/assimp/assimp/issues/3379: reproduce error … by @kimkulling in https://github.com/assimp/assimp/pull/3415 +* [Bug-Fix] Fixed Strict Aliasing Level 3 Warnings by @Optimizer0 in https://github.com/assimp/assimp/pull/3413 +* fix for fbx files using stingray materials; by @stromaster in https://github.com/assimp/assimp/pull/3446 +* Update Hunter for pugixml by @rbsheth in https://github.com/assimp/assimp/pull/3452 +* Add handling for source for params by @kimkulling in https://github.com/assimp/assimp/pull/3458 +* Fix for issue #3445 by @jsmaatta in https://github.com/assimp/assimp/pull/3454 +* Hotfix for Hunter builds by @rbsheth in https://github.com/assimp/assimp/pull/3456 +* CMake: Fix FindRT warning by @xantares in https://github.com/assimp/assimp/pull/3451 +* glTF1's orthgraphic camera & glTF2's skinning by @inhosens in https://github.com/assimp/assimp/pull/3461 +* optimize CMakeLists.txt by @xiaozhuai in https://github.com/assimp/assimp/pull/3231 +* Collada cleanup by @kimkulling in https://github.com/assimp/assimp/pull/3466 +* Update FUNDING.yml by @kimkulling in https://github.com/assimp/assimp/pull/3470 +* Fbx report asset issues properly by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3412 +* Fixes for crashes in GLTF2 Importer by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3476 +* openddl: latest greatest. by @kimkulling in https://github.com/assimp/assimp/pull/3478 +* MSVC crash while importing fbx model workaround by @MomoDeve in https://github.com/assimp/assimp/pull/3471 +* AI_CONFIG_IMPORT_FBX_READ_WEIGHTS by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3460 +* fix xcode compile bug by @maiqingqiang in https://github.com/assimp/assimp/pull/3463 +* Fix CMake config generation problems by @traversaro in https://github.com/assimp/assimp/pull/3455 +* closes https://github.com/assimp/assimp/issues/3448 by @kimkulling in https://github.com/assimp/assimp/pull/3493 +* closes https://github.com/assimp/assimp/issues/3198: make aiMaterial:… by @kimkulling in https://github.com/assimp/assimp/pull/3494 +* Delete AMFImporter_Postprocess.cpp by @kimkulling in https://github.com/assimp/assimp/pull/3486 +* closes https://github.com/assimp/assimp/issues/1044 by @kimkulling in https://github.com/assimp/assimp/pull/3497 +* closes https://github.com/assimp/assimp/issues/3187 by @kimkulling in https://github.com/assimp/assimp/pull/3498 +* GLTF2: Null bufferview crash fix by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3490 +* Prevent crash with malformed texture reference by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3502 +* Fixing issue 3500, invalid outer cone angle readed from gltf2 file on machines which defines M_PI as a double value by @Nodrev in https://github.com/assimp/assimp/pull/3501 +* Optimize FindDegenerates so it doesn't explode by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3484 +* Added mName to aiScene. by @Evangel63 in https://github.com/assimp/assimp/pull/3510 +* FBXParser.cpp - handle buffer over-read correctly by @Neil-Clifford-FB in https://github.com/assimp/assimp/pull/3504 +* Prevent to generate redundant morph targets for glTF2 by @inhosens in https://github.com/assimp/assimp/pull/3487 +* Simplification: textures_converted keys can just be pointers by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3511 +* Update Android port README.md with ABI doc by @natanaeljr in https://github.com/assimp/assimp/pull/3503 +* Sceneprecessor - potential memory leak by @Neil-Clifford-FB in https://github.com/assimp/assimp/pull/3505 +* Fbx exception safety by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3506 +* Fix for 3489 | Preserve morph targets when splitting by bone count by @boguscoder in https://github.com/assimp/assimp/pull/3512 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/3516 +* GLTF: Fix crash on invalid base64 data + improved error messages by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3514 +* Provide option for rapidjson no-member-iterator define by @tellypresence in https://github.com/assimp/assimp/pull/3528 +* glTF2Exporter: fix crash when exporting a scene with several meshes p… by @LoicFr in https://github.com/assimp/assimp/pull/3515 +* Additional Compiler Options for mips64el by @huiji12321 in https://github.com/assimp/assimp/pull/3521 +* Check _MSC_VER for MSVC specific pragma directives. by @Biswa96 in https://github.com/assimp/assimp/pull/3518 +* 3ds Max 2021 PBR Materials in FBX by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3519 +* FBXConverter : Fix timescales of FBX animations by @inhosens in https://github.com/assimp/assimp/pull/3524 +* Fixed a crash of the Gltf 2 exporter in the case of an animation without scale animation key. by @JLouis-B in https://github.com/assimp/assimp/pull/3531 +* Common: Fix GCC error invalid conversion in MINGW. by @Biswa96 in https://github.com/assimp/assimp/pull/3533 +* _dest may be destructed twice if _dest is not null in MergeScenes() by @wasd845 in https://github.com/assimp/assimp/pull/3540 +* Fix #3222 by @someonewithpc in https://github.com/assimp/assimp/pull/3555 +* GLTF2 fixes by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3541 +* FBXBinaryTokenizer: Check length of property by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3542 +* Fix glTF from memory loading .bin with a custom IOHandler by @makitsune in https://github.com/assimp/assimp/pull/3562 +* Only consider continuation tokens at end of line by @gris-martin in https://github.com/assimp/assimp/pull/3543 +* add operator* in aiQuaterniont by @wasd845 in https://github.com/assimp/assimp/pull/3546 +* [gltf2] Add support for extensions KHR_materials by @Danny-Kint in https://github.com/assimp/assimp/pull/3552 +* Update unzip contrib by @JLouis-B in https://github.com/assimp/assimp/pull/3556 +* 3mf improvements by @JLouis-B in https://github.com/assimp/assimp/pull/3558 +* fix of an unattainable condition. by @ihsinme in https://github.com/assimp/assimp/pull/3569 +* contrib/zlib/CMakeLists.txt: don't install zlib by @ffontaine in https://github.com/assimp/assimp/pull/3561 +* Issue 3570 (CMake Policy violations on MSVC) by @JacksonM8 in https://github.com/assimp/assimp/pull/3571 +* Use const instead of constexpr by @kimkulling in https://github.com/assimp/assimp/pull/3581 +* Fixes for GLTF2 buffers by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3575 +* Remove dependency to posix-extension function by @kimkulling in https://github.com/assimp/assimp/pull/3583 +* remove install of zlibstatic by @kimkulling in https://github.com/assimp/assimp/pull/3585 +* aiMaterial::GetTexture() - fix misleading description of path argument. by @gkv311 in https://github.com/assimp/assimp/pull/3578 +* Fix Divide-by-zero in vector3 by @kimkulling in https://github.com/assimp/assimp/pull/3586 +* Fix overflow in aiString by @kimkulling in https://github.com/assimp/assimp/pull/3589 +* Fix nullptr dereference in scenepreprocessor by @kimkulling in https://github.com/assimp/assimp/pull/3590 +* Fix build failure on Linux by @h3xx in https://github.com/assimp/assimp/pull/3591 +* fixed memory leak by @ihsinme in https://github.com/assimp/assimp/pull/3579 +* Fix nullptr access by @kimkulling in https://github.com/assimp/assimp/pull/3592 +* Win32-refactorings by @kimkulling in https://github.com/assimp/assimp/pull/3587 +* pbrt-v4 exporter by @mmp in https://github.com/assimp/assimp/pull/3580 +* Update Build.md by @kimkulling in https://github.com/assimp/assimp/pull/3600 +* Fix glTF vertex colors with types other than float by @makitsune in https://github.com/assimp/assimp/pull/3582 +* Fix STL Expoter error. by @xiaohunqupo in https://github.com/assimp/assimp/pull/3594 +* Update 3DSLoader.cpp by @kimkulling in https://github.com/assimp/assimp/pull/3602 +* Remove redundant statement in if by @kimkulling in https://github.com/assimp/assimp/pull/3603 +* Update gitignore for default VS2019 behaviour by @RichardTea in https://github.com/assimp/assimp/pull/3596 +* Fix typo in collada parser by @kimkulling in https://github.com/assimp/assimp/pull/3611 +* Add missing skip by @kimkulling in https://github.com/assimp/assimp/pull/3612 +* Delete appveyor.yml by @kimkulling in https://github.com/assimp/assimp/pull/3610 +* Replace patreon by opencollective by @kimkulling in https://github.com/assimp/assimp/pull/3615 +* Increase float and double string export precision by @RichardTea in https://github.com/assimp/assimp/pull/3597 +* Fix compiler bug for VS2019 by @kimkulling in https://github.com/assimp/assimp/pull/3616 +* GCC 11 build fixes by @villevoutilainen in https://github.com/assimp/assimp/pull/3608 +* GLTF2: Allow Export Node in TRS format by @thomasbiang in https://github.com/assimp/assimp/pull/3598 +* Fixes a mem leak in aiMetadata::Set by @kimkulling in https://github.com/assimp/assimp/pull/3622 +* Update all minimum cmake req to 3.10 by @kimkulling in https://github.com/assimp/assimp/pull/3623 +* Changed morph anim error to warning when validating by @bsekura in https://github.com/assimp/assimp/pull/3604 +* ColladaLoader now assigns individual material indices to submeshes as needed by @contriteobserver in https://github.com/assimp/assimp/pull/3607 +* cleaned up sign-compare unittest build warnings by @contriteobserver in https://github.com/assimp/assimp/pull/3625 +* Fix incorrect xml-parsing in collada importer. by @kimkulling in https://github.com/assimp/assimp/pull/3635 +* Fix compiler warning: warning: argument to ... call is the same expre… by @kimkulling in https://github.com/assimp/assimp/pull/3642 +* fix issue: 3482: invalid gltf2 properties by @thomasbiang in https://github.com/assimp/assimp/pull/3636 +* fix compile warning-turned-error on x86 by @Gargaj in https://github.com/assimp/assimp/pull/3643 +* Collada importer now identifies animations by @contriteobserver in https://github.com/assimp/assimp/pull/3619 +* Eliminate maybe-uninitialized warnings which are treated as errors by @lgmcode in https://github.com/assimp/assimp/pull/3644 +* Update defs.h by @kimkulling in https://github.com/assimp/assimp/pull/3649 +* Fix apha value by @kimkulling in https://github.com/assimp/assimp/pull/3652 +* Implements access to files bundled with Android Applications by @contriteobserver in https://github.com/assimp/assimp/pull/3634 +* Rust bindings by @jkvargas in https://github.com/assimp/assimp/pull/3653 +* Implement import of Draco-encoded glTFv2 models by @RichardTea in https://github.com/assimp/assimp/pull/3614 +* Export zlib if it's built outside by @gongminmin in https://github.com/assimp/assimp/pull/3620 +* Eliminate MSVC warning C4819 caused by source files encoded in UTF-8 without BOM by @lgmcode in https://github.com/assimp/assimp/pull/3650 +* Export the animation name to gltf2 by @gongminmin in https://github.com/assimp/assimp/pull/3659 +* Silence uninitialized variable warning in 3MF importer by @turol in https://github.com/assimp/assimp/pull/3665 +* Remove buggy assert by @kimkulling in https://github.com/assimp/assimp/pull/3674 +* Check that normal count and tangent count match vertex count. by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3670 +* Workaround for VS2019 by @kimkulling in https://github.com/assimp/assimp/pull/3680 +* Update copyrights to 2021. by @kimkulling in https://github.com/assimp/assimp/pull/3681 +* CMake fix for Android build with enabled JNI io system by @ademets in https://github.com/assimp/assimp/pull/3660 +* workaround for ASSIMP_DOUBLE_PRECISION compile errors by @contriteobserver in https://github.com/assimp/assimp/pull/3683 +* Export Min/Max for Sparse Accessor by @thomasbiang in https://github.com/assimp/assimp/pull/3667 +* applied extern "C" guards to importerdesc.h by @contriteobserver in https://github.com/assimp/assimp/pull/3687 +* closes https://github.com/assimp/assimp/issues/3678: ensure lowercase by @kimkulling in https://github.com/assimp/assimp/pull/3694 +* Fix Step Expoter Error. by @xiaohunqupo in https://github.com/assimp/assimp/pull/3661 +* Fix compiling issues in clang-cl by @gongminmin in https://github.com/assimp/assimp/pull/3688 +* Compile fix for MSVC 2019 by @AndyShawQt in https://github.com/assimp/assimp/pull/3689 +* Update crypt.c by @Paul-Austria in https://github.com/assimp/assimp/pull/3691 +* change file encoding by @jaefunk in https://github.com/assimp/assimp/pull/3697 +* Fix a memory leak in glTF2. by @mahiuchun in https://github.com/assimp/assimp/pull/3709 +* export with rotation by @jaefunk in https://github.com/assimp/assimp/pull/3696 +* Fix a set of glTF2 crashes on bad input by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3707 +* Provide a dockerfile by @kimkulling in https://github.com/assimp/assimp/pull/3716 +* Fixing CHUNK_TRMATRIX translation sub chunk by @bekraft in https://github.com/assimp/assimp/pull/3722 +* Fixing 3DS import for CHUNK_TRMATRIX translation vector. by @bekraft in https://github.com/assimp/assimp/pull/3724 +* Added Blendshape Support to FBX Export by @vfxgordon in https://github.com/assimp/assimp/pull/3721 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/3727 +* Update FUNDING.yml by @kimkulling in https://github.com/assimp/assimp/pull/3728 +* Add zlibstatic to the list of exported targets by @eliasdaler in https://github.com/assimp/assimp/pull/3723 +* Issue 3678 by @kimkulling in https://github.com/assimp/assimp/pull/3736 +* 615 io ios port update by @kimkulling in https://github.com/assimp/assimp/pull/3737 +* Malcolm tyrrell/tangent check by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3718 +* Update INSTALL by @kimkulling in https://github.com/assimp/assimp/pull/3739 +* Renaming PI to aiPi. by @BaldricS in https://github.com/assimp/assimp/pull/3746 +* Fix direct leak by @kimkulling in https://github.com/assimp/assimp/pull/3748 +* [gltf2-exporter] Adding FB_ngon_encoding support by @clems71 in https://github.com/assimp/assimp/pull/3695 +* Fix incorrect indices in the MilkShape 3D loader by @pcwalton in https://github.com/assimp/assimp/pull/3749 +* Fix import of FBX files with last UV duplicated (caused by bug in FBX SDK 2019.0+) by @urschanselmann in https://github.com/assimp/assimp/pull/3708 +* Not resize empty vectors. by @kimkulling in https://github.com/assimp/assimp/pull/3755 +* Update repo for assimp-net by @kimkulling in https://github.com/assimp/assimp/pull/3758 +* Fix MDC loader by @Garux in https://github.com/assimp/assimp/pull/3742 +* Flip the check on _MSC_VER for using TR1 containers. by @mahiuchun in https://github.com/assimp/assimp/pull/3757 +* Version string fix (if anyone cares) by @krishty in https://github.com/assimp/assimp/pull/3774 +* fixed export exceptions on import by @krishty in https://github.com/assimp/assimp/pull/3776 +* fixed glTF export stuff being pulled into the EXE even if building wi… by @krishty in https://github.com/assimp/assimp/pull/3763 +* Add Codacy Badge by @kimkulling in https://github.com/assimp/assimp/pull/3793 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/3794 +* Update aiProcess_PreTransformVertices docs to match behavior. by @JC3 in https://github.com/assimp/assimp/pull/3821 +* Remove newline from name of Blender importer. by @JC3 in https://github.com/assimp/assimp/pull/3822 +* Fix crash when reading 0 bytes by @kimkulling in https://github.com/assimp/assimp/pull/3833 +* Importer improvements by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3787 +* closes https://github.com/assimp/assimp/issues/3831 : update zip by @kimkulling in https://github.com/assimp/assimp/pull/3846 +* style fix - initializing and assigning empty std::string properly by @krishty in https://github.com/assimp/assimp/pull/3764 +* moved MD2/MDC tables from BSS to const data by @krishty in https://github.com/assimp/assimp/pull/3765 +* Add PBRT to exportable file formats list by @diiigle in https://github.com/assimp/assimp/pull/3775 +* Fix: Removing double delete of texture items after MergeScene. by @BaldricS in https://github.com/assimp/assimp/pull/3788 +* reverted regression in 3DS transformation (issue #3802) by @krishty in https://github.com/assimp/assimp/pull/3826 +* Fix formatter. by @kimkulling in https://github.com/assimp/assimp/pull/3795 +* style fix: namespace instead of class with public static members by @krishty in https://github.com/assimp/assimp/pull/3852 +* small cleanup in file format detection by @krishty in https://github.com/assimp/assimp/pull/3796 +* fixed malformatted message by @krishty in https://github.com/assimp/assimp/pull/3805 +* use const chars by @kimkulling in https://github.com/assimp/assimp/pull/3869 +* Fixed weighting issue with blendShapeChannels by @vfxgordon in https://github.com/assimp/assimp/pull/3819 +* Use POINTER(char) for binary data. For pyassimp issue #2339: Can't load OBJ by @olsoneric in https://github.com/assimp/assimp/pull/3877 +* ASSIMP_ENABLE_DEV_IMPORTERS env var, applied to X3D importer by @JC3 in https://github.com/assimp/assimp/pull/3834 +* Optimize 3mf strings by @kimkulling in https://github.com/assimp/assimp/pull/3882 +* removed dead code from 0d29203e24a8bc2c75278931a6bd25b2ae5848de by @krishty in https://github.com/assimp/assimp/pull/3806 +* SimpleTexturedDirectx11 sample: support embedded uncompressed textures by @ericwa in https://github.com/assimp/assimp/pull/3808 +* added .step extension to IFC loader by @krishty in https://github.com/assimp/assimp/pull/3837 +* consider aiProcess_FlipWindingOrder in aiProcess_GenNormals & aiProcess_GenSmoothNormals by @Garux in https://github.com/assimp/assimp/pull/3838 +* consider pScene->mRootNode->mTransformation set by some importers while using AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION by @Garux in https://github.com/assimp/assimp/pull/3839 +* Fix crash in CanRead when file can not be opened. by @JC3 in https://github.com/assimp/assimp/pull/3850 +* Make sure ctype calls use unsigned chars. by @JC3 in https://github.com/assimp/assimp/pull/3880 +* orient mdc correctly by @Garux in https://github.com/assimp/assimp/pull/3841 +* Fix importer ReadFile issues on file open error or when opening empty files by @JC3 in https://github.com/assimp/assimp/pull/3890 +* Misc. log output and message fixes by @JC3 in https://github.com/assimp/assimp/pull/3881 +* support missing closing brace in material list after Ascii Scene Exporter v2.51 by @Garux in https://github.com/assimp/assimp/pull/3844 +* Reapply [amf] Fix crash when file could not be parsed. by @JC3 in https://github.com/assimp/assimp/pull/3898 +* fix hl1 mdl orientation, tex coords, face windings order by @Garux in https://github.com/assimp/assimp/pull/3842 +* updated C4D importer to use the Cineware SDK by @krishty in https://github.com/assimp/assimp/pull/3851 +* fix md2 orientation by @Garux in https://github.com/assimp/assimp/pull/3843 +* build M3D ASCII support by default by @contriteobserver in https://github.com/assimp/assimp/pull/3848 +* [blender] Disable creation of "dna.txt" by @JC3 in https://github.com/assimp/assimp/pull/3891 +* Update Readme.md by @kimkulling in https://github.com/assimp/assimp/pull/3902 +* Add support for arm 64 bit by @impala454 in https://github.com/assimp/assimp/pull/3901 +* Utilize decltype for slightly improved syntax by @Saalvage in https://github.com/assimp/assimp/pull/3900 +* [Logger] Unify log formatting by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/3905 +* Xml doc by @kimkulling in https://github.com/assimp/assimp/pull/3907 +* Fix possible nullptr dereferences. by @kimkulling in https://github.com/assimp/assimp/pull/3908 +* fixed bloat in SIB importer by @krishty in https://github.com/assimp/assimp/pull/3856 +* Md3 tuning by @Garux in https://github.com/assimp/assimp/pull/3847 +* PBR material support by @spotaws in https://github.com/assimp/assimp/pull/3858 +* preserve UV Stream names in FBX files by @spotaws in https://github.com/assimp/assimp/pull/3859 +* Follow up to PR #3787 by @ms-maxvollmer in https://github.com/assimp/assimp/pull/3883 +* Support basis universal to GLTF2 format by @thomasbiang in https://github.com/assimp/assimp/pull/3893 +* Less string bloat by @krishty in https://github.com/assimp/assimp/pull/3878 +* [Logger] Log a notification instead of silently dropping long log messages. by @JC3 in https://github.com/assimp/assimp/pull/3896 +* Fix camera fov comment since full fov is stored by @dlyr in https://github.com/assimp/assimp/pull/3912 +* Add export property to control blob names. by @crud89 in https://github.com/assimp/assimp/pull/3894 +* Fix gcc4.9 compilation by @Nodrev in https://github.com/assimp/assimp/pull/3917 +* Create tech_debt.md by @kimkulling in https://github.com/assimp/assimp/pull/3923 +* Update tech_debt.md by @kimkulling in https://github.com/assimp/assimp/pull/3925 +* Update bug_report.md by @kimkulling in https://github.com/assimp/assimp/pull/3926 +* Update feature_request.md by @kimkulling in https://github.com/assimp/assimp/pull/3927 +* Fix non skipped CR in header parsing for binary PLY by @TinyTinni in https://github.com/assimp/assimp/pull/3929 +* Fix bug in aiMetadata constructor that overwrites an array of one of … by @Evangel63 in https://github.com/assimp/assimp/pull/3922 +* Change the Assimp output directory vars to cached vars by @ogjamesfranco in https://github.com/assimp/assimp/pull/3903 +* Update unity plugin to trilib2 by @kimkulling in https://github.com/assimp/assimp/pull/3939 +* Use correct attribute name by @kimkulling in https://github.com/assimp/assimp/pull/3940 +* update pugi_xml to 1.11 by @kimkulling in https://github.com/assimp/assimp/pull/3941 +* fix viewer in case of unknown primitives. by @kimkulling in https://github.com/assimp/assimp/pull/3934 +* Fix fbx exporter bug if root node contains meshes. by @jagoon in https://github.com/assimp/assimp/pull/3916 +* enable debug information in MSVC release build by @krishty in https://github.com/assimp/assimp/pull/3873 +* Update Draco to upstream e4103dc by @RichardTea in https://github.com/assimp/assimp/pull/3911 +* Adding basic support for lights in FBX exporter by @Nodrev in https://github.com/assimp/assimp/pull/3918 +* SceneCombiner memory issues when re-indexing textures. by @BaldricS in https://github.com/assimp/assimp/pull/3938 +* Fix issue #2873 by @mahiuchun in https://github.com/assimp/assimp/pull/3958 +* Add GetEmbeddedTextureAndIndex() to aiScene. by @mahiuchun in https://github.com/assimp/assimp/pull/3945 +* glTF2: Make handling of embedded textures safer. by @mahiuchun in https://github.com/assimp/assimp/pull/3946 +* Replace swear words in IFCBoolean.cpp by @andreasbuhr in https://github.com/assimp/assimp/pull/3961 +* First pass at simplifying PBR by @RichardTea in https://github.com/assimp/assimp/pull/3952 +* the expression does not throw an exception. by @ihsinme in https://github.com/assimp/assimp/pull/3954 +* include/material.h: Fixed broken C support by @jerstlouis in https://github.com/assimp/assimp/pull/3966 +* Add scene metadata for glTF2 files as allowed by the glTF2 specification by @Evangel63 in https://github.com/assimp/assimp/pull/3955 +* glTF2: zero out extra space created by padding. by @mahiuchun in https://github.com/assimp/assimp/pull/3959 +* Performance: Apply various performance fixes from clang-tidy by @Skylion007 in https://github.com/assimp/assimp/pull/3964 +* FBX module unable to read uv rotation angle and write all the uv transformation data. by @Pankaj003 in https://github.com/assimp/assimp/pull/3965 +* closes https://github.com/assimp/assimp/issues/3971: fix wrong depend… by @kimkulling in https://github.com/assimp/assimp/pull/3973 +* glTF2: Improved support for AI_MATKEY_OPACITY by @jerstlouis in https://github.com/assimp/assimp/pull/3967 +* Added support for custom properties ("extras") in glTF2 importer by @Promit in https://github.com/assimp/assimp/pull/3969 +* Update Gitignore exclude x64 folder generated by build by @irajsb in https://github.com/assimp/assimp/pull/3980 +* Manage /R/N lines ends correctly on binary files, tested with solidworks PLY export by @arkeon7 in https://github.com/assimp/assimp/pull/3981 +* Fix stb_image dependency by @rbsheth in https://github.com/assimp/assimp/pull/3985 +* Stb image updated by @krishty in https://github.com/assimp/assimp/pull/3889 +* PyAssimp fix: don't always search anaconda paths by @mlopezantequera in https://github.com/assimp/assimp/pull/3986 +* Find stb for Assimp by @rbsheth in https://github.com/assimp/assimp/pull/3989 +* Collada: Read tags properly, assume when not present by @RichardTea in https://github.com/assimp/assimp/pull/3988 +* Fix version, remove deprecated doc files, fix some path errors by @kimkulling in https://github.com/assimp/assimp/pull/3993 +* Ensure glTFv2 scene name is unique by @RichardTea in https://github.com/assimp/assimp/pull/3990 +* Doxygen: Disable html and enable xml by @kimkulling in https://github.com/assimp/assimp/pull/3994 +* FBX: fix double precision build. by @mahiuchun in https://github.com/assimp/assimp/pull/3991 +* Add hpp to doxygen filter by @kimkulling in https://github.com/assimp/assimp/pull/3995 +* Fix issues encountered during integration attempt by @AdrianAtGoogle in https://github.com/assimp/assimp/pull/3992 +* closes https://github.com/assimp/assimp/issues/3957: checkj for empty… by @kimkulling in https://github.com/assimp/assimp/pull/3997 +* closes https://github.com/assimp/assimp/issues/3975: by @kimkulling in https://github.com/assimp/assimp/pull/3998 +* Fix fuzzer issue in m3d-importer by @kimkulling in https://github.com/assimp/assimp/pull/3999 +* Fix euler angles by @kimkulling in https://github.com/assimp/assimp/pull/4000 +* Fix Issue3760 by @kimkulling in https://github.com/assimp/assimp/pull/4002 +* more range-based for by @krishty in https://github.com/assimp/assimp/pull/4011 +* removed useless code by @krishty in https://github.com/assimp/assimp/pull/4006 +* Use strlen() rather than fixed length in fast_atof.h by @mahiuchun in https://github.com/assimp/assimp/pull/4016 +* StepExporter support polygon mesh by @xiaohunqupo in https://github.com/assimp/assimp/pull/4001 +* removed trailing spaces and tabs from source and text by @krishty in https://github.com/assimp/assimp/pull/4007 +* style fix – initializing and assigning empty std::string properly by @krishty in https://github.com/assimp/assimp/pull/4008 +* style fix: indentation by @krishty in https://github.com/assimp/assimp/pull/4009 +* fix comments by @krishty in https://github.com/assimp/assimp/pull/4010 +* Obj: make a predicate more robust. by @mahiuchun in https://github.com/assimp/assimp/pull/4017 +* Crash fixes by @ms-maxvollmer in https://github.com/assimp/assimp/pull/4032 +* Add missing diagnostic pragmas and remove unused code by @uerobert in https://github.com/assimp/assimp/pull/4027 +* Fix: incorrect reading of PBR properties in FBX by @Mykhailo418 in https://github.com/assimp/assimp/pull/4026 +* Mingw build fix by @kovacsv in https://github.com/assimp/assimp/pull/4037 +* fix sample build error by @yzthr in https://github.com/assimp/assimp/pull/4036 +* Build fixes by @kimkulling in https://github.com/assimp/assimp/pull/4040 +* Fix M3D import crash and memory leak. by @kovacsv in https://github.com/assimp/assimp/pull/4044 +* Enable Viewer only for VS-Builds by @kimkulling in https://github.com/assimp/assimp/pull/4045 +* Handle empty keys by @kimkulling in https://github.com/assimp/assimp/pull/4049 +* Fix possible overrun by @kimkulling in https://github.com/assimp/assimp/pull/4050 +* Delete FindIrrXML.cmake by @kimkulling in https://github.com/assimp/assimp/pull/4051 +* Add support for M3F Embedded textures by @kimkulling in https://github.com/assimp/assimp/pull/4029 +* Add export property for assimp json exporter to write compressed json by @kovacsv in https://github.com/assimp/assimp/pull/4053 +* Fixes issues our internal compliance and code quality tool found by @ms-maxvollmer in https://github.com/assimp/assimp/pull/4055 +* XGLImporter: Compiler warning fix by @Dig-Doug in https://github.com/assimp/assimp/pull/4056 +* Double Precision Issue by @Madrich in https://github.com/assimp/assimp/pull/4057 +* Update .gitignore by @Spectrum76 in https://github.com/assimp/assimp/pull/4012 +* Add patreon by @kimkulling in https://github.com/assimp/assimp/pull/4070 +* Fix MinGW build by @kirillsurkov in https://github.com/assimp/assimp/pull/4054 +* fixed incorrect/misleading comment at end of scene.h by @ingowald in https://github.com/assimp/assimp/pull/4081 +* Rework format + introdule missing C++11 features by @kimkulling in https://github.com/assimp/assimp/pull/4072 +* removed useless code by @krishty in https://github.com/assimp/assimp/pull/4077 +* including by @markoffline in https://github.com/assimp/assimp/pull/4083 +* Use Safe Constants Idioms for ObjFileParser::DEFAULT_MATERIAL. by @mahiuchun in https://github.com/assimp/assimp/pull/4076 +* Fix possible nullptr dereferencing in material parsing by @kimkulling in https://github.com/assimp/assimp/pull/4085 +* Update ObjTools.h by @kimkulling in https://github.com/assimp/assimp/pull/4086 +* more const in format detection by @krishty in https://github.com/assimp/assimp/pull/4078 +* Fix Q1 MDL group frame loading, e.g. Q1 progs/flame2.mdl by @Garux in https://github.com/assimp/assimp/pull/3743 +* Add support for normal maps, the classic way by @kimkulling in https://github.com/assimp/assimp/pull/4106 +* Fix aiString length not updated in the EmbedTextures postprocess task by @davidepi in https://github.com/assimp/assimp/pull/4108 +* Added missing include by @lerppana in https://github.com/assimp/assimp/pull/4115 +* Fix no export build by @kimkulling in https://github.com/assimp/assimp/pull/4123 +* Delete fast_atof.h by @kimkulling in https://github.com/assimp/assimp/pull/4124 +* Spelling fixes by @umlaeute in https://github.com/assimp/assimp/pull/4109 +* Fix a warning about deprecated array comparison by @marcappelsmeier in https://github.com/assimp/assimp/pull/4110 +* [GLTF2] Add read and write support for KHR_materials_volume and KHR_materials_ior extensions. by @diharaw in https://github.com/assimp/assimp/pull/4112 +* Remove dead code. by @kimkulling in https://github.com/assimp/assimp/pull/4140 +* SpatialSort improvements by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/4130 +* Added another constructor to avoid requiring a full ANativeActivity by @Daniel-Genkin in https://github.com/assimp/assimp/pull/4142 +* Fixed building of Android port by @Daniel-Genkin in https://github.com/assimp/assimp/pull/4145 +* Fix fuzzer crashes by @alpire in https://github.com/assimp/assimp/pull/4146 +* Update D3MFOpcPackage.cpp by @kimkulling in https://github.com/assimp/assimp/pull/4154 +* Remove optimization fence preventing automatic move by @Skylion007 in https://github.com/assimp/assimp/pull/4164 +* Change version to 5.1.0 by @kimkulling in https://github.com/assimp/assimp/pull/4166 +* Update anim.h by @kimkulling in https://github.com/assimp/assimp/pull/4167 +* Added UE4 plugin by @irajsb in https://github.com/assimp/assimp/pull/4165 +* Artenuvielle x3d pugi migration artenuvielle by @kimkulling in https://github.com/assimp/assimp/pull/4170 +* X3D importer pugi migration by @Artenuvielle in https://github.com/assimp/assimp/pull/4079 +* Better aiMesh ABI compatibility with 5.0.1, make smaller by @RichardTea in https://github.com/assimp/assimp/pull/4163 +* Check and limit maximum size of glTF by @RichardTea in https://github.com/assimp/assimp/pull/4160 +* 3DS Export: Add support for aiShadingMode_PBR_BRDF by @RichardTea in https://github.com/assimp/assimp/pull/4159 +* Add assimpjs link to the ports in the readme file by @kovacsv in https://github.com/assimp/assimp/pull/4150 +* Fix out-of-bounds read in RemoveLineComments by @alpire in https://github.com/assimp/assimp/pull/4147 +* Allow the gltf2 Importer to optionally use glTF 2.0 JSON schemas for initial validation by @MalcolmTyrrell in https://github.com/assimp/assimp/pull/4111 +* Disable m3d for 5.1 by @kimkulling in https://github.com/assimp/assimp/pull/4172 +* glTF2 skinning related fixes by @ifree in https://github.com/assimp/assimp/pull/4174 + +## New Contributors +* @grdowns made their first contribution in https://github.com/assimp/assimp/pull/2680 +* @vcebollada made their first contribution in https://github.com/assimp/assimp/pull/2675 +* @feniksa made their first contribution in https://github.com/assimp/assimp/pull/2699 +* @mdinim made their first contribution in https://github.com/assimp/assimp/pull/2677 +* @TGEnigma made their first contribution in https://github.com/assimp/assimp/pull/2690 +* @jherico made their first contribution in https://github.com/assimp/assimp/pull/2722 +* @ffontaine made their first contribution in https://github.com/assimp/assimp/pull/2697 +* @Zalewa made their first contribution in https://github.com/assimp/assimp/pull/2698 +* @quanterion made their first contribution in https://github.com/assimp/assimp/pull/2726 +* @tanolino made their first contribution in https://github.com/assimp/assimp/pull/2744 +* @bztsrc made their first contribution in https://github.com/assimp/assimp/pull/2736 +* @jcarpent made their first contribution in https://github.com/assimp/assimp/pull/2758 +* @thewoz made their first contribution in https://github.com/assimp/assimp/pull/2748 +* @da-raf made their first contribution in https://github.com/assimp/assimp/pull/2727 +* @coryf made their first contribution in https://github.com/assimp/assimp/pull/2779 +* @dylankenneally made their first contribution in https://github.com/assimp/assimp/pull/2776 +* @apanteleev made their first contribution in https://github.com/assimp/assimp/pull/2839 +* @9739654 made their first contribution in https://github.com/assimp/assimp/pull/2843 +* @malortie made their first contribution in https://github.com/assimp/assimp/pull/2838 +* @yunqiangshanbill made their first contribution in https://github.com/assimp/assimp/pull/2853 +* @felipeek made their first contribution in https://github.com/assimp/assimp/pull/2855 +* @Dunni made their first contribution in https://github.com/assimp/assimp/pull/2863 +* @runforu made their first contribution in https://github.com/assimp/assimp/pull/2892 +* @tellypresence made their first contribution in https://github.com/assimp/assimp/pull/2960 +* @ms-maxvollmer made their first contribution in https://github.com/assimp/assimp/pull/2970 +* @hbina made their first contribution in https://github.com/assimp/assimp/pull/2976 +* @inhosens made their first contribution in https://github.com/assimp/assimp/pull/3009 +* @shawwn made their first contribution in https://github.com/assimp/assimp/pull/3057 +* @maquefel made their first contribution in https://github.com/assimp/assimp/pull/3034 +* @aimoonchen made their first contribution in https://github.com/assimp/assimp/pull/3075 +* @napina made their first contribution in https://github.com/assimp/assimp/pull/3086 +* @Hehongyuanlove made their first contribution in https://github.com/assimp/assimp/pull/3158 +* @timuber made their first contribution in https://github.com/assimp/assimp/pull/3149 +* @lukka made their first contribution in https://github.com/assimp/assimp/pull/3168 +* @sercand made their first contribution in https://github.com/assimp/assimp/pull/3209 +* @rudybear made their first contribution in https://github.com/assimp/assimp/pull/3105 +* @pseiderer made their first contribution in https://github.com/assimp/assimp/pull/3146 +* @hoshiryu made their first contribution in https://github.com/assimp/assimp/pull/3175 +* @dmgolembiowski made their first contribution in https://github.com/assimp/assimp/pull/3195 +* @jercytryn made their first contribution in https://github.com/assimp/assimp/pull/3214 +* @kalyan-kumar made their first contribution in https://github.com/assimp/assimp/pull/3215 +* @M4T1A5 made their first contribution in https://github.com/assimp/assimp/pull/3226 +* @rmstyrczula made their first contribution in https://github.com/assimp/assimp/pull/3235 +* @kshepherd2013 made their first contribution in https://github.com/assimp/assimp/pull/3233 +* @AlecLafita made their first contribution in https://github.com/assimp/assimp/pull/3263 +* @DavidBerger98 made their first contribution in https://github.com/assimp/assimp/pull/3271 +* @infosia made their first contribution in https://github.com/assimp/assimp/pull/3288 +* @Evangel63 made their first contribution in https://github.com/assimp/assimp/pull/3298 +* @ifiddynine made their first contribution in https://github.com/assimp/assimp/pull/3293 +* @mahiuchun made their first contribution in https://github.com/assimp/assimp/pull/3301 +* @IOBYTE made their first contribution in https://github.com/assimp/assimp/pull/3320 +* @AndrewJDR made their first contribution in https://github.com/assimp/assimp/pull/3322 +* @MeyerFabian made their first contribution in https://github.com/assimp/assimp/pull/3337 +* @awr1 made their first contribution in https://github.com/assimp/assimp/pull/3328 +* @qarmin made their first contribution in https://github.com/assimp/assimp/pull/3356 +* @lsliegeo made their first contribution in https://github.com/assimp/assimp/pull/3372 +* @fuj1n made their first contribution in https://github.com/assimp/assimp/pull/3374 +* @flowtsohg made their first contribution in https://github.com/assimp/assimp/pull/3386 +* @jnhyatt made their first contribution in https://github.com/assimp/assimp/pull/3385 +* @Naios made their first contribution in https://github.com/assimp/assimp/pull/3391 +* @crocdialer made their first contribution in https://github.com/assimp/assimp/pull/3383 +* @Optimizer0 made their first contribution in https://github.com/assimp/assimp/pull/3413 +* @stromaster made their first contribution in https://github.com/assimp/assimp/pull/3446 +* @jsmaatta made their first contribution in https://github.com/assimp/assimp/pull/3454 +* @xiaozhuai made their first contribution in https://github.com/assimp/assimp/pull/3231 +* @MomoDeve made their first contribution in https://github.com/assimp/assimp/pull/3471 +* @maiqingqiang made their first contribution in https://github.com/assimp/assimp/pull/3463 +* @traversaro made their first contribution in https://github.com/assimp/assimp/pull/3455 +* @Nodrev made their first contribution in https://github.com/assimp/assimp/pull/3501 +* @Neil-Clifford-FB made their first contribution in https://github.com/assimp/assimp/pull/3504 +* @natanaeljr made their first contribution in https://github.com/assimp/assimp/pull/3503 +* @boguscoder made their first contribution in https://github.com/assimp/assimp/pull/3512 +* @huiji12321 made their first contribution in https://github.com/assimp/assimp/pull/3521 +* @Biswa96 made their first contribution in https://github.com/assimp/assimp/pull/3518 +* @wasd845 made their first contribution in https://github.com/assimp/assimp/pull/3540 +* @someonewithpc made their first contribution in https://github.com/assimp/assimp/pull/3555 +* @makitsune made their first contribution in https://github.com/assimp/assimp/pull/3562 +* @gris-martin made their first contribution in https://github.com/assimp/assimp/pull/3543 +* @Danny-Kint made their first contribution in https://github.com/assimp/assimp/pull/3552 +* @ihsinme made their first contribution in https://github.com/assimp/assimp/pull/3569 +* @JacksonM8 made their first contribution in https://github.com/assimp/assimp/pull/3571 +* @gkv311 made their first contribution in https://github.com/assimp/assimp/pull/3578 +* @h3xx made their first contribution in https://github.com/assimp/assimp/pull/3591 +* @mmp made their first contribution in https://github.com/assimp/assimp/pull/3580 +* @xiaohunqupo made their first contribution in https://github.com/assimp/assimp/pull/3594 +* @villevoutilainen made their first contribution in https://github.com/assimp/assimp/pull/3608 +* @bsekura made their first contribution in https://github.com/assimp/assimp/pull/3604 +* @contriteobserver made their first contribution in https://github.com/assimp/assimp/pull/3607 +* @lgmcode made their first contribution in https://github.com/assimp/assimp/pull/3644 +* @jkvargas made their first contribution in https://github.com/assimp/assimp/pull/3653 +* @ademets made their first contribution in https://github.com/assimp/assimp/pull/3660 +* @AndyShawQt made their first contribution in https://github.com/assimp/assimp/pull/3689 +* @Paul-Austria made their first contribution in https://github.com/assimp/assimp/pull/3691 +* @jaefunk made their first contribution in https://github.com/assimp/assimp/pull/3697 +* @bekraft made their first contribution in https://github.com/assimp/assimp/pull/3722 +* @vfxgordon made their first contribution in https://github.com/assimp/assimp/pull/3721 +* @eliasdaler made their first contribution in https://github.com/assimp/assimp/pull/3723 +* @BaldricS made their first contribution in https://github.com/assimp/assimp/pull/3746 +* @clems71 made their first contribution in https://github.com/assimp/assimp/pull/3695 +* @pcwalton made their first contribution in https://github.com/assimp/assimp/pull/3749 +* @urschanselmann made their first contribution in https://github.com/assimp/assimp/pull/3708 +* @Garux made their first contribution in https://github.com/assimp/assimp/pull/3742 +* @krishty made their first contribution in https://github.com/assimp/assimp/pull/3774 +* @JC3 made their first contribution in https://github.com/assimp/assimp/pull/3821 +* @diiigle made their first contribution in https://github.com/assimp/assimp/pull/3775 +* @ericwa made their first contribution in https://github.com/assimp/assimp/pull/3808 +* @impala454 made their first contribution in https://github.com/assimp/assimp/pull/3901 +* @Saalvage made their first contribution in https://github.com/assimp/assimp/pull/3900 +* @spotaws made their first contribution in https://github.com/assimp/assimp/pull/3858 +* @dlyr made their first contribution in https://github.com/assimp/assimp/pull/3912 +* @crud89 made their first contribution in https://github.com/assimp/assimp/pull/3894 +* @ogjamesfranco made their first contribution in https://github.com/assimp/assimp/pull/3903 +* @jagoon made their first contribution in https://github.com/assimp/assimp/pull/3916 +* @andreasbuhr made their first contribution in https://github.com/assimp/assimp/pull/3961 +* @jerstlouis made their first contribution in https://github.com/assimp/assimp/pull/3966 +* @Skylion007 made their first contribution in https://github.com/assimp/assimp/pull/3964 +* @Pankaj003 made their first contribution in https://github.com/assimp/assimp/pull/3965 +* @Promit made their first contribution in https://github.com/assimp/assimp/pull/3969 +* @irajsb made their first contribution in https://github.com/assimp/assimp/pull/3980 +* @mlopezantequera made their first contribution in https://github.com/assimp/assimp/pull/3986 +* @uerobert made their first contribution in https://github.com/assimp/assimp/pull/4027 +* @Mykhailo418 made their first contribution in https://github.com/assimp/assimp/pull/4026 +* @kovacsv made their first contribution in https://github.com/assimp/assimp/pull/4037 +* @yzthr made their first contribution in https://github.com/assimp/assimp/pull/4036 +* @Dig-Doug made their first contribution in https://github.com/assimp/assimp/pull/4056 +* @Spectrum76 made their first contribution in https://github.com/assimp/assimp/pull/4012 +* @kirillsurkov made their first contribution in https://github.com/assimp/assimp/pull/4054 +* @ingowald made their first contribution in https://github.com/assimp/assimp/pull/4081 +* @markoffline made their first contribution in https://github.com/assimp/assimp/pull/4083 +* @davidepi made their first contribution in https://github.com/assimp/assimp/pull/4108 +* @marcappelsmeier made their first contribution in https://github.com/assimp/assimp/pull/4110 +* @diharaw made their first contribution in https://github.com/assimp/assimp/pull/4112 +* @Daniel-Genkin made their first contribution in https://github.com/assimp/assimp/pull/4142 +* @alpire made their first contribution in https://github.com/assimp/assimp/pull/4146 +* @Artenuvielle made their first contribution in https://github.com/assimp/assimp/pull/4079 +* @ifree made their first contribution in https://github.com/assimp/assimp/pull/4174 + +**Full Changelog**: https://github.com/assimp/assimp/compare/v5.0.0...v5.1.0 + +# 5.0.1 +- Fix wrong version +- Fix MacOS compile issue. +- Add pdf-docs + +# 5.0.0 + - Bugfixes: + - https://github.com/assimp/assimp/issues/2551: Collada output path is worng when that is exported. + - https://github.com/assimp/assimp/issues/2603: Corrupted normals loaded from x-file. + - https://github.com/assimp/assimp/issues/2598: introduce getEpsilon + - https://github.com/assimp/assimp/issues/2613: merge glTF2 patch + - https://github.com/assimp/assimp/issues/2653: Introduce 2 tests to reproduce fbx-tokenize issue. + - https://github.com/assimp/assimp/issues/2627: Remove code from ai_assert test, will be removed in release versions. + - https://github.com/assimp/assimp/issues/2618: Compilation fails with latest MinGW + - https://github.com/assimp/assimp/issues/2614: FBX Crash on import + - https://github.com/assimp/assimp/issues/2596: Stop JoinVerticiesProcess removing bones from mesh + - https://github.com/assimp/assimp/issues/2599: Multiconfig debug postfix + - https://github.com/assimp/assimp/issues/2570: Update config.h.in + - https://github.com/assimp/assimp/issues/1623: Crash when loading multiple PLY files + - https://github.com/assimp/assimp/issues/2571: Extra layer for multi uv sets + - https://github.com/assimp/assimp/issues/2557: Fix CMake exporter macro + - https://github.com/assimp/assimp/issues/1623: Crash when loading multiple PLY files + - https://github.com/assimp/assimp/issues/2548: Check if weight are set or set the weight to 1.0f + - https://github.com/assimp/assimp/issues/1612: Make wstaring handling depend from encoding of the filename. + - https://github.com/assimp/assimp/issues/1642: Fix build on Hurd + - https://github.com/assimp/assimp/issues/1460: Skip uv- and color-components if these are not defined. + - https://github.com/assimp/assimp/issues/1638: Use memcpy instead of dynamic_cast. + - https://github.com/assimp/assimp/issues/1574: Add API to get name of current branch. + - https://github.com/assimp/assimp/issues/2439: Add null ptr test before calling hasAttr. + - https://github.com/assimp/assimp/issues/2527: Use correct macro for Assimp-exporter. + - https://github.com/assimp/assimp/issues/2368: Just fix it. + - https://github.com/assimp/assimp/issues/2507: Collada_metadata' branch breaks loading of collada files + - https://github.com/assimp/assimp/issues/2368: Add missign anim mesh for multimaterial meshes in fbx. + - https://github.com/assimp/assimp/issues/2431: Use irrXml directly for mingw compiler. + - https://github.com/assimp/assimp/issues/1660: Use memcpy instead of a c-style dynamic cast to parse a aiVector3D + - https://github.com/assimp/assimp/issues/1722: Use a const reference to fix issue with ppc. + - https://github.com/assimp/assimp/issues/1390: aiScene now stores metadata as well. + - https://github.com/assimp/assimp/issues/1721: set camera parameters instead of nonsense. + - https://github.com/assimp/assimp/issues/1728: check if mesh is a null instance before dereferencing it. + - https://github.com/assimp/assimp/issues/1721: set camera param… + - https://github.com/assimp/assimp/issues/1743: introduce /bigobj compile flag. + - https://github.com/assimp/assimp/issues/905: Add missing contrib source from zlib. + - https://github.com/assimp/assimp/issues/1758: Fix compiler warning. + - https://github.com/assimp/assimp/issues/1752: Move guard over include statement. + - https://github.com/assimp/assimp/issues/1583: Update doc. + - https://github.com/assimp/assimp/issues/774: Use correct type for unitscale in fbx. + - https://github.com/assimp/assimp/issues/1729: check for bit flip when unsigned int overflow happens in x-file parsing. + - https://github.com/assimp/assimp/issues/1386: fix undefined behaviour in compare function. + - https://github.com/assimp/assimp/issues/567: prevend dependency cycle. + - https://github.com/assimp/assimp/issues/1564: Remove copy constructor. + - https://github.com/assimp/assimp/issues/1773: Make FileSystemFilter forward all virtual functions to wrapped IOSystem instance + - https://github.com/assimp/assimp/issues/1120: use euler angles for pre- and post-rotation. + - https://github.com/assimp/assimp/issues/1796: return correct value on detach logger. + - https://github.com/assimp/assimp/issues/1850: remove buggy setup in cmake. + - https://github.com/assimp/assimp/issues/1836: make documentation much more clear how to apply global scaling. + - https://github.com/assimp/assimp/issues/1855: fix correction of node names. + - https://github.com/assimp/assimp/issues/1831: make config CMAKE_LIBRARY_CONFIG overridable. + - https://github.com/assimp/assimp/issues/1881: make template-based get and put in streamreader/writer public. + - https://github.com/assimp/assimp/issues/1621: add file check for dxf file without extensions. + - https://github.com/assimp/assimp/issues/1894: use mesh name to name exported obj node. + - https://github.com/assimp/assimp/issues/1893: fix mem leak in glft2Importer. + - https://github.com/assimp/assimp/issues/1784: change so.name to keep track of the minor version of the lib. + - https://github.com/assimp/assimp/issues/842: experimental suppor for ascii stl pointcloud export. + - https://github.com/assimp/assimp/issues/919: add missing cast for vs2015. + - https://github.com/assimp/assimp/issues/1952: check for postprocessing parameter before try to parse -f + - https://github.com/assimp/assimp/issues/1780: check against nullptr before accessing normal data in aiMesh instance. + - https://github.com/assimp/assimp/issues/1970: stl with empty solid. + - https://github.com/assimp/assimp/issues/1587: Add validation to LWS unit test. + - https://github.com/assimp/assimp/issues/1973: Added support for CustomData(Layer) to support multiple (texture) UV mappings. + - https://github.com/assimp/assimp/issues/2016: Only add material uv mappings if set, ignore when no uvmapping set. + - https://github.com/assimp/assimp/issues/2019: fix the qt-viewer without export. + - https://github.com/assimp/assimp/issues/2024: make code more readable. + - https://github.com/assimp/assimp/issues/2011: add reference to free model. + - https://github.com/assimp/assimp/issues/2001: Make glTF2 the default exporter for glft + - https://github.com/assimp/assimp/issues/1340: Fix handling of empty nodes in openddl-parser. + - https://github.com/assimp/assimp/issues/2449: fix uwp handling + - https://github.com/assimp/assimp/issues/2459: fix duplicated fbx-type propertry. + - https://github.com/assimp/assimp/issues/2334: run vc_redist in passive + quiet mode. + - https://github.com/assimp/assimp/issues/2335: add cmake-modules to the installer. + - https://github.com/assimp/assimp/issues/2054: make empty bone validation optional. + - https://github.com/assimp/assimp/issues/2056: use correc exception type in MMD-loader. + - https://github.com/assimp/assimp/issues/1724: add default material access to the material API. + - https://github.com/assimp/assimp/issues/2075: Make inject of debug postfix an option, so you can swich it off. + - https://github.com/assimp/assimp/issues/2088: fix possible out-of-bound access in fbx-lerp operaation. + - https://github.com/assimp/assimp/issues/1451: break when assimp-bin format was exported with a different version. + - https://github.com/assimp/assimp/issues/212: introduce unittest for line-splitter, will validate that the current behaviour is correct. + - https://github.com/assimp/assimp/issues/2154: remove redundant file from source folder. + - https://github.com/assimp/assimp/issues/2067: introduce /bigobj compiler flag + - https://github.com/assimp/assimp/issues/2206: make bone error in verification more verbose. + - https://github.com/assimp/assimp/issues/2199: introduce first version for exporter. + - https://github.com/assimp/assimp/issues/2229: fix count of polylines when only one vertex was indexed. + - https://github.com/assimp/assimp/issues/2210: use different enum value. + - https://github.com/assimp/assimp/issues/2202: put STEPParser out of IFC importer. + - https://github.com/assimp/assimp/issues/2247: change include folder from debian package from /usr/lib/include to /usr/include + - https://github.com/assimp/assimp/issues/817: use emmisive factor instead of color. + - https://github.com/assimp/assimp/issues/2251: introduce AI_CONFIG_PP_FID_IGNORE_TEXTURECOORDS to avoid removing textures. + - https://github.com/assimp/assimp/issues/2297: introduce obj-unittest to validate working importer. + - https://github.com/assimp/assimp/issues/2115: rollback setup of FBX-camera. + - https://github.com/assimp/assimp/issues/1593: fix computation of percentf for 3DS. + - https://github.com/assimp/assimp/issues/934: introduce material keys for shader types. + - https://github.com/assimp/assimp/issues/1650: build irrXml as shared lib. + - https://github.com/assimp/assimp/issues/2411: Revert parts of dynamic ixxxml linkage + - https://github.com/assimp/assimp/issues/2336: use new cmp_048 policy even for zlib in the assimp build. + - A crash in the aiMesh destructor + - Unicode fix ( experimental, feedback is welcome ) + - alloc-dealloc-mismatch + - fix for div by zero reported by address sanitizer + - assimp_cmd: + - Add --verbose flag to 'info' command, to print node transforms. + - assimp_cmd info: list meshes and print basic mesh stats. + - print error message on failure. + - Parse post process arguments when using info tool. + - prettier and better-compressed node hierarchy. + - Common Stuff: + - Exporter::ExportToBlob() Pass on preprocessing and properties. Issue #2302 + - Use correct escape sequence for unsigned. + - Ensure that the aiString lenght is 4 bytes independent which platform + - Fix compiler warnings + - Fix codacy issues + - Implemented basic PBR materials into assimp. + This adds the following texture types: + - BASE_COLOR + - NORMAL_CAMERA + - EMISSION_COLOR + - METALNESS + - DIFFUSE_ROUGHNESS + - Make IsVerbose accessible outside the exporter + - Create FUNDING.yml + - Add copyright headers to ZipArchiveIOSystem + - diable unaigned pointer access temprary. + - Fix signed unsigned comparison warnings. + - Fixed anim meshes generated from blendshapes not being copied to output for multi-material meshes + - All textures use relative path except embedded, this is fix for it. + - I want to see what GetErrorString() blurts out on the Travis failure real quick + - including instead of + - Fix Matrix4x4t Decompose to rotation vector. + - Add missing assignment operator to aiString. + - fast_atof: Remove unused variable. + - BaseImporter: Remove dead condition. + - Some StreamWriter improvements / additions. + - added support for embedded textures defined with buffer views. + - fixed embedded texture reading. + - BaseImporter: fix lookup for tokens during inmemory imports. + - Reorg of code: Each importer / exporter / domain has its own folder. + - Export: Copy metadata to be able to export it properly. + - Some MSVC/Windows corrections and updates, issue 2302. + - Introduce new log macros. + -_stat64 doesn't seem to exist. use __stat64! + - Fix strict aliasing violation in MaterialSystem + - Added check to BaseImporter::SearchFileHeaderForToken making sure that a detected token is not + in fact just a fraction of a longer token. + - added internal to_string. + - Use delete[] instead of delete to clear mMeshes + - Fix memory leak in assimp_loader + - Fix VS2013: array initialization does not work. + - aiMatrix4x4t::FromEulerAnglesXYZ modified to row order + - Various additions/fixes (FBX blend-shapes support added) + - Added animMesh name assignment at ColladaLoader + - Fixed animMesh post-processing on ConvertToLhProcess (blend-shapes weren't being affected by post-processing) + - Added WindowsStore define. This is used to change some incompatible WinRT methods + - Added FBX blend-shapes and blend-shapes animations support + - Added Maya FBX specific texture slots parsing + - Added extra FBX metadata parsing + - Added GLTF2 vertex color parsing + - Fixed IFC-Loader zip-buffer reading rountine + - Fixed OBJ file parsing line-breaker bug + - Fixed IOStreamBuffer cache over-read bug + - Added mName field to aiAnimMesh + - Reverted EmissiveFactor, TransparencyFactor and Specular + - Doc: + - Move to https://assimp-docs.readthedocs.io/en/latest/ + - Add more detailed information about the source code structure + - Clarify the matrix layout + - Document AI_MATKEY_REFLECTIVITY and AI_MATKEY_COLOR_REFLECTIVE. + - Correct matrix layout documentation + - Fix aiBone->mOffsetMatrix documentation, which was incorrect. + - Fix the assimp.net link. + - Expand the current documentation about loading of embedded textures. + - Improve the contribution guide. + - Add the HAXE-port. + - Build: + - Add example build script. + - Update DLL PE details: Copyright, git commit hash and original filename. + - Depreciated compiler which doesn't support standard features. + - Fix error when building assimp on older Mac OS X version. + - Update scene.h to use #include only if the compiler is used to compile c++ code. + - Fixed MSVC toolset versions >140. + - Fixed android zlib compile error. + - Export static libaries as CMake package. + - Set directory and name properties for installing static lib PDB. + - Use CMAKE_INSTALL_PREFIX as ASSIMP_ROOT_DIR. + - ios-build-script + - Add Inno setup path to PATH variable. + - Assimp will now be correctly built with -O3 or -Og based on build type. + - Add TARGET_INCLUDE_DIRECTORIES for assimp target + - Use a more accurate way of checking if the build is 64 bit + - Improved cmake configs for Windows and Linux. + - Default CMAKE_DEBUG_POSTFIX to 'd' on multiconfig + - Adds a way to select which exporters you want to compile + - CI: + - Fix Travis CI sign-compare warning + - Travis updated to clang 5.0 and there are new issues + - Appveyor + Travis: use caching + - Use clange adress sanitizer + memory leak detection + - Handle warnings as errors + - Use Hunter for pulling in dependencies. + - 3DS: + - Reformat initializer list + - Add explicit default constructors and assignment operators to Material. + - Add Material constructor which takes material name. + - Add Mesh constructor with takes name. + - Explicitly pass "UNNAMED" as 3DS root node name. + - Fix more thread-safety issue in 3DS loader. + - 3MF: + - Introduce first prototype for basematerial support. + - Fix parsing of base-material color. + - Fix order of init list. + - Use correct material assignment in case of multi-materials. + - Add missig tags for meta data. + - Fix model folder desc. + - Fix CanRead-method for the 3MF-Importer. + - ASE: + - Reformat initializer list. + - Add explicit default constructors and assignment operators to Material. + - Add Material constructor which takes material name. + - Pass a default material name when resizing materials buffer. + - Fix more thread-safety issue in ASE loader. + - AssJSon: + - Add json export. + - B3D + - Use std::unique_ptr + - BlenderLoader: + - Fix memory leak. + - Update BlenderDNA.h. + - Collada + - Add Collada zae import support + - fix possible memleak when throwing an exception. + - Don't use SkipElement() to skip empty Text. + - Correction on Collada parser missing textures when the image is in CDATA + - Richard tea collada metadata + - collada export: Use Camera local coordinate system + - Save/Load Collada 1.4 Root Asset Metadata + - Fix automatic name assignment for ColladaLoader when using name based assignment + - DXF: + - Fix macro issues. + - glFT + - Add ortho camera support + - Fix incorrect NO_GLTF_IMPORTER define name in glTFExporter.h + - Fix delete / delete[] mismatch + - glTFAsset: Use std:unique_ptr for Image data + - Update o3dgcTimer.h + - Added import of material properties (double sided and transparency) in glTF 1.0 importer. + - Forced 4-bits alignment for glTF buffers + - Fixed some gltf files being detected as OBJ + - Added support for non-indexed meshes in glTF importer. Addresses issue #2046. + - GLTF segfault using triangle strip + - buffer grow changes and large files support + - glFT2 + - Add ortho camera support. + - Lights import. + - Added support for generating glb2. + - Not using external bin file for glb2. + - Correctly export images with bufferView. + - Using relative buffers URI. + - Set camera "look at" to (0.0, 0.0, -1.0). + - Assign default material to meshes with no material reference. + - Import scale for normal textures and strength for occlusion textures. + - Add vertex color support to glTF2 export. + - Fix export gltf2, The JOINTS_0 componentType is incorrect. + - Move creation of vars to avoid useless creation in case of an error. + - Fix gltf2 export component type error + - Change glTF2 file extensions from gltf2/glb2 to gltf/glb in the exporter so that it matches the importer and respect the standard specifications + - Read and write the KHR_materials_unlit glTF/2.0 extension. + - Pick scene zero as scene to recursively load if no "scene" property is specified. + - Properly reads in glTF/2.0 sampler address modes. + - Fix inconsistency between animation and node name in glTF2 Importer + - Add test for glTF2 lines, line strip, lines loop and points + - Fixes crash when importing invalid glTF/2.0 files + - Skips some glTF/2.0 uv processing if the count of uvs in the attribute stream doesn't match the vertex count. + - Make gltf2's roughnessAsShininess matches between importer and exporter. + - Add support for importing GLTF2 animations. + - glTF2 importer multiple primitives and 16-bit index buffer skinmesh support. + - Fix glTF2 export with no texture coordinates + - Fix inconsistency between animation and node name in glTF2 Importer + - FBX + - FBX Import: Properly clean up post_nodes_chain in case of exception. + - Implemented basic PBR material textures + - Added maya stingray support for textures + - Added VertexColor to FBX exporter (one channel) + - Fix FBX units not being converted from CM to application scale + - FBX node chain assert fix + - FBX importer armature fixes and root bone fixes - animations should now work for more models. + - Fix Issue: group node in fbx being exported as bone node + - Fix non-ascii encoding in comments in FBXMaterial.cpp + - FBX files may use a texture reference from an embedded texture that hasn't been loaded yet. + This patch fixes this issue, storing all texture filenames, that can be acessed later via "scene::GetEmbeddedTexture", when all textures are already loaded. + Some warnings have been added to other file formats that uses embedded data. + - Fix export custom bindpose error + - Some FBX multi-material mesh fixes + - Fixed first vertex of each blendshape on a multi-material mesh having all unmapped vertice offsets being added to it + - Fixed blendshapes not importing for multi-material FBX meshes with no bones + - Store UnitScaleFactor for fbx-files. + - Global settings use float instead of double. + - Initial FBX Export Support, sponsored by MyDidimo (mydidimo.com). + - FBX Importer double precision fix. + - Apply inverse of geometric transform to child nodes. + - Node names optimization and fixing non-unique name + - Support for FBX file sizes more than 4GB. + - Fragmented FBX ASCII emdedded resource. + - Fix parse error for uv-coordinates. + - Exception spam fix for FBXMaterial. + - Fix empty fbx mesh names + - fix for geometric transform nodes with multiple children. + - FBX Export: Geometric transformations always create transformation chain. + - FBX Export: fix logic for determining if scale transformation is identity. + - FBX geometric transforms fix + - FBX Export: handle newly-added geometric transform inverse nodes. + - FBX Export: reconstruct full skeleton for any FBX deformers. + - Fbx export skeleton improvements + - FBX Export: add missing 0 value to file footer. + - Fix Texture_Alpha_soutce typo. + - LayeredTextures now work with embedded texture data + - Assimp animation time is already in seconds. Just convert to FBX time. + - Added check for NULL Compound in Properties70 element (fixes DeadlyImportError on some FBX files) + - FBXImporter: Fix GetUniqueName to return names properly + - Fix for crash in StreamWriter::PutString when exporting ASCII FBX + - Don't call PutString with an empty string. Both DumpChildrenAscii and EndAscii can return without modifyting the string, + so we need to check the string before calling PutString. This used to cause a crash. + - Fbx convert to unit + - Optimisation of FBX node name uniqueness + - FBX import: fix import of direct data by vertices + unify node renaming + - fixed ordering of skin indices and weights, to be consistent between systems + - Add FBX Line Element support. + - Preserve all the material parameters from FBX models + - Fix for FBX binary tokenization of arrays of type 'c' + - Generate attenuation constants if non are privded in the Blender file. Using: https://imdoingitwrong.wordpress.com/2011/01/31/light-attenuation/ + - Fix FBX face materials not being properly loaded if the face count mismatches the material count + - LWO: + - Initialize unnamed node uniqueness index outside of loop. + - Use C++11 auto for easier refactoring. + - Move some assignments to make it clearer when the thing should be moved. + - IFC-2x3: + - Fixed bug in IFC when dimensional exponent parameters in IfcSIUnits is not defined. + - In IFC, fixed parser to avoid interpretation of '##' in string as identifiers + - MD5: + - MD5-Loader: set meshnames. + - MDC: + - Fix horrible pointer casting hack + - fix a possible nullptr access. + - MDLLoader: + - Replace raw pointer with vector to fix a memory leak + - MMD: + - Add virtual destructor to a class which already has virtual functions + - Fix memory leak + - MDLImporter: + - Use unique_ptr + - Fixes a double free + - Obj: + - Use unique_ptr + - Fix possible memory leak + - Fix line continuations in OBJ files + - Fix buffer overflow in obj loader + - Replace assertion by an exception in Obj parsing. + - Fix material index off-by-one error in some OBJ files (seen in a C4D export). + - Fixed test .obj file: OBJ Vertex Colors are expected to be floats (0-1). + - Fix Issue #1923: OBJ Exporter can't correctly export vertex colors. + - bad OBJ file that can still be read + - Fix .obj displacement texture parsing + - Fix expensive memory allocation and memory copying occurring in obj files with a large number of meshes. + - Pointcloud support + - OBJ: Coerce texture coords of nan or infinity to zero + - a test for bad OBJ file format and code fix that handles it + - Fix progress reporting in ObjFileParser. Remove old unused code which is claiming to still take up "1/3" of the total progress. + - Obj: we can still import partially incorrect files + - OBJ coerce invalid nan or inf texture coords to 0 + - Ogre: + - Change OgreXmlSerializer::HasAttribute parameter from std::string to pointer. + - Avoid creating static std::strings. + - Avoid creating function-scoped static constants. + - Prevent crash when Ogre skeleton file is missing + - OpenGEX: + - Replace raw pointer with vector to fix a memory leak. + - Replace std::copy with explicit loop. + - Use std::unique_ptr to fix some memory leaks. + - Q3BSP: + - Convert Q3BSP Importer to use ZipArchiveIOSystem + - Add assertion to silence a static analyzer warning + - PLY: + - float-color.ply is broken. + - Fix for undefined behavior when loading binary PLY. + - PLY importer should not create faces. + - Set primitive_type to point when PLY is a point cloud. + - Add support for texture file in PLY exports. + - PLY importer should not automatically create faces. + - Fix ply exporter to be conformant to spec respecting vertex colors. + - Fix ply exporter to be conformant to spec respecting vertex colors. + - Smd + - Cannot read bone names containing spaces + - STL: + - Fix white ambient in STL loader + - Fix import of binary STL files in double-precision builds. + - STL binary Export should write 4-byte floats for vertex and normal coordinates. + - Add mesh names to imported ASCII STL. + - STL-Exporter: fix division by zero in normalize method during update + - XGLLoader: + - Fix const issue when seeting vec2. + - Fix a memory leak + - X3DImporter: + - Add virtual destructors to some classes which already have virtual functions + - X: + - fix out of bound access. + - Release x-file-based scene when throwing an exception. + - Fix exception. + - Fix typo. + - Add misisng bracket. + - Postprocessing + - Fix UV texture coords generation along Z Axis + - Thomasbiang fix issue join identical vertices not needed. + - Fix missing File Scale and Application scale fixes for all conversions. + - ScaleProcess overhauled to improve compatibility with animations and unit conversion. + - All textures use relative path except embedded textures, this is a fix for it. + - Add gen-aabb process to postprocessing. + - Embedding images post-process. + - PretransformVertices: Rearrange some assignments to clarify things. + - LimitBoneWeightsProcess: Initialize all members of Weight in constructor. + - FindInstancesProcessOptim: Optim FindInstancesProcess. + - Optim FindInstancesProcess: ComputePositionEpsilon() is a costly function which was called in the inner + loop although it only uses data from upper loop. + - Degenerate triangles with small area removing fix + - ImproveCacheLocality crashes if non triangular faces + - Add mesh name to ValidateDataStructure log + - Fix GenVertexNormals + - Added forced generation of normals with extra flag. + - Force generating mesh normals. + - Deactivate area based rejection of triangles in triangulation + - JoinVerticesProcess should only try to deduplicate used vertices. + - Feature/join vertices processor kill unused vertices + - FlipUVsProcess should also process AnimMeshes (if any) + - Allow findDegenerate and SplitLargeMesh to pass point clouds models. + - integrated DropFaceNormals process (cmake, poststepregistry) + - ValidateDataStructure.cpp: + - Fixed warnings introduced by last commit (hopefully) + - Fixed case fallthrough (due to exception flow, it didn't make a practical difference, but hopefully will remove a warning) + - Minor formatting consistency improvements + - Tools: + - Remove the qt-viewer from the build system and move it into its own repo. + - Fix AssimpView build. + - Fix Assimp viewer build with MinGW + - Examples: + - Update Sample_SimpleOpenGL.c + - Java-Port: + - JAssimp: fix simple code analysis issues. + - Fix another misinterpretation from the JNI-interface. + - Add progresshandler support jassimp + - .Net-Port: + - Fix documentation for assimp.net. + - Update AssimpNet redirect + - Python-port: + - Version bump pyassimp. + - Fix indentation error in python bindings. + - Remove check for 'assimp' in name of directories to be searched for library in python port. + - Add pyassimp code generation script for materials. + - Ensure obj is not null before using hasattr. + - Minor changes to setup.py to make it slightly more compliant + - Solved pyassimp.errors.AssimpError in conda + - Build Python representation for metadata. + - Fix "bytes aketrans" issues in Python>=3.1 + - Fix: except `SyntaxError` for py3 viewer + - Android: + - Added ASSIMP_ANDROID_JNIIOSYSTEM precheck to only remain set to ON in proper ANDROID enabled toolchain environment + - zlib & unzip + - unzip: fix build with older zlib + - irrXml: + - IrrXML doesn't recognise the construction: `` as being an empty element, and + so ColladaParser::TestTextContent advances the element stream into the `` element. + +# 4.1.0 (2017-12): +## FEATURES: + - Export 3MF ( experimental ) + - Import / Export glTF 2 + - Introduce new zib-lib to eb able to export zip-archives +- FIXES/HOUSEKEEPING: + - Added missing include to stdlib.h and remove load library call + - Fix install for builds with MSVC compiler and NMake. + - Update list of supported file formats. + - Add TriLib to the official list of supported ports. + - Re-enabling PACK_STRUCT for MDL files. + - Use std.::unique_ptr + - Update D3MFExporter.h + - Update MD3Loader.cpp, using index + - Fix all warnings on MSVC14 + - Copy assimp dll to unit folder on windows + - Update jvm port supported formats + - Add support for building Mac OS X Framework bundles + - Check for nullptr dereferencing before copying scene data + - Update ValidateDataStructure.h, typo + - Enable data structure validation in cases where it doesn't cause failures + - Remove some dead assignments + - fast_atof: Silence some uninitialized variable warnings + - Check for area test if the face is a triangle. + - Set mNumUVComponents to 0 when deleting texture coordinate sets + - Only scale the root node because this will rescale all children nodes as well. + - Issue 1514: Fix frame pointer arithmetic + - Prevent failing stringstream to crash the export process + - powf -> pow + - add Defines.h to include folder for install. + - Android: + - Fix android build + - Fix assimp for cross compile for android + - Use define for D_FILE_OFFSET_BITS only for not-android systems. + - FBX: + - Fix handling with embedded textures + - FBX 7500 Binary reading + - Remove dead assignment + - Fix export of deleted meshes; Add LazyDict::Remove method + - Log an error instead of letting the fbx-importer crash. ( issue 213 ) + - Replace bad pointer casting with memcpy + - Remove useless const qualifier from return value + - Add explicit instantiation of log_prefix so other FBX source files can see it + - add missing inversion of postrotation matrix for fbx. + - FIReader: Silence uninitialized variable warning + - Update version check in FBX reader to check for version >= 7500 + - Use actual min/max of anim keys when start/stop time is missing +- GLTF1: + - Fix output of glTF 1 version string + - Fix delete / delete[] mismatch in glTFAsset + - Don’t ignore rgba(1,1,1,1) color properties + - glTF2 primitives fixes + - Don’t ignore rgba(1,1,1,1) color properties + - Fix delete / delete[] mismatch in glTFAsset + - Remove KHR_binary_glTF code + - glTF nodes can only hold one mesh. this simply assigns to and check’s a Node’s Mesh + - version in glb header is stored as uint32_t +- GLTF2: + - node name conflict fix + - Fix transform matrices multiplication order + - Preserve node names when importing + - Add support for tangents in import + - Fix typo on gltf2 camera parameters + - Moved byteStride from accessor to bufferView + - Implemented reading binary glTF2 (glb) files + - Fix signed/unsigned warning + - Add postprocess step for scaling + - Fix shininess to roughness conversion + - Prefer “BLEND” over “MASK” as an alphaMode default + - Approximate specularity / glossiness in metallicRoughness materials + - Diffuse color and diffuse texture import and export improvements + - Addressed some mismatched news/deletes caused by the new glTF2 sources. + - Fix delete / delete[] mismatches in glTF2 importer + - use correct name of exporter to gltf2 + - Fix possible infinite loop when exporting to gltf2 + - Fix glTF2::Asset::FindUniqueID() when the input string is >= 256 chars + - Fix glTF2 alphaMode storage and reading + - Fix glTF 2.0 multi-primitive support + - Load gltf .bin files from correct directory + - Add support for importing both glTF and glTF2 files + - ampler improvements; Add new LazyDict method + - Changes to GLTF2 materials + - Remove Light, Technique references + - Start removing materials common, and adding pbrSpecularGlossiness + - Use !ObjectEmpty() vs. MemberCount() > 0 + - Working read, import, export, and write of gltf2 (pbr) material + - Check in gltf2 models to test directory + - Remove un-needed test models + - Start managing and importing gltf2 pbr materials + - Update glTF2 Asset to use indexes + - Duplicate gltfImporter as gltf2Importer; Include glTF2 importer in CMake List + - glTF2: Fix animation export + - use opacity for diffuse alpha + alphaMode +- STL: + - Restore import of multi mesh binary STLs +- Blender: + - Silence warning about uninitialized member +- MDLImporter: + - Don't take address of packed struct member +- assimp_cmd: + - Fix strict-aliasing warnings +- Open3DGC: + - Fix strict-aliasing warnings + - Add assertions to silence static analyzer warnings + - Remove redundant const qualifiers from return types + - Fix some uninitialized variable warnings + - Remove OPEN3DGC and compression references +- unzip: + - Remove dead assignment + - Bail on bad compression method + - Fix possibly uninitialized variables +- clipper: + - Add assertion to silence a static analyzer warning +- OpenDDLExport: + - Reduce scope of a variable + - Remove dead variable + - Remove dead assignment + - Fix another potential memory leak +- X3DImporter: + - Add assertions to silence static analyzer warnings + - Add missing unittest + - Workaround for buggy Android NDK (issue #1361) +- TerragenLoader: + - Remove unused variable +- SIBImporter: + - Add assertions to silence static analyzer warnings +- IFC: + - Remove dead code + - Add explicit instantiation of log_prefix so IFCMaterial.cpp can see it +- PLY: + - Remove dead assignment and reduce scope of a variable + - fix vertex attribute lookup. +- OpenGEX: + - Add assertion to silence a static analyzer warning + - Fix for TextureFile with number in file name + - Return early when element is TextureFile +- NFF: + - Add assertions to silence static analyzer warnings + - Split up some complicated assignments +- Raw: Fix misleading indentation warning + - Reduce scope of a variable +- LWO + - Reduce scope of a variable +- IRRLoader: + - Fix confusing boolean casting +- AssbinExporter: + - Add assertion to silence a static analyzer warning +- ASE: + - Add assertion to silence a static analyzer warning +- AMFImporter: + - Add assertion to silence a static analyzer warning + - Add a block +- OptimizeGraph: + - Fix possible null pointer dereference + - RemoveRedundantMaterials: + - Add assertion to silence a static analyzer warning +- ImproveCacheLocality: + - Add assertion to silence a static analyzer warning +- RemoveRedundantMaterials: + - Set pointer to nullptr after deleting it +- Travis: + - Disable unit tests in scan-build config + - Move slower builds earlier to improve parallelization + - Add static analysis to build + - Remove unused branch rule for travis. + - Add Clang UBSan build configuration + - Treat warnings as errors, without typos this time +- Unittests: + - Add VS-based source groups for the unittests. +- Collada: + - export tag + - Update ColladaExporter.cpp + - Silence uninitialized variable warning + - Add support for line strip primitives +- Obj Wavefront: + - check in exporting against out-of-bounds-access . + - Issue 1351: use correct name for obj-meshname export for groups. + - fix mem-lead: face will be not released in case of an error. + - Anatoscope obj exporter nomtl + - Raise exception when obj file contains invalid face indices + - Added alternative displacement texture token in OBJ MTL material. + - Obj: rename attribute from exporter. + - Fix OBJ discarding all material names if the material library is missing +- Step: + - use correct lookup for utf32 +- MD2: + - Fix MD2 frames containing garbage +- STL + - add missing const. + - Fix memory-alignment bug. + - Fix issue 104: deal with more solids in one STL file. +- CMake + - Fix issue 213: use correct include folder for assimp +- Doxygen + - Fix issue 1513: put irrXML onto exclucde list for doxygen run +- PyAssimp: + - Search for libassimp.so in LD_LIBRARY_PATH if available. + - Fix operator precedence issue in header check + - Split setup.py into multiple lines + - Detect if Anaconda and fixed 3d_viewer for Python 3 + - created a python3 version of the 3dviewer and fixed the / = float in py3 +- Blender: + - Fix invalid access to mesh array when the array is empty. + - Fix short overflow. + - Silence warning about inline function which is declared but not defined +- JAssimp + - Changed license header for IHMC contributions from Apache 2.0 to BSD + - Add Node metadata to the Jassmip Java API + - Added supported for custom IO Systems in Java. Implemented ClassLoader IO System + - Added a link to pure jvm assimp port +- Clang sanitizer: + - Undefined Behavior sanitizer + - Fixed a divide by zero error in IFCBoolean that was latent, but nevertheless a bug +- B3DImporter: + - Replace bad pointer casting with memcpy +- AppVeyor: + - Cleanup and Addition of VS 2017 and running Tests + - Fixed File Size reported as 0 in tests that use temporary files + - x86 isn't a valid VS platform. Win32 it is, then. + - Replaced the worker image name, which doesn't work as generator name, with a manually created generator name. + - Cleaned up appveyor setup, added VS 2017 to the build matrix and attempted to add running of tests. + - Treat warnings as errors on Appveyor + - Disable warning 4351 on MSVC 2013 +- OpenGEXImporter: + - Copy materials to scene + - Store RefInfo in unique_ptr so they get automatically cleaned up + - Fix IOStream leak + - Store ChildInfo in unique_ptr so they get automatically cleaned up + - improve logging to be able to detect error-prone situations. +- AMFImporter: + - Fix memory leak +- UnrealLoader: + - Fix IOStream leak +- Upgrade RapidJSON to get rid of a clang warning +- zlib: + - Update zlib contribution + - Removed unnecessary files from zlib contribution + - Replaced unsigned long for the crc table to z_crc_t, to match what is returned by get-crc_table +- MakeVerboseFormat: + - Fix delete / delete[] mismatches in MakeVerboseFormat +- MaterialSystem: + - Fix out-of-bounds read in MaterialSystem unit test +- SIB: + - Added support for SIB models from Silo 2.5 +- AssbinExporter: + - Fix strict aliasing violation + - Add Write specialization for aiColor3D +- DefaultLogger: + - Whitespace cleanup to fix GCC misleading indentation warning +- MDP: + - Fix encoding issues. + - PreTransformVertices: + - fix name lost in mesh and nodes when load with flag +- C4D: + - Fixes for C4D importer +- Unzip: + - Latest greatest. + +# 4.0.1 (2017-07-28) +- FIXES/HOUSEKEEPING: +- fix version test. +- Not compiling when using ASSIMP_DOUBLE_PRECISION +- Added support for python3 +- Check if cmake is installed with brew +- Low performance in OptimizeMeshesProcess::ProcessNode with huge numbers of meshes +- Elapsed seconds not shown correctly +- StreamReader: fix out-of-range exception +- PPdPmdParser: fix compilation for clang + +# 4.0.0 (2017-07-18) +## FEATURES: +- Double precision support provided ( available via cmake option ) +- QT-Widget based assimp-viewer ( works for windows, linux, osx ) +- Open3DGC codec supported by glFT-importer +- glTF: Read and write transparency values +- Add Triangulate post-processing step to glTF exporters +- Update rapidjson to v1.0.2 +- Added method to append new metadata to structure +- Unittests: intoduce a prototype model differ +- X3D support +- AMF support +- Lugdunum3D support +- Obj-Importer: obj-homogeneous_coords support +- Obj-Importer: new streaming handling + - Added support for 64 bit version header introduced in FbxSdk2016 + - Travis: enable coverall support. + - PyAssimp: New version of the pyASSIMP 3D viewer, with much improved 3D controls + - Morph animation support for collada + - Added support for parameters Ni and Tf in OBJ/MTL file format + - aiScene: add method to add children + - Added new option to IFC importer to control tessellation angle + removed unused IFC option + - aiMetaData: introduce aiMetaData::Dealloc + - Samples: add a DX11 example + - travis ci: test on OXS ( XCode 6.3 ) as well + - travis ci: enable sudo support. + - openddlparser: integrate release v0.4.0 + - aiMetaData: Added support for metadata in assbin format + +## FIXES/HOUSEKEEPING: +- Introduce usage of #pragma statement +- Put cmake-scripts into their own folder +- Fix install pathes ( issue 938 ) +- Fix object_compare in blender importer( issue 946 ) +- Fix OSX compilation error +- Fix unzip path when no other version was found ( issue 967 ) +- Set _FILE_OFFSET_BITS=64 for 32-bit linux ( issue 975 ) +- Fix constructor for radjson on OSX +- Use Assimp namespace to fix build for big-endian architectures +- Add -fPIC to C Flags for 64bit linux Shared Object builds +- MDLLoader: fix resource leak. +- MakeVerboseFormat: fix invalid delete statement +- IFC: fix possible use after free access bug +- ComputeUVMappingprocess: add missing initialization for scalar value +- Fix invalid release of mat + mesh +- IrrImporter: Fix release functions +- Split mesh before exporting gltf ( issue 995 ) +- 3MFImporter: add source group for visual studio +- IFC: Switch generated file to 2 files to fix issue related to and ( issue 1084 ) +- OBJParser: set material index when changing current material +- OBJ: check for null mesh before updating material index +- add vertex color export support ( issue 809 ) +- Fix memory leak in Collada importer ( issue 1169 ) +- add stp to the list of supported extensions for step-files ( issue 1183 ) +- fix clang build ( Issue-1169 ) +- fix for FreeBSD +- Import FindPkgMacros to main CMake Configuration +- Extended support for tessellation parameter to more IFC shapes +- defensice handling of utf-8 decode issues ( issue 1211 ) +- Fixed compiler error on clang 4.0 running on OSX +- use test extension for exported test files ( issue 1228 ) +- Set UVW index material properties for OBJ files +- Fixed no member named 'atop' in global namespace issue for Android NDK compilation +- Apply mechanism to decide use for IrrXML external or internal +- Fix static init ordering bug in OpenGEX importer +- GLTF exporter: ensure animation accessors have same count +- GLTF exporter: convert animation time from ticks to seconds +- Add support for reading texture coordinates from PLY meshes with properties named 'texture_u' and 'texture_v' +- Added TokensForSearch in BlenderLoader to allow CanRead return true for in-memory files. +- Fix wrong delete ( issue 1266 ) +- OpenGEX: fix invalid handling with color4 token ( issue 1262 ) +- LWOLoader: fix link in loader description +- Fix error when custom CMAKE_C_FLAGS is specified +- Fast-atof: log overflow errors +- Obj-Importer: do not break when detecting an overflow ( issue 1244 ) +- Obj-Importer: fix parsing of multible line data definitions +- Fixed bug where IFC models with multiple IFCSite only loaded 1 site instead of the complete model +- PLYImporter: - optimize memory and speed on ply importer / change parser to use a file stream - manage texture path in ply +- Import - manage texture coords on faces in ply import - correction on point cloud faces generation +- Utf8: integrate new lib ( issue 1158 ) +- Fixed CMAKE_MODULE_PATH overwriting previous values +- OpenGEX: Fixed bug in material color processing ( issue 1271 ) +- SceneCombiner: move header for scenecombiner to public folder. +- GLTF exporter: ensure buffer view byte offsets are correctly aligned +- X3D importer: Added EXPORT and IMPORT to the list of ignored XML tags +- X3D Exporter: fixed missing attributes +- X3D importer: Fixed import of normals for the single index / normal per vertex case +- X3D importer: Fixed handling of inlined files +- X3D importer: fixed whitespace handling (issue 1202) +- X3D importer: Fixed iterator on MSVC 2015 +- X3D importer: Fixed problems with auto, override and regex on older compilers +- X3D importer: Fixed missing header file +- X3D importer: Fixed path handling +- X3D importer: Implemented support for binary X3D files +- Fix build without 3DS ( issue 1319 ) +- pyassimp: Fixed indices for IndexedTriangleFanSet, IndexedTriangleSet and IndexedTriangleStripSet +- Fixes parameters to pyassimp.load +- Obj-Importe: Fixed texture bug due simultaneously using 'usemtl' and 'usemap' attributes +- check if all exporters are disabled ( issue 1320 ) +- Remove std functions deprecated by C++11. +- X-Importer: make it deal with lines +- use correct path for compilers ( issue 1335 ) +- Collada: add workaround to deal with polygon with holes +- update python readme +- Use unique node names when loading Collada files +- Fixed many FBX bugs + +## API COMPATIBILITY: +- Changed ABI-compatibility to v3.3.1, please rebuild your precompiled libraries ( see issue 1182 ) +- VS2010 outdated + +# 3.3.1 (2016-07-08) +## FIXES/HOUSEKEEPING: +- Setup of default precision for 17 exporters +- Fix xcode project files +- Fix BlenderTesselator: offsetof operator +- Invalid version in cmake file +- Update pstdint.h to latest greatest + + +# 3.3.0 (2016-07-05) +## FEATURES: +- C++11 support enabled +- New regression-test-UI +- Experimental glTF-importer support +- OpenGEX: add support for cameras and lights +- C4D: update to latest Melange-SDK +- Add a gitter channel +- Coverity check enabled +- Switch to <...> include brackets for public headers +- Enable export by pyAssimp +- CI: check windows build +- Add functionality to perform a singlepost-processing step +- Many more, just check the history + +## FIXES/HOUSEKEEPING: +- Fix of many resource leaks in unittests and main lib +- Fix iOS-buildfor X64 +- Choosing zlib manually for cmake +- many more, just check the history + +# 3.2.1 (2016-010-10) +## FEATURES: +- Updated glTF exporter to meet 1.0 specification. + +## FIXES/HOUSEKEEPING: +- Fixed glTF Validator errors for exported glTF format. + +# ISSUES: +- Hard coded sampler setting for + - magFilter + - minFilter +- void* in ExportData for accessor max and min. + +# 3.2.0 (2015-11-03) +## FEATURES: +- OpenDDL-Parser is part of contrib-source. +- Experimental OpenGEX-support +- CI-check for linux and windows +- Coverity check added +- New regression testsuite. +## FIXES/HOUSEKEEPING: +- Hundreds of bugfixes in all parts of the library +- Unified line endings +## API COMPATIBILITY: +- Removed precompiled header to increase build speed for linux + +# 3.1.1 (2014-06-15) +## FEATURES: +- Support for FBX 2013 and newer, binary and ASCII (this is partly work from Google Summer of Code 2012) +- Support for OGRE binary mesh and skeleton format +- Updated BLEND support for newer Blender versions +- Support for arbitrary meta data, used to hold FBX and DAE metadata +- OBJ Export now produces smaller files +- Meshes can now have names, this is supported by the major importers +- Improved IFC geometry generation +- M3 support has been removed +## FIXES/HOUSEKEEPING: +- Hundreds of bugfixes in all parts of the library +- CMake is now the primary build system +## API COMPATIBILITY: +- 3.1.1 is not binary compatible to 3.0 due to aiNode::mMetaData and aiMesh::mName +- Export interface has been cleaned up and unified +- Other than that no relevant changes + +# 3.0.0 (2012-07-07) +## FEATURES: +- New export interface similar to the import API. +- Supported export formats: Collada, OBJ, PLY and STL +- Added new import formats: XGL/ZGL, M3 (experimental) +- New postprocessing steps: Debone +- Vastly improved IFC (Industry Foundation Classes) support +- Introduced API to query importer meta information (such as supported format versions, full name, maintainer info). +- Reworked Ogre XML import +- C-API now supports per-import properties +## FIXES/HOUSEKEEPING: +- Hundreds of bugfixes in all parts of the library +- Unified naming and cleanup of public headers +- Improved CMake build system +- Templatized math library +- Reduce dependency on boost.thread, only remaining spot is synchronization for the C logging API +## API COMPATIBILITY: +- renamed headers, export interface, C API properties and meta data prevent compatibility with code written for 2.0, but in most cases these can be easily resolved +- Note: 3.0 is not binary compatible with 2.0 + +# 2.0 (2010-11-21) +## FEATURES: +- Add support for static Blender (*.blend) scenes +- Add support for Q3BSP scenes +- Add a windows-based OpenGL sample featuring texturing & basic materials +- Add an experimental progress feedback interface. +- Vastly improved performance (up to 500%, depending on mesh size and spatial structure) in some expensive postprocessing steps +- AssimpView now uses a reworked layout which leaves more space to the scene hierarchy window +- Add C# bindings ('Assimp.NET') +- Keep BSD-licensed and otherwise free test files in separate folders (./test/models and ./test/models-nonbsd). +## FIXES: +- Many Collada bugfixes, improve fault tolerance +- Fix possible crashes in the Obj loader +- Improve the Ogre XML loader +- OpenGL-sample now works with MinGW +- Fix Importer::FindLoader failing on uppercase file extensions +- Fix flawed path handling when locating external files +- Limit the maximum number of vertices, faces, face indices and weights that Assimp is able to handle. This is to avoid crashes due to overflowing counters. +- Updated XCode project files +- Further CMAKE build improvements +## API CHANGES: +- Add data structures for vertex-based animations (These are not currently used, however ...) +- Some Assimp::Importer methods are const now. + +# 1.1 (2010-04-17) +## FEATURES: +- Vastly improved Collada support +- Add MS3D (Milkshape 3D) support +- Add support for Ogre XML static meshes +- Add experimental COB (TrueSpace) support +- Automatic test suite to quickly locate regressions +- D bindings (`dAssimp`) +- Python 2.n bindings (`PyAssimp`) +- Add basic support for Unicode input files (utf8, utf16 and utf32) +- Add further utilities to the `assimp` tool (xml/binary dumps, quick file stats) +- Switch to a CMAKE-based build system including an install target for unix'es +- Automatic evaluation of subdivision surfaces for some formats. +- Add `Importer::ReadFileFromMemory` and the corresponding C-API `aiReadFileFromMemory` +- Expose further math utilities via the C-API (i.e. `aiMultiplyMatrix4`) +- Move noboost files away from the public include directory +- Many, many bugfixes and improvements in existing loaders and postprocessing steps +- Documentation improved and clarified in many places. +- Add a sample on using Assimp in conjunction with OpenGL +- Distribution/packaging: comfortable SDK installer for Windows +- Distribution/packaging: improved release packages for other architectures +## CRITICAL FIXES: +- Resolve problems with clashing heap managers, STL ABIs and runtime libraries (win32) +- Fix automatic detection of file type if no file extension is given +- Improved exception safety and robustness, prevent leaking of exceptions through the C interface +- Fix possible heap corruption due to material properties pulled in incorrectly +- Avoid leaking in certain error scenarios +- Fix 64 bit compatibility problems in some loaders (i.e. MDL) +## BREAKING API CHANGES: + - None - +## MINOR API BEHAVIOUR CHANGES: +- Change quaternion orientation to suit to the more common convention (-w). +- aiString is utf8 now. Not yet consistent, however. diff --git a/CMakeLists.txt b/CMakeLists.txt index 20c735c4cf..a61cd4d9f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- -# Copyright (c) 2006-2023, assimp team +# Copyright (c) 2006-2026, assimp team # # All rights reserved. # @@ -38,25 +38,76 @@ SET(CMAKE_POLICY_DEFAULT_CMP0012 NEW) SET(CMAKE_POLICY_DEFAULT_CMP0074 NEW) SET(CMAKE_POLICY_DEFAULT_CMP0092 NEW) -CMAKE_MINIMUM_REQUIRED( VERSION 3.10 ) +CMAKE_MINIMUM_REQUIRED( VERSION 3.22 ) + +#================================================================================# +# Model formats not enabled by default +# +# 3rd party projects may not adhere to strict standards enforced by assimp, +# in which case those formats must be opt-in; otherwise the 3rd party code +# would fail assimp CI checks +#================================================================================# +# M3D format import support (assimp integration no longer supported by M3D format author) +# User may override these in their CMake script to provide M3D import/export support +# (M3D importer/exporter was disabled for assimp release 5.1 or later) +OPTION(ASSIMP_BUILD_M3D_IMPORTER "Enable M3D file import" off) +OPTION(ASSIMP_BUILD_M3D_EXPORTER "Enable M3D file export" off) + +# Experimental USD importer: disabled, need to opt-in +# Note: assimp github PR automatic checks will fail the PR due to compiler warnings in +# the external, 3rd party tinyusdz code which isn't technically part of the PR since it's +# auto-cloned during build; so MUST disable the feature or the PR will be rejected +OPTION(ASSIMP_BUILD_USD_IMPORTER "Enable USD file import" off) +OPTION(ASSIMP_BUILD_USD_VERBOSE_LOGS "Enable verbose USD import debug logging" off) + +# VRML (.wrl/.x3dv) file import support by leveraging X3D importer and 3rd party file +# format converter to convert .wrl/.x3dv files to X3D-compatible .xml +# (Need to make this opt-in because 3rd party code triggers lots of CI code quality warnings) +OPTION(ASSIMP_BUILD_VRML_IMPORTER "Enable VRML (.wrl/.x3dv) file import" off) + +#--------------------------------------------------------------------------------# +# Internal impl for optional model formats +#--------------------------------------------------------------------------------# +# Internal/private M3D logic +if (NOT ASSIMP_BUILD_M3D_IMPORTER) + ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_IMPORTER) +endif () # if (not ASSIMP_BUILD_M3D_IMPORTER) +if (NOT ASSIMP_BUILD_M3D_EXPORTER) + ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_EXPORTER) +endif () # if (not ASSIMP_BUILD_M3D_EXPORTER) + +# Internal/private VRML logic +if (NOT ASSIMP_BUILD_VRML_IMPORTER) + ADD_DEFINITIONS( -DASSIMP_BUILD_NO_VRML_IMPORTER) +endif () # if (not ASSIMP_BUILD_VRML_IMPORTER) +#================================================================================# + +option(ASSIMP_BUILD_USE_CCACHE "Use ccache to speed up compilation." on) + +IF(ASSIMP_BUILD_USE_CCACHE) + find_program(CCACHE_PATH ccache) + IF (CCACHE_PATH) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PATH}) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_PATH}) + ENDIF() +ENDIF() -# Disabled importers: m3d for 5.1 -ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_IMPORTER) -ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_EXPORTER) # Toggles the use of the hunter package manager option(ASSIMP_HUNTER_ENABLED "Enable Hunter package manager support" OFF) IF(ASSIMP_HUNTER_ENABLED) include("cmake-modules/HunterGate.cmake") HunterGate( - URL "https://github.com/cpp-pm/hunter/archive/v0.24.0.tar.gz" - SHA1 "a3d7f4372b1dcd52faa6ff4a3bd5358e1d0e5efd" + URL "https://github.com/cpp-pm/hunter/archive/v0.25.8.tar.gz" + SHA1 "26c79d587883ec910bce168e25f6ac4595f97033" ) - - add_definitions(-DASSIMP_USE_HUNTER) + ADD_DEFINITIONS(-DASSIMP_USE_HUNTER) ENDIF() -PROJECT(Assimp VERSION 5.2.5) +PROJECT(Assimp VERSION 6.0.5 + LANGUAGES C CXX + DESCRIPTION "Open Asset Import Library (Assimp) is a library to import various well-known 3D model formats in a uniform manner." +) # All supported options ############################################### @@ -132,35 +183,35 @@ OPTION ( ASSIMP_IGNORE_GIT_HASH IF (WIN32) OPTION( ASSIMP_BUILD_ZLIB - "Build your own zlib" + "Build your zlib" ON ) ELSE() OPTION( ASSIMP_BUILD_ZLIB - "Build your own zlib" - ON + "Build your zlib" + OFF ) ENDIF() IF (WIN32) - # Use subset of Windows.h + # Use a subset of Windows.h ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN ) IF(MSVC) OPTION( ASSIMP_INSTALL_PDB - "Install MSVC debug files." + "Create MSVC debug symbol files and add to Install target." ON ) IF(NOT (MSVC_VERSION LESS 1900)) - # Multibyte character set is deprecated since at least MSVC2015 (possibly earlier) + # Multibyte character set has been deprecated since at least MSVC2015 (possibly earlier) ADD_DEFINITIONS( -DUNICODE -D_UNICODE ) ENDIF() - # Link statically against c/c++ lib to avoid missing redistriburable such as + # Link statically against c/c++ lib to avoid missing redistributable such as # "VCRUNTIME140.dll not found. Try reinstalling the app.", but give users # a choice to opt for the shared runtime if they want. option(USE_STATIC_CRT "Link against the static runtime libraries." OFF) - # The CMAKE_CXX_FLAGS vars can be overriden by some Visual Studio generators, so we use an alternative + # The CMAKE_CXX_FLAGS vars can be overridden by some Visual Studio generators, so we use an alternative # global method here: if (${USE_STATIC_CRT}) add_compile_options( @@ -198,15 +249,12 @@ SET (ASSIMP_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) SET (ASSIMP_VERSION_MINOR ${PROJECT_VERSION_MINOR}) SET (ASSIMP_VERSION_PATCH ${PROJECT_VERSION_PATCH}) SET (ASSIMP_VERSION ${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH}) -SET (ASSIMP_SOVERSION 5) +SET (ASSIMP_SOVERSION 6) SET( ASSIMP_PACKAGE_VERSION "0" CACHE STRING "the package-specific version used for uploading the sources" ) -if(NOT ASSIMP_HUNTER_ENABLED) - # Enable C++17 support globally - set(CMAKE_CXX_STANDARD 17) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_C_STANDARD 99) -endif() +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_C_STANDARD 99) IF(NOT ASSIMP_IGNORE_GIT_HASH) # Get the current working branch @@ -253,21 +301,35 @@ SET(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names") IF( UNIX ) # Use GNUInstallDirs for Unix predefined directories INCLUDE(GNUInstallDirs) - # Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit linux - IF( ${OPERATING_SYSTEM} MATCHES "Android") - ELSE() - IF ( CMAKE_SIZEOF_VOID_P EQUAL 4) # only necessary for 32-bit linux + # Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit Linux + IF(NOT ${OPERATING_SYSTEM} MATCHES "Android") + IF ( CMAKE_SIZEOF_VOID_P EQUAL 4) # only necessary for 32-bit Linux ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 ) ENDIF() ENDIF() ENDIF() +IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND WIN32) + ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS ) + ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS ) +ENDIF() + +IF( MSVC OR "${CMAKE_CXX_SIMULATE_ID}" MATCHES "MSVC") # clang with MSVC ABI + ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS ) + ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS ) +endif () + + # Grouped compiler settings ######################################## -IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT MINGW) +IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT MINGW AND NOT HAIKU) IF(NOT ASSIMP_HUNTER_ENABLED) - SET(CMAKE_CXX_STANDARD 17) SET(CMAKE_POSITION_INDEPENDENT_CODE ON) ENDIF() + + IF(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 13 AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") + MESSAGE(STATUS "GCC13 detected disabling \"-Wdangling-reference\" in Cpp files as it appears to be a false positive") + ADD_COMPILE_OPTIONS("$<$:-Wno-dangling-reference>") + ENDIF() # hide all not-exported symbols IF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64" ) SET(CMAKE_CXX_FLAGS "-mxgot -fvisibility=hidden -fno-strict-aliasing -Wall ${CMAKE_CXX_FLAGS}") @@ -281,27 +343,35 @@ IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT MINGW) ELSEIF(MSVC) # enable multi-core compilation with MSVC IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl - ADD_COMPILE_OPTIONS(/bigobj /W4 /WX ) + ADD_COMPILE_OPTIONS(/bigobj) ELSE() # msvc - ADD_COMPILE_OPTIONS(/MP /bigobj /W4 /WX) + ADD_COMPILE_OPTIONS(/MP /bigobj) ENDIF() - + # disable "elements of array '' will be default initialized" warning on MSVC2013 IF(MSVC12) - ADD_COMPILE_OPTIONS(/wd4351) + ADD_COMPILE_OPTIONS(/wd4351) ENDIF() - # supress warning for double to float conversion if Double precission is activated - ADD_COMPILE_OPTIONS(/wd4244) + # supress warning for double to float conversion if Double precision is activated + ADD_COMPILE_OPTIONS(/wd4244) SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od") - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") - SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF") + # Allow user to disable PDBs + if(ASSIMP_INSTALL_PDB) + SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi") + SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF") + elseif((GENERATOR_IS_MULTI_CONFIG) OR (CMAKE_BUILD_TYPE MATCHES Release)) + message("-- MSVC PDB generation disabled. Release binary will not be debuggable.") + endif() + if(NOT CMAKE_CXX_FLAGS MATCHES "/utf-8") + # Source code is encoded in UTF-8 + ADD_COMPILE_OPTIONS(/source-charset:utf-8) + endif() ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) IF(NOT ASSIMP_HUNTER_ENABLED) - SET(CMAKE_CXX_STANDARD 17) SET(CMAKE_POSITION_INDEPENDENT_CODE ON) ENDIF() - SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long ${CMAKE_CXX_FLAGS}" ) - SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}") + SET(CMAKE_CXX_FLAGS "-Wno-deprecated-non-prototype -fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long ${CMAKE_CXX_FLAGS}" ) + SET(CMAKE_C_FLAGS "-Wno-deprecated-non-prototype -fno-strict-aliasing ${CMAKE_C_FLAGS}") ELSEIF( MINGW ) IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) message(FATAL_ERROR "MinGW is too old to be supported. Please update MinGW and try again.") @@ -313,26 +383,26 @@ ELSEIF( MINGW ) SET(CMAKE_C_FLAGS "-fPIC ${CMAKE_C_FLAGS}") ENDIF() IF (CMAKE_BUILD_TYPE STREQUAL "Debug") - SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long -Wa,-mbig-obj -g ${CMAKE_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wno-dangling-reference -Wall -Wno-long-long -Wa,-mbig-obj -g ${CMAKE_CXX_FLAGS}") ELSE() - SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long -Wa,-mbig-obj -O3 ${CMAKE_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wno-dangling-reference -Wall -Wno-long-long -Wa,-mbig-obj -O3 ${CMAKE_CXX_FLAGS}") ENDIF() SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}") ENDIF() IF ( IOS AND NOT ASSIMP_HUNTER_ENABLED) IF (CMAKE_BUILD_TYPE STREQUAL "Debug") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode -Og") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode -Og") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode -Og") ELSE() - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode -O3") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode -O3") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode -O3") - # Experimental for pdb generation ENDIF() ENDIF() IF (ASSIMP_COVERALLS) MESSAGE(STATUS "Coveralls enabled") + INCLUDE(Coveralls) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") @@ -340,14 +410,16 @@ ENDIF() IF (ASSIMP_ASAN) MESSAGE(STATUS "AddressSanitizer enabled") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") ENDIF() IF (ASSIMP_UBSAN) MESSAGE(STATUS "Undefined Behavior sanitizer enabled") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined,shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin -fno-sanitize-recover=all") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined,shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin -fno-sanitize-recover=all") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined,shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin -fno-sanitize-recover=all") ENDIF() INCLUDE (FindPkgMacros) @@ -422,20 +494,20 @@ ENDIF() set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") IF(ASSIMP_HUNTER_ENABLED) - set(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}") - set(CMAKE_CONFIG_TEMPLATE_FILE "cmake-modules/assimp-hunter-config.cmake.in") - set(NAMESPACE "${PROJECT_NAME}::") - set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") - set(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}ConfigVersion.cmake") - set(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}Config.cmake") + SET(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}") + SET(CMAKE_CONFIG_TEMPLATE_FILE "cmake-modules/assimp-hunter-config.cmake.in") + SET(NAMESPACE "${PROJECT_NAME}::") + SET(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") + SET(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}ConfigVersion.cmake") + SET(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}Config.cmake") ELSE() - set(CONFIG_INSTALL_DIR "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}") - set(CMAKE_CONFIG_TEMPLATE_FILE "cmake-modules/assimp-plain-config.cmake.in") + SET(CONFIG_INSTALL_DIR "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}") + SET(CMAKE_CONFIG_TEMPLATE_FILE "cmake-modules/assimp-plain-config.cmake.in") string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWERCASE) - set(NAMESPACE "${PROJECT_NAME_LOWERCASE}::") - set(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWERCASE}Targets") - set(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME_LOWERCASE}ConfigVersion.cmake") - set(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME_LOWERCASE}Config.cmake") + SET(NAMESPACE "${PROJECT_NAME_LOWERCASE}::") + SET(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWERCASE}Targets") + SET(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME_LOWERCASE}ConfigVersion.cmake") + SET(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME_LOWERCASE}Config.cmake") ENDIF() set(INCLUDE_INSTALL_DIR "include") @@ -452,18 +524,20 @@ configure_package_config_file( INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}" ) -install( - FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}" - DESTINATION "${CONFIG_INSTALL_DIR}" - COMPONENT ${LIBASSIMP-DEV_COMPONENT} -) +IF(ASSIMP_INSTALL) + INSTALL( + FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}" + DESTINATION "${CONFIG_INSTALL_DIR}" + COMPONENT ${LIBASSIMP-DEV_COMPONENT} + ) -install( - EXPORT "${TARGETS_EXPORT_NAME}" - NAMESPACE "${NAMESPACE}" - DESTINATION "${CONFIG_INSTALL_DIR}" - COMPONENT ${LIBASSIMP-DEV_COMPONENT} -) + INSTALL( + EXPORT "${TARGETS_EXPORT_NAME}" + NAMESPACE "${NAMESPACE}" + DESTINATION "${CONFIG_INSTALL_DIR}" + COMPONENT ${LIBASSIMP-DEV_COMPONENT} + ) +ENDIF() IF( ASSIMP_BUILD_DOCS ) ADD_SUBDIRECTORY(doc) @@ -476,12 +550,12 @@ IF(ASSIMP_HUNTER_ENABLED) find_package(ZLIB CONFIG REQUIRED) add_definitions(-DASSIMP_BUILD_NO_OWN_ZLIB) - set(ZLIB_FOUND TRUE) - set(ZLIB_LIBRARIES ZLIB::zlib) - set(ASSIMP_BUILD_MINIZIP TRUE) + SET(ZLIB_FOUND TRUE) + SET(ZLIB_LIBRARIES ZLIB::zlib) + SET(ASSIMP_BUILD_MINIZIP TRUE) ELSE() # If the zlib is already found outside, add an export in case assimpTargets can't find it. - IF( ZLIB_FOUND ) + IF( ZLIB_FOUND AND ASSIMP_INSTALL) INSTALL( TARGETS zlib zlibstatic EXPORT "${TARGETS_EXPORT_NAME}") ENDIF() @@ -505,8 +579,8 @@ ELSE() # https://github.com/madler/zlib/issues/41#issuecomment-125848075 # Also prevents these options from "polluting" the cmake options if assimp is being # included as a submodule. - set( ASM686 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) - set( AMD64 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) + SET(ASM686 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) + SET(AMD64 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) # compile from sources ADD_SUBDIRECTORY(contrib/zlib) @@ -517,7 +591,7 @@ ELSE() SET(ASSIMP_BUILD_MINIZIP 1) ELSE() ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB) - SET(ZLIB_LIBRARIES_LINKED -lz) + SET(ZLIB_LIBRARIES_LINKED -l${ZLIB_LIBRARIES}) ENDIF() INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) ENDIF() @@ -529,7 +603,7 @@ IF( NOT IOS ) ELSE () IF( NOT BUILD_SHARED_LIBS ) IF( NOT ASSIMP_BUILD_MINIZIP ) - use_pkgconfig(UNZIP minizip) + USE_PKGCONFIG(UNZIP minizip) ENDIF() ENDIF () ENDIF () @@ -563,9 +637,9 @@ SET ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER OFF CACHE BOOL ) IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) - IF ( MSVC ) - SET(C4D_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/contrib/Cineware/includes") + SET(C4D_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/contrib/Cineware/includes") + IF (WIN32) # pick the correct prebuilt library IF(MSVC143) SET(C4D_LIB_POSTFIX "_2022") @@ -583,7 +657,7 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) SET(C4D_LIB_POSTFIX "_2010") ELSE() MESSAGE( FATAL_ERROR - "C4D is currently only supported with MSVC 10, 11, 12, 14, 14.2, 14.3" + "C4D for Windows is currently only supported with MSVC 10, 11, 12, 14, 14.2, 14.3" ) ENDIF() @@ -601,98 +675,121 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) # winsock and winmm are necessary (and undocumented) dependencies of Cineware SDK because # it can be used to communicate with a running Cinema 4D instance SET(C4D_EXTRA_LIBRARIES WSock32.lib Winmm.lib) - ELSE () + ELSEIF (APPLE) + SET(C4D_LIB_BASE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/contrib/Cineware/libraries/osx") + + SET(C4D_DEBUG_LIBRARIES + "${C4D_LIB_BASE_PATH}/debug/libcinewarelib.a" + "${C4D_LIB_BASE_PATH}/debug/libjpeglib.a" + ) + SET(C4D_RELEASE_LIBRARIES + "${C4D_LIB_BASE_PATH}/release/libcinewarelib.a" + "${C4D_LIB_BASE_PATH}/release/libjpeglib.a" + ) + ELSE() MESSAGE( FATAL_ERROR - "C4D is currently only available on Windows with Cineware SDK installed in contrib/Cineware" + "C4D is currently only available on Windows and macOS with Cineware SDK installed in contrib/Cineware" ) - ENDIF () + ENDIF() ELSE () ADD_DEFINITIONS( -DASSIMP_BUILD_NO_C4D_IMPORTER ) ENDIF () +IF(ASSIMP_BUILD_DRACO_STATIC) + SET(ASSIMP_BUILD_DRACO ON) +ENDIF() + # Draco requires cmake 3.12 IF (DEFINED CMAKE_VERSION AND "${CMAKE_VERSION}" VERSION_LESS "3.12") - message(NOTICE "draco requires cmake 3.12 or newer, cmake is ${CMAKE_VERSION} . Draco is disabled") + MESSAGE(NOTICE "draco requires cmake 3.12 or newer, cmake is ${CMAKE_VERSION} . Draco is disabled") SET ( ASSIMP_BUILD_DRACO OFF CACHE BOOL "Disabled: Draco requires newer cmake" FORCE ) ELSE() OPTION ( ASSIMP_BUILD_DRACO "If the Draco libraries are to be built. Primarily for glTF" OFF ) IF ( ASSIMP_BUILD_DRACO ) # Primarily for glTF v2 # Enable Draco glTF feature set - set(DRACO_GLTF ON CACHE BOOL "" FORCE) + SET(DRACO_GLTF_BITSTREAM ON CACHE BOOL "" FORCE) # Disable unnecessary or omitted components - set(DRACO_JS_GLUE OFF CACHE BOOL "" FORCE) - set(DRACO_WASM OFF CACHE BOOL "" FORCE) - set(DRACO_MAYA_PLUGIN OFF CACHE BOOL "" FORCE) - set(DRACO_UNITY_PLUGIN OFF CACHE BOOL "" FORCE) - set(DRACO_TESTS OFF CACHE BOOL "" FORCE) + SET(DRACO_JS_GLUE OFF CACHE BOOL "" FORCE) + SET(DRACO_WASM OFF CACHE BOOL "" FORCE) + SET(DRACO_MAYA_PLUGIN OFF CACHE BOOL "" FORCE) + SET(DRACO_UNITY_PLUGIN OFF CACHE BOOL "" FORCE) + SET(DRACO_TESTS OFF CACHE BOOL "" FORCE) IF(ASSIMP_HUNTER_ENABLED) hunter_add_package(draco) find_package(draco CONFIG REQUIRED) - set(draco_LIBRARIES draco::draco) + SET(draco_LIBRARIES draco::draco) ELSE() # Draco 1.4.1 has many warnings and will not build with /WX or -Werror # See https://github.com/google/draco/issues/672 # and https://github.com/google/draco/issues/673 IF(MSVC) - set(DRACO_CXX_FLAGS "/W0") + SET(DRACO_CXX_FLAGS "/W0") ELSE() - list(APPEND DRACO_CXX_FLAGS + LIST(APPEND DRACO_CXX_FLAGS "-Wno-bool-compare" "-Wno-comment" "-Wno-maybe-uninitialized" "-Wno-sign-compare" "-Wno-unused-local-typedefs" ) - # Draco 1.4.1 does not explicitly export any symbols under GCC/clang - list(APPEND DRACO_CXX_FLAGS - "-fvisibility=default" - ) + + IF(NOT ASSIMP_BUILD_DRACO_STATIC) + # Draco 1.4.1 does not explicitly export any symbols under GCC/clang + LIST(APPEND DRACO_CXX_FLAGS + "-fvisibility=default" + ) + ENDIF() ENDIF() # Don't build or install all of Draco by default ADD_SUBDIRECTORY( "contrib/draco" EXCLUDE_FROM_ALL ) - if(MSVC OR WIN32) - set(draco_LIBRARIES "draco") - else() - if(BUILD_SHARED_LIBS) - set(draco_LIBRARIES "draco_shared") - else() - set(draco_LIBRARIES "draco_static") - endif() - endif() + IF(ASSIMP_BUILD_DRACO_STATIC) + set_property(DIRECTORY "contrib/draco" PROPERTY BUILD_SHARED_LIBS OFF) + ENDIF() + + IF(MSVC OR WIN32) + SET(draco_LIBRARIES "draco") + ELSE() + IF(ASSIMP_BUILD_DRACO_STATIC) + SET(draco_LIBRARIES "draco_static") + ELSE() + SET(draco_LIBRARIES "draco_shared") + ENDIF() + ENDIF() # Don't build the draco command-line tools by default set_target_properties(draco_encoder draco_decoder PROPERTIES EXCLUDE_FROM_ALL TRUE EXCLUDE_FROM_DEFAULT_BUILD TRUE - ) + ) # Do build the draco shared library set_target_properties(${draco_LIBRARIES} PROPERTIES EXCLUDE_FROM_ALL FALSE EXCLUDE_FROM_DEFAULT_BUILD FALSE - ) + ) TARGET_USE_COMMON_OUTPUT_DIRECTORY(${draco_LIBRARIES}) TARGET_USE_COMMON_OUTPUT_DIRECTORY(draco_encoder) TARGET_USE_COMMON_OUTPUT_DIRECTORY(draco_decoder) - set(draco_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/draco/src") + SET(draco_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/draco/src") # This is probably wrong - INSTALL( TARGETS ${draco_LIBRARIES} - EXPORT "${TARGETS_EXPORT_NAME}" - LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR} - RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR} - FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR} - COMPONENT ${LIBASSIMP_COMPONENT} - INCLUDES DESTINATION include - ) - + IF (ASSIMP_INSTALL) + INSTALL( TARGETS ${draco_LIBRARIES} + EXPORT "${TARGETS_EXPORT_NAME}" + LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR} + RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR} + FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR} + COMPONENT ${LIBASSIMP_COMPONENT} + INCLUDES DESTINATION include + ) + ENDIF() ENDIF() ENDIF() ENDIF() @@ -736,8 +833,8 @@ IF ( ASSIMP_INSTALL ) ENDIF() CONFIGURE_FILE( - ${CMAKE_CURRENT_LIST_DIR}/revision.h.in - ${CMAKE_CURRENT_BINARY_DIR}/revision.h + ${CMAKE_CURRENT_LIST_DIR}/include/assimp/revision.h.in + ${CMAKE_CURRENT_BINARY_DIR}/include/assimp/revision.h ) CONFIGURE_FILE( @@ -778,7 +875,7 @@ IF ( ASSIMP_INSTALL ) 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_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) @@ -825,24 +922,24 @@ if(WIN32) IF(MSVC12 OR MSVC14 OR MSVC15 ) ADD_CUSTOM_TARGET(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM) IF(CMAKE_GENERATOR MATCHES "^Visual Studio") - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) ELSE() - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) - ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) ENDIF() ENDIF() ENDIF () diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000000..3b6d63d4a4 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,53 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 20, + "patch": 0 + }, + "configurePresets": [ + { + "name": "assimp", + "binaryDir": "${sourceDir}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "ASSIMP_BUILD_ASSIMP_TOOLS": "OFF" + } + }, + { + "name": "assimp_static", + "binaryDir": "${sourceDir}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "BUILD_SHARED_LIBS": "OFF", + "ASSIMP_BUILD_ASSIMP_TOOLS": "OFF", + "ASSIMP_DOUBLE_PRECISION": "ON" + } + }, + { + "name": "assimp_double_precision", + "binaryDir": "${sourceDir}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "ASSIMP_BUILD_ASSIMP_TOOLS": "OFF", + "ASSIMP_DOUBLE_PRECISION": "ON" + } + }, + { + "name": "assimp_with_tools", + "binaryDir": "${sourceDir}", + "cacheVariables": { + "ASSIMP_BUILD_ASSIMP_TOOLS": "ON" + } + }, + { + "name": "assimp_all", + "binaryDir": "${sourceDir}", + "cacheVariables": { + "ASSIMP_BUILD_ASSIMP_TOOLS": "ON", + "ASSIMP_BUILD_SAMPLES": "ON", + "ASSIMP_BUILD_DOCS": "ON" + } + } + ] +} diff --git a/CREDITS b/CREDITS index 26e21d2f41..62b449614e 100644 --- a/CREDITS +++ b/CREDITS @@ -60,7 +60,7 @@ The GUY who performed some of the CSM mocaps. Contributed fixes for the documentation and the doxygen markup - Zhao Lei -Contributed several bugfixes fixing memory leaks and improving float parsing +Contributed several bugfixes fixing memory leaks and improving float parsing - sueastside Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date. @@ -129,7 +129,7 @@ Contributed a patch to fix the VertexTriangleAdjacency postprocessing step. Contributed the Debian build fixes ( architecture macro ). - gellule -Several LWO and LWS fixes (pivoting). +Several LWO and LWS fixes (pivoting). - Marcel Metz GCC/Linux fixes for the SimpleOpenGL sample. diff --git a/Dockerfile b/Dockerfile index b65d131a42..21dd41daae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,17 @@ -FROM ubuntu:14.04 +FROM gcc:1.5.1.0 -RUN apt-get update && apt-get install -y \ - git cmake build-essential software-properties-common +RUN apt-get update \ + apt-get install --no-install-recommends -y ninja-build cmake zlib1g-dev -RUN add-apt-repository ppa:ubuntu-toolchain-r/test && apt-get update && apt-get install -y gcc-4.9 g++-4.9 && \ - cd /usr/bin && \ - rm gcc g++ cpp && \ - ln -s gcc-4.9 gcc && \ - ln -s g++-4.9 g++ && \ - ln -s cpp-4.9 cpp +WORKDIR /app -WORKDIR /opt +COPY . . -# Build Assimp -RUN git clone https://github.com/assimp/assimp.git /opt/assimp - -WORKDIR /opt/assimp - -RUN git checkout master \ - && mkdir build && cd build && \ - cmake \ +RUN mkdir build && cd build && \ + cmake -G 'Ninja' \ -DCMAKE_BUILD_TYPE=Release \ + -DASSIMP_BUILD_ASSIMP_TOOLS=ON \ .. && \ - make && make install + ninja -j4 && ninja install + +CMD ["/app/build/bin/unit"] diff --git a/INSTALL b/INSTALL index 410050b107..e5e5938cb7 100644 --- a/INSTALL +++ b/INSTALL @@ -1,17 +1,17 @@ - + ======================================================================== -Open Asset Import Library (assimp) INSTALL +Open Asset Import Library (assimp) INSTALL ======================================================================== ------------------------------ Getting the documentation ------------------------------ -A regularly-updated copy is available at +A regularly-updated copy is available at https://assimp-docs.readthedocs.io/en/latest/ ------------------------------ -Building Assimp +Building Assimp ------------------------------ Just check the build-instructions which you can find here: https://github.com/assimp/assimp/blob/master/Build.md diff --git a/LICENSE b/LICENSE index acaaf016ee..f7ff71e8c4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Open Asset Import Library (assimp) -Copyright (c) 2006-2021, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/Readme.md b/Readme.md index 9a8ac7c332..928698f82b 100644 --- a/Readme.md +++ b/Readme.md @@ -1,90 +1,102 @@ Open Asset Import Library (assimp) ================================== -Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export. +Open Asset Import Library is a library that loads various 3D file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export. -### Current project status ### -[![Financial Contributors on Open Collective](https://opencollective.com/assimp/all/badge.svg?label=financial+contributors)](https://opencollective.com/assimp) +## Current project status ![C/C++ CI](https://github.com/assimp/assimp/workflows/C/C++%20CI/badge.svg) - - Coverity Scan Build Status - [![Codacy Badge](https://app.codacy.com/project/badge/Grade/9973693b7bdd4543b07084d5d9cf4745)](https://www.codacy.com/gh/assimp/assimp/dashboard?utm_source=github.com&utm_medium=referral&utm_content=assimp/assimp&utm_campaign=Badge_Grade) - -[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master) -[![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=assimp_assimp&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=assimp_assimp) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/assimp/assimp.svg)](http://isitmaintained.com/project/assimp/assimp "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/assimp/assimp.svg)](http://isitmaintained.com/project/assimp/assimp "Percentage of issues still open") +[![Gurubase](https://img.shields.io/badge/Gurubase-Ask%20assimp%20Guru-006BFF)](https://gurubase.io/g/assimp) +[![Financial Contributors on Open Collective](https://opencollective.com/assimp/all/badge.svg?label=financial+contributors)](https://opencollective.com/assimp)
-APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS. -Additionally, assimp features various __mesh post processing tools__: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more. +APIs are provided for C and C++. Various bindings exist to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS. +Additionally, assimp features various __mesh post-processing tools__: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more. + +## Project activity +![Alt](https://repobeats.axiom.co/api/embed/997f84e5f9fcf772da1e687f3a4f3a8afdbf4cf0.svg "Repobeats analytics image") -### Latest Doc's ### -Please check the latest documents at [Asset-Importer-Lib-Doc](https://assimp-docs.readthedocs.io/en/latest/). +## Developer quickstart +```bash +git clone https://github.com/assimp/assimp +cd assimp +cmake -G Ninja -DASSIMP_BUILD_TESTS=off -DASSIMP_INSTALL=off -S . -B build +cd build +ninja +``` -### Prebuild binaries ### -Please check our [Itchi Projectspace](https://kimkulling.itch.io/the-asset-importer-lib) +## Documentation +Read [our latest documentation](https://the-asset-importer-lib-documentation.readthedocs.io/en/latest/). -If you want to check our Model-Database, use the following repo: https://github.com/assimp/assimp-mdb +## Pre-built binaries +Download binaries from [our Itch Projectspace](https://kimkulling.itch.io/the-asset-importer-lib). -### Communities ### -- Ask a question at [The Assimp-Discussion Board](https://github.com/assimp/assimp/discussions) -- Ask on [Assimp-Community on Reddit](https://www.reddit.com/r/Assimp/) -- Ask on [StackOverflow with the assimp-tag](http://stackoverflow.com/questions/tagged/assimp?sort=newest). -- Nothing has worked? File a question or an issue-report at [The Assimp-Issue Tracker](https://github.com/assimp/assimp/issues) +## Test data +Clone [our model database for testing purposes](https://github.com/assimp/assimp-mdb). -And we also have a Gitter-channel:Gitter [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+## Communities +- Ask questions at [the Assimp Discussion Board](https://github.com/assimp/assimp/discussions). +- Find us on [discord](https://discord.gg/kKazXMXDy2) +- Ask [the Assimp community on Reddit](https://www.reddit.com/r/Assimp/). +- Ask on [StackOverflow with the assimp-tag](http://stackoverflow.com/questions/tagged/assimp?sort=newest). +- Nothing has worked? File a question or an issue report at [The Assimp-Issue Tracker](https://github.com/assimp/assimp/issues) -#### Supported file formats #### -You can find the complete list of supported file-formats [here](https://github.com/assimp/assimp/blob/master/doc/Fileformats.md) +## Supported file formats +See [the complete list of supported formats](https://github.com/assimp/assimp/blob/master/doc/Fileformats.md). -### Building ### -Take a look into the https://github.com/assimp/assimp/blob/master/Build.md file. We are available in vcpkg, and our build system is CMake; if you used CMake before there is a good chance you know what to do. +## Building +Start by reading [our build instructions](https://github.com/assimp/assimp/blob/master/Build.md). We are available in vcpkg, and our build system is CMake; if you used CMake before there is a good chance you know what to do. -### Ports ### +## Ports * [Android](port/AndroidJNI/README.md) * [Python](port/PyAssimp/README.md) -* [.NET](https://bitbucket.org/Starnick/assimpnet/src/master/) +* [.NET](https://github.com/Saalvage/AssimpNetter) * [Pascal](port/AssimpPascal/Readme.md) * [Javascript (Alpha)](https://github.com/makc/assimp2json) * [Javascript/Node.js Interface](https://github.com/kovacsv/assimpjs) * [Unity 3d Plugin](https://ricardoreis.net/trilib-2/) * [Unreal Engine Plugin](https://github.com/irajsb/UE4_Assimp/) -* [JVM](https://github.com/kotlin-graphics/assimp) Full jvm port (current [status](https://github.com/kotlin-graphics/assimp/wiki/Status)) +* [JVM](https://github.com/kotlin-graphics/assimp) Full JVM port (current [status](https://github.com/kotlin-graphics/assimp/wiki/Status)) * [HAXE-Port](https://github.com/longde123/assimp-haxe) The Assimp-HAXE-port. * [Rust](https://github.com/jkvargas/russimp) -### Other tools ### -[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities. - -#### Repository structure #### -Open Asset Import Library is implemented in C++. The directory structure looks like: - - /code Source code - /contrib Third-party libraries - /doc Documentation (doxysource and pre-compiled docs) - /fuzz Contains the test-code for the Google-Fuzzer project - /include Public header C and C++ header files - /scripts Scripts used to generate the loading code for some formats - /port Ports to other languages and scripts to maintain those. - /test Unit- and regression tests, test suite of models - /tools Tools (old assimp viewer, command line `assimp`) - /samples A small number of samples to illustrate possible use-cases for Assimp - -The source code is organized in the following way: - - code/Common The base implementation for importers and the infrastructure - code/CApi Special implementations which are only used for the C-API - code/Geometry A collection of geometry tools - code/Material The material system - code/PBR An exporter for physical based models - code/PostProcessing The post-processing steps - code/AssetLib/ Implementation for import and export for the format - -### Contributing ### -Contributions to assimp are highly appreciated. The easiest way to get involved is to submit +## Other tools +[Qt5-ModelViewer](https://github.com/sharjith/ModelViewer-Qt5) is a powerful viewer based on Qt5 and Assimp's import and export abilities.
+[Assimp-Viewer](https://github.com/assimp/assimp_view) is an experimental implementation for an Asset-Viewer based on ImGUI and Assimp (experimental). + +### Repository structure +Open Asset Import Library is implemented in C++. The directory structure looks like this: + +```txt +code Source code +├── AssetLib/ The asset-importer and exporter lib +├── CApi/ C-API files +├── Common/ Common code used from all modules +├── Geometry/ Geometry utilities +├── Material/ Common materials +├── Pbrt/ Physical based materials +├── PostProcessing/ Post-processing steps +├── res Resouce files +contrib Third-party libraries +doc Documentation (Doxygen source and pre-compiled docs) +fuzz Contains the test code for the Google Fuzzer project +include Public header C and C++ header files +scripts Scripts are used to generate the loading code for some formats +port Ports to other languages and scripts to maintain those. +test Unit- and regression tests, test suite of models +├── headercheck Implements headerchecks +├── models-nonbsd Non-BSP licensed headers +├── models BSP-licensed models +├── unit Unit tests +tools Tools (old assimp viewer, command line `assimp`) +samples Small number of samples to illustrate possible use cases for Assimp +``` +## Contributing + +We would greatly appreciate for you to contribute to assimp. The easiest way to get involved is to submit a pull request with your changes against the main repository's `master` branch. ## Contributors @@ -106,16 +118,13 @@ Become a financial contributor and help us sustain our community. [[Contribute]( #### Organizations -Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/assimp/contribute)] +You can support the project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/assimp/contribute)] -### License ### +## License ### Our license is based on the modified, __3-clause BSD__-License. An _informal_ summary is: do whatever you want, but include Assimp's license text with your product - and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp. For the legal details, see the `LICENSE` file. - -### Why this name ### -Sorry, we're germans :-), no english native speakers ... diff --git a/SECURITY.md b/SECURITY.md index e4915cd1c5..987e899ef8 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,15 +2,14 @@ ## Supported Versions -Use this section to tell people about which versions of your project are -currently being supported with security updates. +The current version of Assimp that's being supported with security updates: | Version | Supported | | ------- | ------------------ | -| 5.2.4 | :white_check_mark: | +| 6.0.5 | :white_check_mark: | ## Reporting a Vulnerability -If you have found any security vulnerability you can contact us via -kim.kulling@googlemail.com +If you have found any security vulnerability you can contact us via +kim.kulling@assimp.org diff --git a/cmake-modules/DebSourcePPA.cmake b/cmake-modules/DebSourcePPA.cmake index d8a786fb2b..ebf129b4f0 100644 --- a/cmake-modules/DebSourcePPA.cmake +++ b/cmake-modules/DebSourcePPA.cmake @@ -6,7 +6,7 @@ # Creates source debian files and manages library dependencies # # Features: -# +# # - Automatically generates symbols and run-time dependencies from the build dependencies # - Custom copy of source directory via CPACK_DEBIAN_PACKAGE_SOURCE_COPY # - Simultaneous output of multiple debian source packages for each distribution @@ -114,7 +114,6 @@ foreach(RELEASE ${CPACK_DEBIAN_DISTRIBUTION_RELEASES}) endif( CPACK_DEBIAN_BUILD_DEPENDS_${DISTRIBUTION_NAME_UPPER} ) endif( CPACK_DEBIAN_BUILD_DEPENDS_${DISTRIBUTION_NAME_UPPER}_${RELEASE_UPPER} ) - file(APPEND ${DEBIAN_CONTROL} "\n" "Standards-Version: 3.8.4\n" "Homepage: ${CPACK_PACKAGE_VENDOR}\n" @@ -173,7 +172,7 @@ foreach(RELEASE ${CPACK_DEBIAN_DISTRIBUTION_RELEASES}) endforeach(DEP ${CPACK_DEBIAN_PACKAGE_SUGGESTS}) endif( CPACK_DEBIAN_PACKAGE_SUGGESTS_${DISTRIBUTION_NAME_UPPER} ) endif( CPACK_DEBIAN_PACKAGE_SUGGESTS_${DISTRIBUTION_NAME_UPPER}_${RELEASE_UPPER} ) - + file(APPEND ${DEBIAN_CONTROL} "\n" "Description: ${CPACK_PACKAGE_DISPLAY_NAME} ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\n" "${DEB_LONG_DESCRIPTION}" diff --git a/cmake-modules/FindDevIL.cmake b/cmake-modules/FindDevIL.cmake deleted file mode 100644 index 381a75dd2a..0000000000 --- a/cmake-modules/FindDevIL.cmake +++ /dev/null @@ -1,72 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#.rst: -# FindDevIL -# --------- -# -# -# -# This module locates the developer's image library. -# http://openil.sourceforge.net/ -# -# This module sets: -# -# :: -# -# IL_LIBRARIES - the name of the IL library. These include the full path to -# the core DevIL library. This one has to be linked into the -# application. -# ILU_LIBRARIES - the name of the ILU library. Again, the full path. This -# library is for filters and effects, not actual loading. It -# doesn't have to be linked if the functionality it provides -# is not used. -# ILUT_LIBRARIES - the name of the ILUT library. Full path. This part of the -# library interfaces with OpenGL. It is not strictly needed -# in applications. -# IL_INCLUDE_DIR - where to find the il.h, ilu.h and ilut.h files. -# IL_FOUND - this is set to TRUE if all the above variables were set. -# This will be set to false if ILU or ILUT are not found, -# even if they are not needed. In most systems, if one -# library is found all the others are as well. That's the -# way the DevIL developers release it. - -# TODO: Add version support. -# Tested under Linux and Windows (MSVC) - -#include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -include(FindPackageHandleStandardArgs) - -find_path(IL_INCLUDE_DIR il.h - PATH_SUFFIXES include IL - DOC "The path to the directory that contains il.h" -) - -#message("IL_INCLUDE_DIR is ${IL_INCLUDE_DIR}") - -find_library(IL_LIBRARIES - NAMES IL DEVIL - PATH_SUFFIXES lib64 lib lib32 - DOC "The file that corresponds to the base il library." -) - -#message("IL_LIBRARIES is ${IL_LIBRARIES}") - -find_library(ILUT_LIBRARIES - NAMES ILUT - PATH_SUFFIXES lib64 lib lib32 - DOC "The file that corresponds to the il (system?) utility library." -) - -#message("ILUT_LIBRARIES is ${ILUT_LIBRARIES}") - -find_library(ILU_LIBRARIES - NAMES ILU - PATH_SUFFIXES lib64 lib lib32 - DOC "The file that corresponds to the il utility library." -) - -#message("ILU_LIBRARIES is ${ILU_LIBRARIES}") - -FIND_PACKAGE_HANDLE_STANDARD_ARGS(IL DEFAULT_MSG - IL_LIBRARIES IL_INCLUDE_DIR) diff --git a/cmake-modules/FindDirectX.cmake b/cmake-modules/FindDirectX.cmake index b37bc12a3b..adc8369027 100644 --- a/cmake-modules/FindDirectX.cmake +++ b/cmake-modules/FindDirectX.cmake @@ -26,7 +26,7 @@ if(WIN32) # The only platform it makes sense to check for DirectX SDK getenv_path(DIRECTX_BASE) # construct search paths - set(DirectX_PREFIX_PATH + set(DirectX_PREFIX_PATH "${DXSDK_DIR}" "${ENV_DXSDK_DIR}" "${DIRECTX_HOME}" "${ENV_DIRECTX_HOME}" "${DIRECTX_ROOT}" "${ENV_DIRECTX_ROOT}" @@ -66,7 +66,7 @@ if(WIN32) # The only platform it makes sense to check for DirectX SDK find_library(DirectX_D3DCOMPILER_LIBRARY NAMES d3dcompiler HINTS ${DirectX_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX_LIBPATH_SUFFIX}) findpkg_finish(DirectX) - set(DirectX_LIBRARIES ${DirectX_LIBRARIES} + set(DirectX_LIBRARIES ${DirectX_LIBRARIES} ${DirectX_D3DX9_LIBRARY} ${DirectX_DXERR_LIBRARY} ${DirectX_DXGUID_LIBRARY} @@ -82,7 +82,7 @@ if(WIN32) # The only platform it makes sense to check for DirectX SDK get_filename_component(DirectX_LIBRARY_DIR "${DirectX_LIBRARY}" PATH) message(STATUS "DX lib dir: ${DirectX_LIBRARY_DIR}") find_library(DirectX_D3D11_LIBRARY NAMES d3d11 HINTS ${DirectX_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX_LIBPATH_SUFFIX}) - find_library(DirectX_D3DX11_LIBRARY NAMES d3dx11 HINTS ${DirectX_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX_LIBPATH_SUFFIX}) + find_library(DirectX_D3DX11_LIBRARY NAMES d3dx11 HINTS ${DirectX_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX_LIBPATH_SUFFIX}) if (DirectX_D3D11_INCLUDE_DIR AND DirectX_D3D11_LIBRARY) set(DirectX_D3D11_FOUND TRUE) set(DirectX_D3D11_INCLUDE_DIR ${DirectX_D3D11_INCLUDE_DIR}) @@ -92,8 +92,8 @@ if(WIN32) # The only platform it makes sense to check for DirectX SDK ${DirectX_DXGI_LIBRARY} ${DirectX_DXERR_LIBRARY} ${DirectX_DXGUID_LIBRARY} - ${DirectX_D3DCOMPILER_LIBRARY} - ) + ${DirectX_D3DCOMPILER_LIBRARY} + ) endif () mark_as_advanced(DirectX_D3D11_INCLUDE_DIR DirectX_D3D11_LIBRARY DirectX_D3DX11_LIBRARY) endif () diff --git a/cmake-modules/Findassimp.cmake b/cmake-modules/Findassimp.cmake index 6636455745..c5d7e269b3 100644 --- a/cmake-modules/Findassimp.cmake +++ b/cmake-modules/Findassimp.cmake @@ -3,7 +3,7 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8) elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) set(ASSIMP_ARCHITECTURE "32") endif(CMAKE_SIZEOF_VOID_P EQUAL 8) - + if(WIN32) set(ASSIMP_ROOT_DIR CACHE PATH "ASSIMP root directory") @@ -17,29 +17,29 @@ if(WIN32) if(MSVC12) set(ASSIMP_MSVC_VERSION "vc120") - elseif(MSVC14) + elseif(MSVC14) set(ASSIMP_MSVC_VERSION "vc140") endif(MSVC12) - + if(MSVC12 OR MSVC14) - + find_path(ASSIMP_LIBRARY_DIR NAMES assimp-${ASSIMP_MSVC_VERSION}-mt.lib HINTS ${ASSIMP_ROOT_DIR}/lib${ASSIMP_ARCHITECTURE} ) - + find_library(ASSIMP_LIBRARY_RELEASE assimp-${ASSIMP_MSVC_VERSION}-mt.lib PATHS ${ASSIMP_LIBRARY_DIR}) find_library(ASSIMP_LIBRARY_DEBUG assimp-${ASSIMP_MSVC_VERSION}-mtd.lib PATHS ${ASSIMP_LIBRARY_DIR}) - - set(ASSIMP_LIBRARY + + set(ASSIMP_LIBRARY optimized ${ASSIMP_LIBRARY_RELEASE} debug ${ASSIMP_LIBRARY_DEBUG} ) - + set(ASSIMP_LIBRARIES "ASSIMP_LIBRARY_RELEASE" "ASSIMP_LIBRARY_DEBUG") - + FUNCTION(ASSIMP_COPY_BINARIES TargetDirectory) ADD_CUSTOM_TARGET(AssimpCopyBinaries COMMAND ${CMAKE_COMMAND} -E copy ${ASSIMP_ROOT_DIR}/bin${ASSIMP_ARCHITECTURE}/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${TargetDirectory}/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll @@ -47,9 +47,37 @@ if(WIN32) COMMENT "Copying Assimp binaries to '${TargetDirectory}'" VERBATIM) ENDFUNCTION(ASSIMP_COPY_BINARIES) - + + if (NOT TARGET ASSIMP) + set(INCLUDE_DIRS ${ASSIMP_ROOT_DIR}/include) + + find_library(ASSIMP_LIB_DEBUG + NAMES assimp-${ASSIMP_MSVC_VERSION}-mtd.lib + PATHS ${ASSIMP_LIBRARY_DIR}) + + find_file(ASSIMP_DLL_DEBUG + NAMES assimp-${ASSIMP_MSVC_VERSION}-mtd.dll + PATHS ${ASSIMP_ROOT_DIR}/bin${ASSIMP_ARCHITECTURE}) + + find_library(ASSIMP_LIB_RELEASE + NAMES assimp-${ASSIMP_MSVC_VERSION}-mt.lib + PATHS ${ASSIMP_LIBRARY_DIR}) + + find_file(ASSIMP_DLL_RELEASE + NAMES assimp-${ASSIMP_MSVC_VERSION}-mt.dll + PATHS ${ASSIMP_ROOT_DIR}/bin${ASSIMP_ARCHITECTURE}) + + add_library(ASSIMP SHARED IMPORTED) + set_target_properties(ASSIMP PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIRS}" + IMPORTED_IMPLIB_DEBUG ${ASSIMP_LIB_DEBUG} + IMPORTED_IMPLIB_RELEASE ${ASSIMP_LIB_RELEASE} + IMPORTED_LOCATION_DEBUG ${ASSIMP_DLL_DEBUG} + IMPORTED_LOCATION_RELEASE ${ASSIMP_DLL_RELEASE} + ) + endif() endif() - + else(WIN32) find_path( @@ -81,5 +109,5 @@ else(WIN32) message(FATAL_ERROR "Could not find asset importer library") endif (assimp_FIND_REQUIRED) endif (assimp_FOUND) - + endif(WIN32) diff --git a/cmake-modules/HunterGate.cmake b/cmake-modules/HunterGate.cmake index 6d9cc24019..48bd506580 100644 --- a/cmake-modules/HunterGate.cmake +++ b/cmake-modules/HunterGate.cmake @@ -22,45 +22,16 @@ # 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. -# This is a gate file to Hunter package manager. -# Include this file using `include` command and add package you need, example: -# -# cmake_minimum_required(VERSION 3.2) -# -# include("cmake/HunterGate.cmake") -# HunterGate( -# URL "https://github.com/path/to/hunter/archive.tar.gz" -# SHA1 "798501e983f14b28b10cda16afa4de69eee1da1d" -# ) -# -# project(MyProject) -# -# hunter_add_package(Foo) -# hunter_add_package(Boo COMPONENTS Bar Baz) -# -# Projects: -# * https://github.com/hunter-packages/gate/ -# * https://github.com/ruslo/hunter option(HUNTER_ENABLED "Enable Hunter package manager support" ON) -if(HUNTER_ENABLED) - if(CMAKE_VERSION VERSION_LESS "3.2") - message( - FATAL_ERROR - "At least CMake version 3.2 required for Hunter dependency management." - " Update CMake or set HUNTER_ENABLED to OFF." - ) - endif() -endif() - include(CMakeParseArguments) # cmake_parse_arguments option(HUNTER_STATUS_PRINT "Print working status" ON) option(HUNTER_STATUS_DEBUG "Print a lot info" OFF) option(HUNTER_TLS_VERIFY "Enable/disable TLS certificate checking on downloads" ON) -set(HUNTER_ERROR_PAGE "https://docs.hunter.sh/en/latest/reference/errors") +set(HUNTER_ERROR_PAGE "https://hunter.readthedocs.io/en/latest/reference/errors") function(hunter_gate_status_print) if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG) diff --git a/cmake-modules/PrecompiledHeader.cmake b/cmake-modules/PrecompiledHeader.cmake index 6af7866f50..92ae592c9e 100644 --- a/cmake-modules/PrecompiledHeader.cmake +++ b/cmake-modules/PrecompiledHeader.cmake @@ -9,14 +9,14 @@ MACRO(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar OBJECT_OUTPUTS "${PrecompiledBinary}") # Do not consider .c files - foreach(fname ${Sources}) + foreach(fname ${Sources}) GET_FILENAME_COMPONENT(fext ${fname} EXT) if(fext STREQUAL ".cpp") SET_SOURCE_FILES_PROPERTIES(${fname} PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledBinary}\" /FI\"${PrecompiledBinary}\" /Fp\"${PrecompiledBinary}\"" - OBJECT_DEPENDS "${PrecompiledBinary}") + OBJECT_DEPENDS "${PrecompiledBinary}") endif(fext STREQUAL ".cpp") - endforeach(fname) + endforeach(fname) ENDIF(MSVC) # Add precompiled header to SourcesVar diff --git a/code/.editorconfig b/code/.editorconfig deleted file mode 100644 index 4a194a3179..0000000000 --- a/code/.editorconfig +++ /dev/null @@ -1,8 +0,0 @@ -# See for details - -[*.{h,hpp,c,cpp}] -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true -indent_size = 4 -indent_style = space diff --git a/code/AssetLib/3DS/3DSConverter.cpp b/code/AssetLib/3DS/3DSConverter.cpp index b4f625b765..0a7e7930c9 100644 --- a/code/AssetLib/3DS/3DSConverter.cpp +++ b/code/AssetLib/3DS/3DSConverter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -52,27 +52,31 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -using namespace Assimp; +namespace Assimp { -static const unsigned int NotSet = 0xcdcdcdcd; +static constexpr unsigned int NotSet = 0xcdcdcdcd; + +using namespace D3DS; // ------------------------------------------------------------------------------------------------ -// Setup final material indices, generae a default material if necessary +// Setup final material indices, generate a default material if necessary void Discreet3DSImporter::ReplaceDefaultMaterial() { // Try to find an existing material that matches the // typical default material setting: // - no textures // - diffuse color (in grey!) - // NOTE: This is here to workaround the fact that some + // NOTE: This is here to work-around the fact that some // exporters are writing a default material, too. unsigned int idx(NotSet); for (unsigned int i = 0; i < mScene->mMaterials.size(); ++i) { - std::string s = mScene->mMaterials[i].mName; - for (char & it : s) { + auto s = mScene->mMaterials[i].mName; + for (char &it : s) { it = static_cast(::tolower(static_cast(it))); } - if (std::string::npos == s.find("default")) continue; + if (std::string::npos == s.find("default")) { + continue; + } if (mScene->mMaterials[i].mDiffuse.r != mScene->mMaterials[i].mDiffuse.g || @@ -85,25 +89,22 @@ void Discreet3DSImporter::ReplaceDefaultMaterial() { idx = i; } if (NotSet == idx) { - idx = (unsigned int)mScene->mMaterials.size(); + idx = static_cast(mScene->mMaterials.size()); } // now iterate through all meshes and through all faces and // find all faces that are using the default material unsigned int cnt = 0; - for (std::vector::iterator - i = mScene->mMeshes.begin(); - i != mScene->mMeshes.end(); ++i) { - for (std::vector::iterator - a = (*i).mFaceMaterials.begin(); - a != (*i).mFaceMaterials.end(); ++a) { + for (auto i = mScene->mMeshes.begin(); i != mScene->mMeshes.end(); ++i) { + for (auto a = i->mFaceMaterials.begin(); a != i->mFaceMaterials.end(); ++a) { // NOTE: The additional check seems to be necessary, // some exporters seem to generate invalid data here - if (0xcdcdcdcd == (*a)) { - (*a) = idx; + + if (NotSet == *a) { + *a = idx; ++cnt; } else if ((*a) >= mScene->mMaterials.size()) { - (*a) = idx; + *a = idx; ASSIMP_LOG_WARN("Material index overflow in 3DS file. Using default material"); ++cnt; } @@ -111,7 +112,7 @@ void Discreet3DSImporter::ReplaceDefaultMaterial() { } if (cnt && idx == mScene->mMaterials.size()) { // We need to create our own default material - D3DS::Material sMat("%%%DEFAULT"); + Material sMat("%%%DEFAULT"); sMat.mDiffuse = aiColor3D(0.3f, 0.3f, 0.3f); mScene->mMaterials.push_back(sMat); @@ -121,17 +122,17 @@ void Discreet3DSImporter::ReplaceDefaultMaterial() { // ------------------------------------------------------------------------------------------------ // Check whether all indices are valid. Otherwise we'd crash before the validation step is reached -void Discreet3DSImporter::CheckIndices(D3DS::Mesh &sMesh) { - for (std::vector::iterator i = sMesh.mFaces.begin(); i != sMesh.mFaces.end(); ++i) { +void Discreet3DSImporter::CheckIndices(Mesh &sMesh) { + for (auto i = sMesh.mFaces.begin(); i != sMesh.mFaces.end(); ++i) { // check whether all indices are in range for (unsigned int a = 0; a < 3; ++a) { if ((*i).mIndices[a] >= sMesh.mPositions.size()) { ASSIMP_LOG_WARN("3DS: Vertex index overflow)"); - (*i).mIndices[a] = (uint32_t)sMesh.mPositions.size() - 1; + (*i).mIndices[a] = static_cast(sMesh.mPositions.size() - 1); } if (!sMesh.mTexCoords.empty() && (*i).mIndices[a] >= sMesh.mTexCoords.size()) { ASSIMP_LOG_WARN("3DS: Texture coordinate index overflow)"); - (*i).mIndices[a] = (uint32_t)sMesh.mTexCoords.size() - 1; + (*i).mIndices[a] = static_cast(sMesh.mTexCoords.size() - 1); } } } @@ -139,7 +140,7 @@ void Discreet3DSImporter::CheckIndices(D3DS::Mesh &sMesh) { // ------------------------------------------------------------------------------------------------ // Generate out unique verbose format representation -void Discreet3DSImporter::MakeUnique(D3DS::Mesh &sMesh) { +void Discreet3DSImporter::MakeUnique(Mesh &sMesh) { // TODO: really necessary? I don't think. Just a waste of memory and time // to do it now in a separate buffer. @@ -150,7 +151,7 @@ void Discreet3DSImporter::MakeUnique(D3DS::Mesh &sMesh) { vNew2.resize(sMesh.mFaces.size() * 3); for (unsigned int i = 0, base = 0; i < sMesh.mFaces.size(); ++i) { - D3DS::Face &face = sMesh.mFaces[i]; + Face &face = sMesh.mFaces[i]; // Positions for (unsigned int a = 0; a < 3; ++a, ++base) { @@ -167,10 +168,9 @@ void Discreet3DSImporter::MakeUnique(D3DS::Mesh &sMesh) { // ------------------------------------------------------------------------------------------------ // Convert a 3DS texture to texture keys in an aiMaterial -void CopyTexture(aiMaterial &mat, D3DS::Texture &texture, aiTextureType type) { +void CopyTexture(aiMaterial &mat, Texture &texture, aiTextureType type) { // Setup the texture name - aiString tex; - tex.Set(texture.mMapName); + aiString tex(texture.mMapName); mat.AddProperty(&tex, AI_MATKEY_TEXTURE(type, 0)); // Setup the texture blend factor @@ -178,7 +178,7 @@ void CopyTexture(aiMaterial &mat, D3DS::Texture &texture, aiTextureType type) { mat.AddProperty(&texture.mTextureBlend, 1, AI_MATKEY_TEXBLEND(type, 0)); // Setup the texture mapping mode - int mapMode = static_cast(texture.mMapMode); + auto mapMode = static_cast(texture.mMapMode); mat.AddProperty(&mapMode, 1, AI_MATKEY_MAPPINGMODE_U(type, 0)); mat.AddProperty(&mapMode, 1, AI_MATKEY_MAPPINGMODE_V(type, 0)); @@ -197,13 +197,11 @@ void CopyTexture(aiMaterial &mat, D3DS::Texture &texture, aiTextureType type) { // ------------------------------------------------------------------------------------------------ // Convert a 3DS material to an aiMaterial -void Discreet3DSImporter::ConvertMaterial(D3DS::Material &oldMat, - aiMaterial &mat) { +void Discreet3DSImporter::ConvertMaterial(Material &oldMat, aiMaterial &mat) { // NOTE: Pass the background image to the viewer by bypassing the // material system. This is an evil hack, never do it again! - if (0 != mBackgroundImage.length() && bHasBG) { - aiString tex; - tex.Set(mBackgroundImage); + if (mBackgroundImage.empty() && bHasBG) { + aiString tex(mBackgroundImage); mat.AddProperty(&tex, AI_MATKEY_GLOBAL_BACKGROUND_IMAGE); // Be sure this is only done for the first material @@ -215,8 +213,7 @@ void Discreet3DSImporter::ConvertMaterial(D3DS::Material &oldMat, oldMat.mAmbient.g += mClrAmbient.g; oldMat.mAmbient.b += mClrAmbient.b; - aiString name; - name.Set(oldMat.mName); + aiString name(oldMat.mName); mat.AddProperty(&name, AI_MATKEY_NAME); // Material colors @@ -226,10 +223,9 @@ void Discreet3DSImporter::ConvertMaterial(D3DS::Material &oldMat, mat.AddProperty(&oldMat.mEmissive, 1, AI_MATKEY_COLOR_EMISSIVE); // Phong shininess and shininess strength - if (D3DS::Discreet3DS::Phong == oldMat.mShading || - D3DS::Discreet3DS::Metal == oldMat.mShading) { + if (Discreet3DS::Phong == oldMat.mShading || Discreet3DS::Metal == oldMat.mShading) { if (!oldMat.mSpecularExponent || !oldMat.mShininessStrength) { - oldMat.mShading = D3DS::Discreet3DS::Gouraud; + oldMat.mShading = Discreet3DS::Gouraud; } else { mat.AddProperty(&oldMat.mSpecularExponent, 1, AI_MATKEY_SHININESS); mat.AddProperty(&oldMat.mShininessStrength, 1, AI_MATKEY_SHININESS_STRENGTH); @@ -251,40 +247,41 @@ void Discreet3DSImporter::ConvertMaterial(D3DS::Material &oldMat, // Shading mode aiShadingMode eShading = aiShadingMode_NoShading; switch (oldMat.mShading) { - case D3DS::Discreet3DS::Flat: + case Discreet3DS::Flat: eShading = aiShadingMode_Flat; break; // I don't know what "Wire" shading should be, // assume it is simple lambertian diffuse shading - case D3DS::Discreet3DS::Wire: { + case Discreet3DS::Wire: { // Set the wireframe flag unsigned int iWire = 1; mat.AddProperty((int *)&iWire, 1, AI_MATKEY_ENABLE_WIREFRAME); } - [[fallthrough]]; + [[fallthrough]]; - case D3DS::Discreet3DS::Gouraud: + case Discreet3DS::Gouraud: eShading = aiShadingMode_Gouraud; break; // assume cook-torrance shading for metals. - case D3DS::Discreet3DS::Phong: + case Discreet3DS::Phong: eShading = aiShadingMode_Phong; break; - case D3DS::Discreet3DS::Metal: + case Discreet3DS::Metal: eShading = aiShadingMode_CookTorrance; break; // FIX to workaround a warning with GCC 4 who complained // about a missing case Blinn: here - Blinn isn't a valid // value in the 3DS Loader, it is just needed for ASE - case D3DS::Discreet3DS::Blinn: + case Discreet3DS::Blinn: eShading = aiShadingMode_Blinn; break; } - int eShading_ = static_cast(eShading); + + const int eShading_ = eShading; mat.AddProperty(&eShading_, 1, AI_MATKEY_SHADING_MODEL); // DIFFUSE texture @@ -333,10 +330,11 @@ void Discreet3DSImporter::ConvertMeshes(aiScene *pcOut) { aiString name; // we need to split all meshes by their materials - for (std::vector::iterator i = mScene->mMeshes.begin(); i != mScene->mMeshes.end(); ++i) { + for (auto i = mScene->mMeshes.begin(); i != mScene->mMeshes.end(); ++i) { std::unique_ptr[]> aiSplit(new std::vector[mScene->mMaterials.size()]); - name.length = ASSIMP_itoa10(name.data, num++); + name.length = ASSIMP_itoa10(name.data, num); + ++num; unsigned int iNum = 0; for (std::vector::const_iterator a = (*i).mFaceMaterials.begin(); @@ -348,7 +346,7 @@ void Discreet3DSImporter::ConvertMeshes(aiScene *pcOut) { if (aiSplit[p].empty()) { continue; } - aiMesh *meshOut = new aiMesh(); + auto *meshOut = new aiMesh(); meshOut->mName = name; meshOut->mPrimitiveTypes = aiPrimitiveType_TRIANGLE; @@ -360,7 +358,7 @@ void Discreet3DSImporter::ConvertMeshes(aiScene *pcOut) { avOutMeshes.push_back(meshOut); // convert vertices - meshOut->mNumFaces = (unsigned int)aiSplit[p].size(); + meshOut->mNumFaces = static_cast(aiSplit[p].size()); meshOut->mNumVertices = meshOut->mNumFaces * 3; // allocate enough storage for faces @@ -408,8 +406,7 @@ void Discreet3DSImporter::ConvertMeshes(aiScene *pcOut) { // ------------------------------------------------------------------------------------------------ // Add a node to the scenegraph and setup its final transformation -void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, - D3DS::Node *pcIn, aiMatrix4x4 & /*absTrafo*/) { +void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, D3DS::Node *pcIn, aiMatrix4x4 & /*absTrafo*/) { std::vector iArray; iArray.reserve(3); @@ -417,7 +414,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, // Find all meshes with the same name as the node for (unsigned int a = 0; a < pcSOut->mNumMeshes; ++a) { - const D3DS::Mesh *pcMesh = (const D3DS::Mesh *)pcSOut->mMeshes[a]->mColors[0]; + const auto *pcMesh = (const D3DS::Mesh *)pcSOut->mMeshes[a]->mColors[0]; ai_assert(nullptr != pcMesh); if (pcIn->mName == pcMesh->mName) @@ -426,7 +423,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, if (!iArray.empty()) { // The matrix should be identical for all meshes with the // same name. It HAS to be identical for all meshes ..... - D3DS::Mesh *imesh = ((D3DS::Mesh *)pcSOut->mMeshes[iArray[0]]->mColors[0]); + auto *imesh = ((D3DS::Mesh *)pcSOut->mMeshes[iArray[0]]->mColors[0]); // Compute the inverse of the transformation matrix to move the // vertices back to their relative and local space @@ -435,7 +432,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, mInvTransposed.Transpose(); aiVector3D pivot = pcIn->vPivot; - pcOut->mNumMeshes = (unsigned int)iArray.size(); + pcOut->mNumMeshes = static_cast(iArray.size()); pcOut->mMeshes = new unsigned int[iArray.size()]; for (unsigned int i = 0; i < iArray.size(); ++i) { const unsigned int iIndex = iArray[i]; @@ -454,7 +451,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, // Handle negative transformation matrix determinant -> invert vertex x if (imesh->mMat.Determinant() < 0.0f) { - /* we *must* have normals */ + // we *must* have normals for (pvCurrent = mesh->mVertices, t2 = mesh->mNormals; pvCurrent != pvEnd; ++pvCurrent, ++t2) { pvCurrent->x *= -1.f; t2->x *= -1.f; @@ -481,7 +478,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, // Setup the name of the node // First instance keeps its name otherwise something might break, all others will be postfixed with their instance number if (pcIn->mInstanceNumber > 1) { - char tmp[12]; + char tmp[12] = {'\0'}; ASSIMP_itoa10(tmp, pcIn->mInstanceNumber); std::string tempStr = pcIn->mName + "_inst_"; tempStr += tmp; @@ -494,7 +491,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, if (pcIn->aRotationKeys.size()) { // FIX to get to Assimp's quaternion conventions - for (std::vector::iterator it = pcIn->aRotationKeys.begin(); it != pcIn->aRotationKeys.end(); ++it) { + for (auto it = pcIn->aRotationKeys.begin(); it != pcIn->aRotationKeys.end(); ++it) { (*it).mValue.w *= -1.f; } @@ -593,7 +590,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, // Cameras or lights define their transformation in their parent node and in the // corresponding light or camera chunks. However, we read and process the latter - // to to be able to return valid cameras/lights even if no scenegraph is given. + // to be able to return valid cameras/lights even if no scenegraph is given. for (unsigned int n = 0; n < pcSOut->mNumCameras; ++n) { if (pcSOut->mCameras[n]->mName == pcOut->mName) { pcSOut->mCameras[n]->mLookAt = aiVector3D(0.f, 0.f, 1.f); @@ -606,11 +603,11 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, } // Allocate a new node anim and setup its name - aiNodeAnim *nda = anim->mChannels[anim->mNumChannels++] = new aiNodeAnim(); + auto *nda = anim->mChannels[anim->mNumChannels++] = new aiNodeAnim(); nda->mNodeName.Set(pcIn->mName); // POSITION keys - if (pcIn->aPositionKeys.size() > 0) { + if (!pcIn->aPositionKeys.empty()) { nda->mNumPositionKeys = (unsigned int)pcIn->aPositionKeys.size(); nda->mPositionKeys = new aiVectorKey[nda->mNumPositionKeys]; ::memcpy(nda->mPositionKeys, &pcIn->aPositionKeys[0], @@ -618,7 +615,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, } // ROTATION keys - if (pcIn->aRotationKeys.size() > 0) { + if (!pcIn->aRotationKeys.empty()) { nda->mNumRotationKeys = (unsigned int)pcIn->aRotationKeys.size(); nda->mRotationKeys = new aiQuatKey[nda->mNumRotationKeys]; @@ -634,7 +631,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, } // SCALING keys - if (pcIn->aScalingKeys.size() > 0) { + if (!pcIn->aScalingKeys.empty()) { nda->mNumScalingKeys = (unsigned int)pcIn->aScalingKeys.size(); nda->mScalingKeys = new aiVectorKey[nda->mNumScalingKeys]; ::memcpy(nda->mScalingKeys, &pcIn->aScalingKeys[0], @@ -643,11 +640,17 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene *pcSOut, aiNode *pcOut, } // Allocate storage for children - pcOut->mNumChildren = (unsigned int)pcIn->mChildren.size(); + const auto size = static_cast(pcIn->mChildren.size()); + + pcOut->mNumChildren = size; + if (size == 0) { + return; + } + pcOut->mChildren = new aiNode *[pcIn->mChildren.size()]; // Recursively process all children - const unsigned int size = static_cast(pcIn->mChildren.size()); + for (unsigned int i = 0; i < size; ++i) { pcOut->mChildren[i] = new aiNode(); pcOut->mChildren[i]->mParent = pcOut; @@ -680,7 +683,7 @@ void CountTracks(D3DS::Node *node, unsigned int &cnt) { // Generate the output node graph void Discreet3DSImporter::GenerateNodeGraph(aiScene *pcOut) { pcOut->mRootNode = new aiNode(); - if (0 == mRootNode->mChildren.size()) { + if (mRootNode->mChildren.empty()) { ////////////////////////////////////////////////////////////////////////////// // It seems the file is so messed up that it has not even a hierarchy. // generate a flat hiearachy which looks like this: @@ -702,19 +705,20 @@ void Discreet3DSImporter::GenerateNodeGraph(aiScene *pcOut) { // Build dummy nodes for all meshes unsigned int a = 0; for (unsigned int i = 0; i < pcOut->mNumMeshes; ++i, ++a) { - aiNode *pcNode = pcOut->mRootNode->mChildren[a] = new aiNode(); + pcOut->mRootNode->mChildren[a] = new aiNode(); + auto *pcNode = pcOut->mRootNode->mChildren[a]; pcNode->mParent = pcOut->mRootNode; pcNode->mMeshes = new unsigned int[1]; pcNode->mMeshes[0] = i; pcNode->mNumMeshes = 1; // Build a name for the node - pcNode->mName.length = ai_snprintf(pcNode->mName.data, MAXLEN, "3DSMesh_%u", i); + pcNode->mName.length = ai_snprintf(pcNode->mName.data, AI_MAXLEN, "3DSMesh_%u", i); } // Build dummy nodes for all cameras for (unsigned int i = 0; i < (unsigned int)mScene->mCameras.size(); ++i, ++a) { - aiNode *pcNode = pcOut->mRootNode->mChildren[a] = new aiNode(); + auto *pcNode = pcOut->mRootNode->mChildren[a] = new aiNode(); pcNode->mParent = pcOut->mRootNode; // Build a name for the node @@ -723,7 +727,7 @@ void Discreet3DSImporter::GenerateNodeGraph(aiScene *pcOut) { // Build dummy nodes for all lights for (unsigned int i = 0; i < (unsigned int)mScene->mLights.size(); ++i, ++a) { - aiNode *pcNode = pcOut->mRootNode->mChildren[a] = new aiNode(); + auto *pcNode = pcOut->mRootNode->mChildren[a] = new aiNode(); pcNode->mParent = pcOut->mRootNode; // Build a name for the node @@ -739,7 +743,7 @@ void Discreet3DSImporter::GenerateNodeGraph(aiScene *pcOut) { // Allocate a primary animation channel pcOut->mNumAnimations = 1; pcOut->mAnimations = new aiAnimation *[1]; - aiAnimation *anim = pcOut->mAnimations[0] = new aiAnimation(); + auto *anim = pcOut->mAnimations[0] = new aiAnimation(); anim->mName.Set("3DSMasterAnim"); @@ -777,12 +781,12 @@ void Discreet3DSImporter::GenerateNodeGraph(aiScene *pcOut) { // Convert all meshes in the scene and generate the final output scene. void Discreet3DSImporter::ConvertScene(aiScene *pcOut) { // Allocate enough storage for all output materials - pcOut->mNumMaterials = (unsigned int)mScene->mMaterials.size(); + pcOut->mNumMaterials = static_cast(mScene->mMaterials.size()); pcOut->mMaterials = new aiMaterial *[pcOut->mNumMaterials]; // ... and convert the 3DS materials to aiMaterial's for (unsigned int i = 0; i < pcOut->mNumMaterials; ++i) { - aiMaterial *pcNew = new aiMaterial(); + auto *pcNew = new aiMaterial(); ConvertMaterial(mScene->mMaterials[i], *pcNew); pcOut->mMaterials[i] = pcNew; } @@ -791,18 +795,20 @@ void Discreet3DSImporter::ConvertScene(aiScene *pcOut) { ConvertMeshes(pcOut); // Now copy all light sources to the output scene - pcOut->mNumLights = (unsigned int)mScene->mLights.size(); + pcOut->mNumLights = static_cast(mScene->mLights.size()); if (pcOut->mNumLights) { pcOut->mLights = new aiLight *[pcOut->mNumLights]; - ::memcpy(pcOut->mLights, &mScene->mLights[0], sizeof(void *) * pcOut->mNumLights); + memcpy(pcOut->mLights, &mScene->mLights[0], sizeof(void *) * pcOut->mNumLights); } // Now copy all cameras to the output scene - pcOut->mNumCameras = (unsigned int)mScene->mCameras.size(); + pcOut->mNumCameras = static_cast(mScene->mCameras.size()); if (pcOut->mNumCameras) { pcOut->mCameras = new aiCamera *[pcOut->mNumCameras]; - ::memcpy(pcOut->mCameras, &mScene->mCameras[0], sizeof(void *) * pcOut->mNumCameras); + memcpy(pcOut->mCameras, &mScene->mCameras[0], sizeof(void *) * pcOut->mNumCameras); } } +} // namespace Assimp + #endif // !! ASSIMP_BUILD_NO_3DS_IMPORTER diff --git a/code/AssetLib/3DS/3DSExporter.cpp b/code/AssetLib/3DS/3DSExporter.cpp index 1b335a272c..5fee9b9527 100644 --- a/code/AssetLib/3DS/3DSExporter.cpp +++ b/code/AssetLib/3DS/3DSExporter.cpp @@ -2,8 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team - +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -52,6 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include #include @@ -76,33 +76,33 @@ class ChunkWriter { public: ChunkWriter(StreamWriterLE &writer, uint16_t chunk_type) : - writer(writer) { - chunk_start_pos = writer.GetCurrentPos(); + mWriter(writer) { + mChunkStartPos = writer.GetCurrentPos(); writer.PutU2(chunk_type); writer.PutU4((uint32_t)CHUNK_SIZE_NOT_SET); } ~ChunkWriter() { - std::size_t head_pos = writer.GetCurrentPos(); + std::size_t head_pos = mWriter.GetCurrentPos(); - ai_assert(head_pos > chunk_start_pos); - const std::size_t chunk_size = head_pos - chunk_start_pos; + ai_assert(head_pos > mChunkStartPos); + const std::size_t chunk_size = head_pos - mChunkStartPos; - writer.SetCurrentPos(chunk_start_pos + SIZE_OFFSET); - writer.PutU4(static_cast(chunk_size)); - writer.SetCurrentPos(head_pos); + mWriter.SetCurrentPos(mChunkStartPos + SIZE_OFFSET); + mWriter.PutU4(static_cast(chunk_size)); + mWriter.SetCurrentPos(head_pos); } private: - StreamWriterLE &writer; - std::size_t chunk_start_pos; + StreamWriterLE &mWriter; + std::size_t mChunkStartPos; }; // Return an unique name for a given |mesh| attached to |node| that // preserves the mesh's given name if it has one. |index| is the index // of the mesh in |aiScene::mMeshes|. std::string GetMeshName(const aiMesh &mesh, unsigned int index, const aiNode &node) { - static const char underscore = '_'; + static constexpr char underscore = '_'; char postfix[10] = { 0 }; ASSIMP_itoa10(postfix, index); @@ -122,8 +122,7 @@ std::string GetMaterialName(const aiMaterial &mat, unsigned int index) { char postfix[10] = { 0 }; ASSIMP_itoa10(postfix, index); - aiString mat_name; - if (AI_SUCCESS == mat.Get(AI_MATKEY_NAME, mat_name)) { + if (aiString mat_name; AI_SUCCESS == mat.Get(AI_MATKEY_NAME, mat_name)) { return mat_name.C_Str() + underscore + postfix; } @@ -208,9 +207,6 @@ Discreet3DSExporter::Discreet3DSExporter(std::shared_ptr &outfile, con } } -// ------------------------------------------------------------------------------------------------ -Discreet3DSExporter::~Discreet3DSExporter() = default; - // ------------------------------------------------------------------------------------------------ int Discreet3DSExporter::WriteHierarchy(const aiNode &node, int seq, int sibling_level) { // 3DS scene hierarchy is serialized as in http://www.martinreddy.net/gfx/3d/3DS.spec @@ -306,8 +302,7 @@ void Discreet3DSExporter::WriteMaterials() { WriteColor(color); } - aiShadingMode shading_mode = aiShadingMode_Flat; - if (mat.Get(AI_MATKEY_SHADING_MODEL, shading_mode) == AI_SUCCESS) { + if (aiShadingMode shading_mode = aiShadingMode_Flat; mat.Get(AI_MATKEY_SHADING_MODEL, shading_mode) == AI_SUCCESS) { ChunkWriter chunk(writer, Discreet3DS::CHUNK_MAT_SHADING); Discreet3DS::shadetype3ds shading_mode_out; @@ -335,7 +330,7 @@ void Discreet3DSExporter::WriteMaterials() { default: shading_mode_out = Discreet3DS::Flat; ai_assert(false); - }; + } writer.PutU2(static_cast(shading_mode_out)); } @@ -349,8 +344,7 @@ void Discreet3DSExporter::WriteMaterials() { WritePercentChunk(f); } - int twosided; - if (mat.Get(AI_MATKEY_TWOSIDED, twosided) == AI_SUCCESS && twosided != 0) { + if (int twosided; mat.Get(AI_MATKEY_TWOSIDED, twosided) == AI_SUCCESS && twosided != 0) { ChunkWriter chunk(writer, Discreet3DS::CHUNK_MAT_TWO_SIDE); writer.PutI2(1); } @@ -544,7 +538,7 @@ void Discreet3DSExporter::WriteFaceMaterialChunk(const aiMesh &mesh) { // ------------------------------------------------------------------------------------------------ void Discreet3DSExporter::WriteString(const std::string &s) { - for (std::string::const_iterator it = s.begin(); it != s.end(); ++it) { + for (auto it = s.begin(); it != s.end(); ++it) { writer.PutI1(*it); } writer.PutI1('\0'); diff --git a/code/AssetLib/3DS/3DSExporter.h b/code/AssetLib/3DS/3DSExporter.h index 82ec3512f9..5546bd9283 100644 --- a/code/AssetLib/3DS/3DSExporter.h +++ b/code/AssetLib/3DS/3DSExporter.h @@ -2,8 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team - +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -57,18 +56,17 @@ struct aiNode; struct aiMaterial; struct aiMesh; -namespace Assimp -{ +namespace Assimp { // ------------------------------------------------------------------------------------------------ /** * @brief Helper class to export a given scene to a 3DS file. */ // ------------------------------------------------------------------------------------------------ -class Discreet3DSExporter { +class Discreet3DSExporter final { public: Discreet3DSExporter(std::shared_ptr &outfile, const aiScene* pScene); - ~Discreet3DSExporter(); + ~Discreet3DSExporter() = default; private: void WriteMeshes(); @@ -88,9 +86,8 @@ class Discreet3DSExporter { std::map trafos; - typedef std::multimap MeshesByNodeMap; + using MeshesByNodeMap = std::multimap; MeshesByNodeMap meshes; - }; } // Namespace Assimp diff --git a/code/AssetLib/3DS/3DSHelper.h b/code/AssetLib/3DS/3DSHelper.h index 2279d105c3..ebc6a81597 100644 --- a/code/AssetLib/3DS/3DSHelper.h +++ b/code/AssetLib/3DS/3DSHelper.h @@ -2,8 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team - +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -55,8 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include //sprintf -namespace Assimp { -namespace D3DS { +namespace Assimp::D3DS { #include @@ -365,14 +363,13 @@ struct Texture { #ifdef _MSC_VER #pragma warning(pop) #endif // _MSC_VER - // --------------------------------------------------------------------------- /** Helper structure representing a 3ds material */ struct Material { //! Default constructor has been deleted Material() : mName(), - mDiffuse(ai_real(0.6), ai_real(0.6), ai_real(0.6)), + mDiffuse(0.6f, 0.6f, 0.6f), mSpecularExponent(ai_real(0.0)), mShininessStrength(ai_real(1.0)), mShading(Discreet3DS::Gouraud), @@ -385,7 +382,7 @@ struct Material { //! Constructor with explicit name explicit Material(const std::string &name) : mName(name), - mDiffuse(ai_real(0.6), ai_real(0.6), ai_real(0.6)), + mDiffuse(0.6f, 0.6f, 0.6f), mSpecularExponent(ai_real(0.0)), mShininessStrength(ai_real(1.0)), mShading(Discreet3DS::Gouraud), @@ -581,7 +578,6 @@ struct Scene { // Node* pcRootNode; }; -} // end of namespace D3DS -} // end of namespace Assimp +} // end of namespace Assimp::D3DS #endif // AI_XFILEHELPER_H_INC diff --git a/code/AssetLib/3DS/3DSLoader.cpp b/code/AssetLib/3DS/3DSLoader.cpp index aa29956df0..6910f48128 100644 --- a/code/AssetLib/3DS/3DSLoader.cpp +++ b/code/AssetLib/3DS/3DSLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -54,9 +54,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -using namespace Assimp; +namespace Assimp { -static const aiImporterDesc desc = { +using namespace D3DS; + +static constexpr aiImporterDesc desc = { "Discreet 3DS Importer", "", "", @@ -75,7 +77,7 @@ static const aiImporterDesc desc = { // - computes its length #define ASSIMP_3DS_BEGIN_CHUNK() \ while (true) { \ - if (stream->GetRemainingSizeToLimit() < sizeof(Discreet3DS::Chunk)) { \ + if (mStream->GetRemainingSizeToLimit() < sizeof(Discreet3DS::Chunk)) { \ return; \ } \ Discreet3DS::Chunk chunk; \ @@ -83,34 +85,30 @@ static const aiImporterDesc desc = { int chunkSize = chunk.Size - sizeof(Discreet3DS::Chunk); \ if (chunkSize <= 0) \ continue; \ - const unsigned int oldReadLimit = stream->SetReadLimit( \ - stream->GetCurrentPos() + chunkSize); + const unsigned int oldReadLimit = mStream->SetReadLimit( \ + mStream->GetCurrentPos() + chunkSize); // ------------------------------------------------------------------------------------------------ // End a parsing block // Must follow at the end of each parsing block, reset chunk end marker to previous value #define ASSIMP_3DS_END_CHUNK() \ - stream->SkipToReadLimit(); \ - stream->SetReadLimit(oldReadLimit); \ - if (stream->GetRemainingSizeToLimit() == 0) \ + mStream->SkipToReadLimit(); \ + mStream->SetReadLimit(oldReadLimit); \ + if (mStream->GetRemainingSizeToLimit() == 0) \ return; \ } // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer Discreet3DSImporter::Discreet3DSImporter() : - stream(), mLastNodeIndex(), mCurrentNode(), mRootNode(), mScene(), mMasterScale(), bHasBG(), bIsPrj() { + mStream(nullptr), mLastNodeIndex(), mCurrentNode(), mRootNode(), mScene(), mMasterScale(), bHasBG(), bIsPrj() { // empty } -// ------------------------------------------------------------------------------------------------ -// Destructor, private as well -Discreet3DSImporter::~Discreet3DSImporter() = default; - // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. bool Discreet3DSImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool /*checkSig*/) const { - static const uint16_t token[] = { 0x4d4d, 0x3dc2 /*, 0x3daa */ }; + static constexpr uint16_t token[] = { 0x4d4d, 0x3dc2 /*, 0x3daa */ }; return CheckMagicToken(pIOHandler, pFile, token, AI_COUNT_OF(token), 0, sizeof token[0]); } @@ -128,9 +126,7 @@ void Discreet3DSImporter::SetupProperties(const Importer * /*pImp*/) { // ------------------------------------------------------------------------------------------------ // Imports the given file into the given scene structure. -void Discreet3DSImporter::InternReadFile(const std::string &pFile, - aiScene *pScene, IOSystem *pIOHandler) { - +void Discreet3DSImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) { auto theFile = pIOHandler->Open(pFile, "rb"); if (!theFile) { throw DeadlyImportError("3DS: Could not open ", pFile); @@ -142,14 +138,14 @@ void Discreet3DSImporter::InternReadFile(const std::string &pFile, if (theStream.GetRemainingSize() < 16) { throw DeadlyImportError("3DS file is either empty or corrupt: ", pFile); } - this->stream = &theStream; + mStream = &theStream; // Allocate our temporary 3DS representation - D3DS::Scene _scene; + Scene _scene; mScene = &_scene; // Initialize members - D3DS::Node _rootNode("UNNAMED"); + Node _rootNode("UNNAMED"); mLastNodeIndex = -1; mCurrentNode = &_rootNode; mRootNode = mCurrentNode; @@ -170,12 +166,12 @@ void Discreet3DSImporter::InternReadFile(const std::string &pFile, // vectors from the smoothing groups we read from the // file. for (auto &mesh : mScene->mMeshes) { - if (mesh.mFaces.size() > 0 && mesh.mPositions.size() == 0) { + if (!mesh.mFaces.empty() && mesh.mPositions.empty()) { throw DeadlyImportError("3DS file contains faces but no vertices: ", pFile); } CheckIndices(mesh); MakeUnique(mesh); - ComputeNormalsWithSmoothingsGroups(mesh); + ComputeNormalsWithSmoothingsGroups(mesh); } // Replace all occurrences of the default material with a @@ -200,12 +196,12 @@ void Discreet3DSImporter::InternReadFile(const std::string &pFile, AI_DEBUG_INVALIDATE_PTR(mRootNode); AI_DEBUG_INVALIDATE_PTR(mScene); - AI_DEBUG_INVALIDATE_PTR(this->stream); + AI_DEBUG_INVALIDATE_PTR(mStream); } // ------------------------------------------------------------------------------------------------ // Applies a master-scaling factor to the imported scene -void Discreet3DSImporter::ApplyMasterScale(aiScene *pScene) { +void Discreet3DSImporter::ApplyMasterScale(const aiScene *pScene) { // There are some 3DS files with a zero scaling factor if (!mMasterScale) mMasterScale = 1.0f; @@ -227,14 +223,14 @@ void Discreet3DSImporter::ApplyMasterScale(aiScene *pScene) { void Discreet3DSImporter::ReadChunk(Discreet3DS::Chunk *pcOut) { ai_assert(pcOut != nullptr); - pcOut->Flag = stream->GetI2(); - pcOut->Size = stream->GetI4(); + pcOut->Flag = mStream->GetI2(); + pcOut->Size = mStream->GetI4(); - if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSize()) { + if (pcOut->Size - sizeof(Discreet3DS::Chunk) > mStream->GetRemainingSize()) { throw DeadlyImportError("Chunk is too large"); } - if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSizeToLimit()) { + if (pcOut->Size - sizeof(Discreet3DS::Chunk) > mStream->GetRemainingSizeToLimit()) { ASSIMP_LOG_ERROR("3DS: Chunk overflow"); } } @@ -245,8 +241,7 @@ void Discreet3DSImporter::SkipChunk() { Discreet3DS::Chunk psChunk; ReadChunk(&psChunk); - stream->IncPtr(psChunk.Size - sizeof(Discreet3DS::Chunk)); - return; + mStream->IncPtr(psChunk.Size - sizeof(Discreet3DS::Chunk)); } // ------------------------------------------------------------------------------------------------ @@ -263,7 +258,7 @@ void Discreet3DSImporter::ParseMainChunk() { case Discreet3DS::CHUNK_MAIN: ParseEditorChunk(); break; - }; + } ASSIMP_3DS_END_CHUNK(); #if defined(__clang__) @@ -279,30 +274,29 @@ void Discreet3DSImporter::ParseMainChunk() { // ------------------------------------------------------------------------------------------------ void Discreet3DSImporter::ParseEditorChunk() { - ASSIMP_3DS_BEGIN_CHUNK(); + ASSIMP_3DS_BEGIN_CHUNK() // get chunk type switch (chunk.Flag) { - case Discreet3DS::CHUNK_OBJMESH: - - ParseObjectChunk(); - break; - - // NOTE: In several documentations in the internet this - // chunk appears at different locations - case Discreet3DS::CHUNK_KEYFRAMER: + case Discreet3DS::CHUNK_OBJMESH: + ParseObjectChunk(); + break; - ParseKeyframeChunk(); + // NOTE: In several documentations in the internet this + // chunk appears at different locations + case Discreet3DS::CHUNK_KEYFRAMER: + ParseKeyframeChunk(); + break; + + case Discreet3DS::CHUNK_VERSION: { + // print the version number + char buff[10]; + ASSIMP_itoa10(buff, mStream->GetI2()); + ASSIMP_LOG_INFO("3DS file format version: ", buff); + } break; - - case Discreet3DS::CHUNK_VERSION: { - // print the version number - char buff[10]; - ASSIMP_itoa10(buff, stream->GetI2()); - ASSIMP_LOG_INFO("3DS file format version: ", buff); - } break; }; - ASSIMP_3DS_END_CHUNK(); + ASSIMP_3DS_END_CHUNK() } // ------------------------------------------------------------------------------------------------ @@ -313,10 +307,10 @@ void Discreet3DSImporter::ParseObjectChunk() { switch (chunk.Flag) { case Discreet3DS::CHUNK_OBJBLOCK: { unsigned int cnt = 0; - const char *sz = (const char *)stream->GetPtr(); + const auto *sz = (const char *)mStream->GetPtr(); // Get the name of the geometry object - while (stream->GetI1()) + while (mStream->GetI1()) ++cnt; ParseChunk(sz, cnt); } break; @@ -344,8 +338,8 @@ void Discreet3DSImporter::ParseObjectChunk() { // Specifies the background image. The string should already be // properly 0 terminated but we need to be sure unsigned int cnt = 0; - const char *sz = (const char *)stream->GetPtr(); - while (stream->GetI1()) + auto *sz = (const char *)mStream->GetPtr(); + while (mStream->GetI1()) ++cnt; mBackgroundImage = std::string(sz, cnt); } break; @@ -356,7 +350,7 @@ void Discreet3DSImporter::ParseObjectChunk() { case Discreet3DS::CHUNK_MASTER_SCALE: // Scene master scaling factor - mMasterScale = stream->GetF4(); + mMasterScale = mStream->GetF4(); break; }; ASSIMP_3DS_END_CHUNK(); @@ -369,7 +363,7 @@ void Discreet3DSImporter::ParseChunk(const char *name, unsigned int num) { // IMPLEMENTATION NOTE; // Cameras or lights define their transformation in their parent node and in the // corresponding light or camera chunks. However, we read and process the latter - // to to be able to return valid cameras/lights even if no scenegraph is given. + // to be able to return valid cameras/lights even if no scenegraph is given. // get chunk type switch (chunk.Flag) { @@ -383,15 +377,15 @@ void Discreet3DSImporter::ParseChunk(const char *name, unsigned int num) { case Discreet3DS::CHUNK_LIGHT: { // This starts a new light - aiLight *light = new aiLight(); + auto *light = new aiLight(); mScene->mLights.push_back(light); light->mName.Set(std::string(name, num)); // First read the position of the light - light->mPosition.x = stream->GetF4(); - light->mPosition.y = stream->GetF4(); - light->mPosition.z = stream->GetF4(); + light->mPosition.x = mStream->GetF4(); + light->mPosition.y = mStream->GetF4(); + light->mPosition.z = mStream->GetF4(); light->mColorDiffuse = aiColor3D(1.f, 1.f, 1.f); @@ -412,19 +406,19 @@ void Discreet3DSImporter::ParseChunk(const char *name, unsigned int num) { case Discreet3DS::CHUNK_CAMERA: { // This starts a new camera - aiCamera *camera = new aiCamera(); + auto *camera = new aiCamera(); mScene->mCameras.push_back(camera); camera->mName.Set(std::string(name, num)); // First read the position of the camera - camera->mPosition.x = stream->GetF4(); - camera->mPosition.y = stream->GetF4(); - camera->mPosition.z = stream->GetF4(); + camera->mPosition.x = mStream->GetF4(); + camera->mPosition.y = mStream->GetF4(); + camera->mPosition.z = mStream->GetF4(); // Then the camera target - camera->mLookAt.x = stream->GetF4() - camera->mPosition.x; - camera->mLookAt.y = stream->GetF4() - camera->mPosition.y; - camera->mLookAt.z = stream->GetF4() - camera->mPosition.z; + camera->mLookAt.x = mStream->GetF4() - camera->mPosition.x; + camera->mLookAt.y = mStream->GetF4() - camera->mPosition.y; + camera->mLookAt.z = mStream->GetF4() - camera->mPosition.z; ai_real len = camera->mLookAt.Length(); if (len < 1e-5) { @@ -436,12 +430,12 @@ void Discreet3DSImporter::ParseChunk(const char *name, unsigned int num) { camera->mLookAt /= len; // And finally - the camera rotation angle, in counter clockwise direction - const ai_real angle = AI_DEG_TO_RAD(stream->GetF4()); + const ai_real angle = AI_DEG_TO_RAD(mStream->GetF4()); aiQuaternion quat(camera->mLookAt, angle); camera->mUp = quat.GetMatrix() * aiVector3D(0.0, 1.0, 0.0); // Read the lense angle - camera->mHorizontalFOV = AI_DEG_TO_RAD(stream->GetF4()); + camera->mHorizontalFOV = AI_DEG_TO_RAD(mStream->GetF4()); if (camera->mHorizontalFOV < 0.001f) { camera->mHorizontalFOV = float(AI_DEG_TO_RAD(45.f)); } @@ -467,34 +461,34 @@ void Discreet3DSImporter::ParseLightChunk() { light->mType = aiLightSource_SPOT; // We wouldn't need to normalize here, but we do it - light->mDirection.x = stream->GetF4() - light->mPosition.x; - light->mDirection.y = stream->GetF4() - light->mPosition.y; - light->mDirection.z = stream->GetF4() - light->mPosition.z; + light->mDirection.x = mStream->GetF4() - light->mPosition.x; + light->mDirection.y = mStream->GetF4() - light->mPosition.y; + light->mDirection.z = mStream->GetF4() - light->mPosition.z; light->mDirection.Normalize(); // Now the hotspot and falloff angles - in degrees - light->mAngleInnerCone = AI_DEG_TO_RAD(stream->GetF4()); + light->mAngleInnerCone = AI_DEG_TO_RAD(mStream->GetF4()); // FIX: the falloff angle is just an offset - light->mAngleOuterCone = light->mAngleInnerCone + AI_DEG_TO_RAD(stream->GetF4()); + light->mAngleOuterCone = light->mAngleInnerCone + AI_DEG_TO_RAD(mStream->GetF4()); break; // intensity multiplier case Discreet3DS::CHUNK_DL_MULTIPLIER: - light->mColorDiffuse = light->mColorDiffuse * stream->GetF4(); + light->mColorDiffuse = light->mColorDiffuse * mStream->GetF4(); break; // light color case Discreet3DS::CHUNK_RGBF: case Discreet3DS::CHUNK_LINRGBF: - light->mColorDiffuse.r *= stream->GetF4(); - light->mColorDiffuse.g *= stream->GetF4(); - light->mColorDiffuse.b *= stream->GetF4(); + light->mColorDiffuse.r *= mStream->GetF4(); + light->mColorDiffuse.g *= mStream->GetF4(); + light->mColorDiffuse.b *= mStream->GetF4(); break; // light attenuation case Discreet3DS::CHUNK_DL_ATTENUATE: - light->mAttenuationLinear = stream->GetF4(); + light->mAttenuationLinear = mStream->GetF4(); break; }; @@ -509,10 +503,10 @@ void Discreet3DSImporter::ParseCameraChunk() { // get chunk type switch (chunk.Flag) { // near and far clip plane - case Discreet3DS::CHUNK_CAM_RANGES: - camera->mClipPlaneNear = stream->GetF4(); - camera->mClipPlaneFar = stream->GetF4(); - break; + case Discreet3DS::CHUNK_CAM_RANGES: + camera->mClipPlaneNear = mStream->GetF4(); + camera->mClipPlaneFar = mStream->GetF4(); + break; } ASSIMP_3DS_END_CHUNK(); @@ -559,14 +553,13 @@ void Discreet3DSImporter::InverseNodeSearch(D3DS::Node *pcNode, D3DS::Node *pcCu // ------------------------------------------------------------------------------------------------ // Find a node with a specific name in the import hierarchy -D3DS::Node *FindNode(D3DS::Node *root, const std::string &name) { +Node *FindNode(Node *root, const std::string &name) { if (root->mName == name) { return root; } - for (std::vector::iterator it = root->mChildren.begin(); it != root->mChildren.end(); ++it) { - D3DS::Node *nd = FindNode(*it, name); - if (nullptr != nd) { + for (auto it = root->mChildren.begin(); it != root->mChildren.end(); ++it) { + if (auto *nd = FindNode(*it, name); nullptr != nd) { return nd; } } @@ -584,7 +577,7 @@ bool KeyUniqueCompare(const T &first, const T &second) { // ------------------------------------------------------------------------------------------------ // Skip some additional import data. void Discreet3DSImporter::SkipTCBInfo() { - unsigned int flags = stream->GetI2(); + unsigned int flags = mStream->GetI2(); if (!flags) { // Currently we can't do anything with these values. They occur @@ -595,19 +588,19 @@ void Discreet3DSImporter::SkipTCBInfo() { } if (flags & Discreet3DS::KEY_USE_TENS) { - stream->IncPtr(4); + mStream->IncPtr(4); } if (flags & Discreet3DS::KEY_USE_BIAS) { - stream->IncPtr(4); + mStream->IncPtr(4); } if (flags & Discreet3DS::KEY_USE_CONT) { - stream->IncPtr(4); + mStream->IncPtr(4); } if (flags & Discreet3DS::KEY_USE_EASE_FROM) { - stream->IncPtr(4); + mStream->IncPtr(4); } if (flags & Discreet3DS::KEY_USE_EASE_TO) { - stream->IncPtr(4); + mStream->IncPtr(4); } } @@ -626,15 +619,15 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent) { // First of all: get the name of the object unsigned int cnt = 0; - const char *sz = (const char *)stream->GetPtr(); + auto *sz = (const char *)mStream->GetPtr(); - while (stream->GetI1()) + while (mStream->GetI1()) ++cnt; std::string name = std::string(sz, cnt); // Now find out whether we have this node already (target animation channels // are stored with a separate object ID) - D3DS::Node *pcNode = FindNode(mRootNode, name); + Node *pcNode = FindNode(mRootNode, name); int instanceNumber = 1; if (pcNode) { @@ -650,10 +643,10 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent) { pcNode->mInstanceNumber = instanceNumber; // There are two unknown values which we can safely ignore - stream->IncPtr(4); + mStream->IncPtr(4); // Now read the hierarchy position of the object - uint16_t hierarchy = stream->GetI2() + 1; + uint16_t hierarchy = mStream->GetI2() + 1; pcNode->mHierarchyPos = hierarchy; pcNode->mHierarchyIndex = mLastNodeIndex; @@ -682,8 +675,8 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent) { // This is the "real" name of a $$$DUMMY object { - const char *sz = (const char *)stream->GetPtr(); - while (stream->GetI1()) + const char *sz = (const char *)mStream->GetPtr(); + while (mStream->GetI1()) ; // If object name is DUMMY, take this one instead @@ -702,16 +695,16 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent) { } // Pivot = origin of rotation and scaling - mCurrentNode->vPivot.x = stream->GetF4(); - mCurrentNode->vPivot.y = stream->GetF4(); - mCurrentNode->vPivot.z = stream->GetF4(); + mCurrentNode->vPivot.x = mStream->GetF4(); + mCurrentNode->vPivot.y = mStream->GetF4(); + mCurrentNode->vPivot.z = mStream->GetF4(); break; // //////////////////////////////////////////////////////////////////// // POSITION KEYFRAME case Discreet3DS::CHUNK_TRACKPOS: { - stream->IncPtr(10); - const unsigned int numFrames = stream->GetI4(); + mStream->IncPtr(10); + const unsigned int numFrames = mStream->GetI4(); bool sortKeys = false; // This could also be meant as the target position for @@ -724,16 +717,16 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent) { l->reserve(numFrames); for (unsigned int i = 0; i < numFrames; ++i) { - const unsigned int fidx = stream->GetI4(); + const unsigned int fidx = mStream->GetI4(); // Setup a new position key aiVectorKey v; v.mTime = (double)fidx; SkipTCBInfo(); - v.mValue.x = stream->GetF4(); - v.mValue.y = stream->GetF4(); - v.mValue.z = stream->GetF4(); + v.mValue.x = mStream->GetF4(); + v.mValue.y = mStream->GetF4(); + v.mValue.z = mStream->GetF4(); // check whether we'll need to sort the keys if (!l->empty() && v.mTime <= l->back().mTime) @@ -763,11 +756,11 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent) { bool sortKeys = false; std::vector *l = &mCurrentNode->aCameraRollKeys; - stream->IncPtr(10); - const unsigned int numFrames = stream->GetI4(); + mStream->IncPtr(10); + const unsigned int numFrames = mStream->GetI4(); l->reserve(numFrames); for (unsigned int i = 0; i < numFrames; ++i) { - const unsigned int fidx = stream->GetI4(); + const unsigned int fidx = mStream->GetI4(); // Setup a new position key aiFloatKey v; @@ -775,7 +768,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent) { // This is just a single float SkipTCBInfo(); - v.mValue = stream->GetF4(); + v.mValue = mStream->GetF4(); // Check whether we'll need to sort the keys if (!l->empty() && v.mTime <= l->back().mTime) @@ -802,26 +795,26 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent) { // //////////////////////////////////////////////////////////////////// // ROTATION KEYFRAME case Discreet3DS::CHUNK_TRACKROTATE: { - stream->IncPtr(10); - const unsigned int numFrames = stream->GetI4(); + mStream->IncPtr(10); + const unsigned int numFrames = mStream->GetI4(); bool sortKeys = false; std::vector *l = &mCurrentNode->aRotationKeys; l->reserve(numFrames); for (unsigned int i = 0; i < numFrames; ++i) { - const unsigned int fidx = stream->GetI4(); + const unsigned int fidx = mStream->GetI4(); SkipTCBInfo(); aiQuatKey v; v.mTime = (double)fidx; // The rotation keyframe is given as an axis-angle pair - const float rad = stream->GetF4(); + const float rad = mStream->GetF4(); aiVector3D axis; - axis.x = stream->GetF4(); - axis.y = stream->GetF4(); - axis.z = stream->GetF4(); + axis.x = mStream->GetF4(); + axis.y = mStream->GetF4(); + axis.z = mStream->GetF4(); if (!axis.x && !axis.y && !axis.z) axis.y = 1.f; @@ -846,16 +839,16 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent) { // //////////////////////////////////////////////////////////////////// // SCALING KEYFRAME case Discreet3DS::CHUNK_TRACKSCALE: { - stream->IncPtr(10); - const unsigned int numFrames = stream->GetI2(); - stream->IncPtr(2); + mStream->IncPtr(10); + const unsigned int numFrames = mStream->GetI2(); + mStream->IncPtr(2); bool sortKeys = false; std::vector *l = &mCurrentNode->aScalingKeys; l->reserve(numFrames); for (unsigned int i = 0; i < numFrames; ++i) { - const unsigned int fidx = stream->GetI4(); + const unsigned int fidx = mStream->GetI4(); SkipTCBInfo(); // Setup a new key @@ -863,9 +856,9 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent) { v.mTime = (double)fidx; // ... and read its value - v.mValue.x = stream->GetF4(); - v.mValue.y = stream->GetF4(); - v.mValue.z = stream->GetF4(); + v.mValue.x = mStream->GetF4(); + v.mValue.y = mStream->GetF4(); + v.mValue.z = mStream->GetF4(); // check whether we'll need to sort the keys if (!l->empty() && v.mTime <= l->back().mTime) @@ -906,23 +899,23 @@ void Discreet3DSImporter::ParseFaceChunk() { if (num > mMesh.mFaces.size()) { throw DeadlyImportError("3DS: More smoothing groups than faces"); } - for (std::vector::iterator i = mMesh.mFaces.begin(); m != num; ++i, ++m) { + for (auto i = mMesh.mFaces.begin(); m != num; ++i, ++m) { // nth bit is set for nth smoothing group - (*i).iSmoothGroup = stream->GetI4(); + i->iSmoothGroup = mStream->GetI4(); } } break; case Discreet3DS::CHUNK_FACEMAT: { // at fist an asciiz with the material name - const char *sz = (const char *)stream->GetPtr(); - while (stream->GetI1()) + const char *sz = (const char *)mStream->GetPtr(); + while (mStream->GetI1()) ; // find the index of the material unsigned int idx = 0xcdcdcdcd, cnt = 0; - for (std::vector::const_iterator i = mScene->mMaterials.begin(); i != mScene->mMaterials.end(); ++i, ++cnt) { + for (auto i = mScene->mMaterials.begin(); i != mScene->mMaterials.end(); ++i, ++cnt) { // use case independent comparisons. hopefully it will work. - if ((*i).mName.length() && !ASSIMP_stricmp(sz, (*i).mName.c_str())) { + if (i->mName.length() && !ASSIMP_stricmp(sz, i->mName.c_str())) { idx = cnt; break; } @@ -932,9 +925,9 @@ void Discreet3DSImporter::ParseFaceChunk() { } // Now continue and read all material indices - cnt = (uint16_t)stream->GetI2(); + cnt = (uint16_t)mStream->GetI2(); for (unsigned int i = 0; i < cnt; ++i) { - unsigned int fidx = (uint16_t)stream->GetI2(); + unsigned int fidx = (uint16_t)mStream->GetI2(); // check range if (fidx >= mMesh.mFaceMaterials.size()) { @@ -959,59 +952,59 @@ void Discreet3DSImporter::ParseMeshChunk() { switch (chunk.Flag) { case Discreet3DS::CHUNK_VERTLIST: { // This is the list of all vertices in the current mesh - int num = (int)(uint16_t)stream->GetI2(); + int num = (int)(uint16_t)mStream->GetI2(); mMesh.mPositions.reserve(num); while (num-- > 0) { aiVector3D v; - v.x = stream->GetF4(); - v.y = stream->GetF4(); - v.z = stream->GetF4(); + v.x = mStream->GetF4(); + v.y = mStream->GetF4(); + v.z = mStream->GetF4(); mMesh.mPositions.push_back(v); } } break; case Discreet3DS::CHUNK_TRMATRIX: { // This is the RLEATIVE transformation matrix of the current mesh. Vertices are // pretransformed by this matrix wonder. - mMesh.mMat.a1 = stream->GetF4(); - mMesh.mMat.b1 = stream->GetF4(); - mMesh.mMat.c1 = stream->GetF4(); - mMesh.mMat.a2 = stream->GetF4(); - mMesh.mMat.b2 = stream->GetF4(); - mMesh.mMat.c2 = stream->GetF4(); - mMesh.mMat.a3 = stream->GetF4(); - mMesh.mMat.b3 = stream->GetF4(); - mMesh.mMat.c3 = stream->GetF4(); - mMesh.mMat.a4 = stream->GetF4(); - mMesh.mMat.b4 = stream->GetF4(); - mMesh.mMat.c4 = stream->GetF4(); + mMesh.mMat.a1 = mStream->GetF4(); + mMesh.mMat.b1 = mStream->GetF4(); + mMesh.mMat.c1 = mStream->GetF4(); + mMesh.mMat.a2 = mStream->GetF4(); + mMesh.mMat.b2 = mStream->GetF4(); + mMesh.mMat.c2 = mStream->GetF4(); + mMesh.mMat.a3 = mStream->GetF4(); + mMesh.mMat.b3 = mStream->GetF4(); + mMesh.mMat.c3 = mStream->GetF4(); + mMesh.mMat.a4 = mStream->GetF4(); + mMesh.mMat.b4 = mStream->GetF4(); + mMesh.mMat.c4 = mStream->GetF4(); } break; case Discreet3DS::CHUNK_MAPLIST: { // This is the list of all UV coords in the current mesh - int num = (int)(uint16_t)stream->GetI2(); + int num = (int)(uint16_t)mStream->GetI2(); mMesh.mTexCoords.reserve(num); while (num-- > 0) { aiVector3D v; - v.x = stream->GetF4(); - v.y = stream->GetF4(); + v.x = mStream->GetF4(); + v.y = mStream->GetF4(); mMesh.mTexCoords.push_back(v); } } break; case Discreet3DS::CHUNK_FACELIST: { // This is the list of all faces in the current mesh - int num = (int)(uint16_t)stream->GetI2(); + int num = (int)(uint16_t)mStream->GetI2(); mMesh.mFaces.reserve(num); while (num-- > 0) { // 3DS faces are ALWAYS triangles mMesh.mFaces.emplace_back(); - D3DS::Face &sFace = mMesh.mFaces.back(); + Face &sFace = mMesh.mFaces.back(); - sFace.mIndices[0] = (uint16_t)stream->GetI2(); - sFace.mIndices[1] = (uint16_t)stream->GetI2(); - sFace.mIndices[2] = (uint16_t)stream->GetI2(); + sFace.mIndices[0] = (uint16_t)mStream->GetI2(); + sFace.mIndices[1] = (uint16_t)mStream->GetI2(); + sFace.mIndices[2] = (uint16_t)mStream->GetI2(); - stream->IncPtr(2); // skip edge visibility flag + mStream->IncPtr(2); // skip edge visibility flag } // Resize the material array (0xcdcdcdcd marks the default material; so if a face is @@ -1019,7 +1012,7 @@ void Discreet3DSImporter::ParseMeshChunk() { mMesh.mFaceMaterials.resize(mMesh.mFaces.size(), 0xcdcdcdcd); // Larger 3DS files could have multiple FACE chunks here - chunkSize = (int)stream->GetRemainingSizeToLimit(); + chunkSize = (int)mStream->GetRemainingSizeToLimit(); if (chunkSize > (int)sizeof(Discreet3DS::Chunk)) ParseFaceChunk(); } break; @@ -1036,9 +1029,9 @@ void Discreet3DSImporter::ParseMaterialChunk() { { // The material name string is already zero-terminated, but we need to be sure ... - const char *sz = (const char *)stream->GetPtr(); + const char *sz = (const char *)mStream->GetPtr(); unsigned int cnt = 0; - while (stream->GetI1()) + while (mStream->GetI1()) ++cnt; if (!cnt) { @@ -1106,7 +1099,7 @@ void Discreet3DSImporter::ParseMaterialChunk() { case Discreet3DS::CHUNK_MAT_SHADING: // This is the material shading mode - mScene->mMaterials.back().mShading = (D3DS::Discreet3DS::shadetype3ds)stream->GetI2(); + mScene->mMaterials.back().mShading = (Discreet3DS::shadetype3ds)mStream->GetI2(); break; case Discreet3DS::CHUNK_MAT_TWO_SIDE: @@ -1182,31 +1175,31 @@ void Discreet3DSImporter::ParseTextureChunk(D3DS::Texture *pcOut) { switch (chunk.Flag) { case Discreet3DS::CHUNK_MAPFILE: { // The material name string is already zero-terminated, but we need to be sure ... - const char *sz = (const char *)stream->GetPtr(); + const char *sz = (const char *)mStream->GetPtr(); unsigned int cnt = 0; - while (stream->GetI1()) + while (mStream->GetI1()) ++cnt; pcOut->mMapName = std::string(sz, cnt); } break; case Discreet3DS::CHUNK_PERCENTD: // Manually parse the blend factor - pcOut->mTextureBlend = ai_real(stream->GetF8()); + pcOut->mTextureBlend = ai_real(mStream->GetF8()); break; case Discreet3DS::CHUNK_PERCENTF: // Manually parse the blend factor - pcOut->mTextureBlend = stream->GetF4(); + pcOut->mTextureBlend = mStream->GetF4(); break; case Discreet3DS::CHUNK_PERCENTW: // Manually parse the blend factor - pcOut->mTextureBlend = (ai_real)((uint16_t)stream->GetI2()) / ai_real(100.0); + pcOut->mTextureBlend = (ai_real)((uint16_t) mStream->GetI2()) / ai_real(100.0); break; case Discreet3DS::CHUNK_MAT_MAP_USCALE: // Texture coordinate scaling in the U direction - pcOut->mScaleU = stream->GetF4(); + pcOut->mScaleU = mStream->GetF4(); if (0.0f == pcOut->mScaleU) { ASSIMP_LOG_WARN("Texture coordinate scaling in the x direction is zero. Assuming 1."); pcOut->mScaleU = 1.0f; @@ -1214,7 +1207,7 @@ void Discreet3DSImporter::ParseTextureChunk(D3DS::Texture *pcOut) { break; case Discreet3DS::CHUNK_MAT_MAP_VSCALE: // Texture coordinate scaling in the V direction - pcOut->mScaleV = stream->GetF4(); + pcOut->mScaleV = mStream->GetF4(); if (0.0f == pcOut->mScaleV) { ASSIMP_LOG_WARN("Texture coordinate scaling in the y direction is zero. Assuming 1."); pcOut->mScaleV = 1.0f; @@ -1223,21 +1216,21 @@ void Discreet3DSImporter::ParseTextureChunk(D3DS::Texture *pcOut) { case Discreet3DS::CHUNK_MAT_MAP_UOFFSET: // Texture coordinate offset in the U direction - pcOut->mOffsetU = -stream->GetF4(); + pcOut->mOffsetU = -mStream->GetF4(); break; case Discreet3DS::CHUNK_MAT_MAP_VOFFSET: // Texture coordinate offset in the V direction - pcOut->mOffsetV = stream->GetF4(); + pcOut->mOffsetV = mStream->GetF4(); break; case Discreet3DS::CHUNK_MAT_MAP_ANG: // Texture coordinate rotation, CCW in DEGREES - pcOut->mRotation = -AI_DEG_TO_RAD(stream->GetF4()); + pcOut->mRotation = -AI_DEG_TO_RAD(mStream->GetF4()); break; case Discreet3DS::CHUNK_MAT_MAP_TILING: { - const uint16_t iFlags = stream->GetI2(); + const uint16_t iFlags = mStream->GetI2(); // Get the mapping mode (for both axes) if (iFlags & 0x2u) @@ -1262,9 +1255,11 @@ ai_real Discreet3DSImporter::ParsePercentageChunk() { ReadChunk(&chunk); if (Discreet3DS::CHUNK_PERCENTF == chunk.Flag) { - return stream->GetF4() * ai_real(100) / ai_real(0xFFFF); - } else if (Discreet3DS::CHUNK_PERCENTW == chunk.Flag) { - return (ai_real)((uint16_t)stream->GetI2()) / (ai_real)0xFFFF; + return mStream->GetF4() * ai_real(100) / ai_real(0xFFFF); + } + + if (Discreet3DS::CHUNK_PERCENTW == chunk.Flag) { + return (ai_real)((uint16_t)mStream->GetI2()) / (ai_real)0xFFFF; } return get_qnan(); @@ -1295,9 +1290,9 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D *out, bool acceptPercent) { *out = clrError; return; } - out->r = stream->GetF4(); - out->g = stream->GetF4(); - out->b = stream->GetF4(); + out->r = mStream->GetF4(); + out->g = mStream->GetF4(); + out->b = mStream->GetF4(); break; case Discreet3DS::CHUNK_LINRGBB: @@ -1309,15 +1304,15 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D *out, bool acceptPercent) { return; } const ai_real invVal = ai_real(1.0) / ai_real(255.0); - out->r = (ai_real)(uint8_t)stream->GetI1() * invVal; - out->g = (ai_real)(uint8_t)stream->GetI1() * invVal; - out->b = (ai_real)(uint8_t)stream->GetI1() * invVal; + out->r = (ai_real)(uint8_t)mStream->GetI1() * invVal; + out->g = (ai_real)(uint8_t)mStream->GetI1() * invVal; + out->b = (ai_real)(uint8_t)mStream->GetI1() * invVal; } break; // Percentage chunks are accepted, too. case Discreet3DS::CHUNK_PERCENTF: if (acceptPercent && 4 <= diff) { - out->g = out->b = out->r = stream->GetF4(); + out->g = out->b = out->r = mStream->GetF4(); break; } *out = clrError; @@ -1325,18 +1320,20 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D *out, bool acceptPercent) { case Discreet3DS::CHUNK_PERCENTW: if (acceptPercent && 1 <= diff) { - out->g = out->b = out->r = (ai_real)(uint8_t)stream->GetI1() / ai_real(255.0); + out->g = out->b = out->r = (ai_real)(uint8_t)mStream->GetI1() / ai_real(255.0); break; } *out = clrError; return; default: - stream->IncPtr(diff); + mStream->IncPtr(diff); // Skip unknown chunks, hope this won't cause any problems. return ParseColorChunk(out, acceptPercent); }; (void)bGamma; } +} // namespace Assimp + #endif // !! ASSIMP_BUILD_NO_3DS_IMPORTER diff --git a/code/AssetLib/3DS/3DSLoader.h b/code/AssetLib/3DS/3DSLoader.h index 6bd73f4125..32a1b7a60c 100644 --- a/code/AssetLib/3DS/3DSLoader.h +++ b/code/AssetLib/3DS/3DSLoader.h @@ -1,10 +1,8 @@ - /* Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team - +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -51,24 +49,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include - #include "3DSHelper.h" #include struct aiNode; -namespace Assimp { - - -using namespace D3DS; +namespace Assimp { // --------------------------------------------------------------------------------- /** Importer class for 3D Studio r3 and r4 3DS files */ -class Discreet3DSImporter : public BaseImporter { +class Discreet3DSImporter final : public BaseImporter { public: Discreet3DSImporter(); - ~Discreet3DSImporter() override; + ~Discreet3DSImporter() override = default; // ------------------------------------------------------------------- /** Returns whether the class can handle the format of the given file. @@ -102,15 +96,14 @@ class Discreet3DSImporter : public BaseImporter { // ------------------------------------------------------------------- /** Converts a temporary material to the outer representation */ - void ConvertMaterial(D3DS::Material& p_cMat, - aiMaterial& p_pcOut); + void ConvertMaterial(D3DS::Material& p_cMat, aiMaterial& p_pcOut); // ------------------------------------------------------------------- /** Read a chunk * * @param pcOut Receives the current chunk */ - void ReadChunk(Discreet3DS::Chunk* pcOut); + void ReadChunk(D3DS::Discreet3DS::Chunk* pcOut); // ------------------------------------------------------------------- /** Parse a percentage chunk. mCurrent will point to the next @@ -120,13 +113,10 @@ class Discreet3DSImporter : public BaseImporter { ai_real ParsePercentageChunk(); // ------------------------------------------------------------------- - /** Parse a color chunk. mCurrent will point to the next - * chunk behind afterwards. If no color chunk is found - * QNAN is returned in all members. - */ - void ParseColorChunk(aiColor3D* p_pcOut, - bool p_bAcceptPercent = true); - + /** Parse a color chunk. mCurrent will point to the next chunk behind + * afterward. If no color chunk is found QNAN is returned in all members. + */ + void ParseColorChunk(aiColor3D* p_pcOut, bool p_bAcceptPercent = true); // ------------------------------------------------------------------- /** Skip a chunk in the file @@ -134,7 +124,7 @@ class Discreet3DSImporter : public BaseImporter { void SkipChunk(); // ------------------------------------------------------------------- - /** Generate the nodegraph + /** Generate the node-graph */ void GenerateNodeGraph(aiScene* pcOut); @@ -230,19 +220,19 @@ class Discreet3DSImporter : public BaseImporter { // ------------------------------------------------------------------- /** Add a node to the node graph */ - void AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,D3DS::Node* pcIn, + void AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut, D3DS::Node* pcIn, aiMatrix4x4& absTrafo); // ------------------------------------------------------------------- /** Search for a node in the graph. * Called recursively */ - void InverseNodeSearch(D3DS::Node* pcNode,D3DS::Node* pcCurrent); + void InverseNodeSearch(D3DS::Node* pcNode, D3DS::Node* pcCurrent); // ------------------------------------------------------------------- /** Apply the master scaling factor to the mesh */ - void ApplyMasterScale(aiScene* pScene); + void ApplyMasterScale(const aiScene* pScene); // ------------------------------------------------------------------- /** Clamp all indices in the file to a valid range @@ -254,31 +244,26 @@ class Discreet3DSImporter : public BaseImporter { */ void SkipTCBInfo(); -protected: - - /** Stream to read from */ - StreamReaderLE* stream; - - /** Last touched node index */ +private: + /// Stream to read from + StreamReaderLE* mStream; + /// Last touched node index short mLastNodeIndex; - - /** Current node, root node */ - D3DS::Node* mCurrentNode, *mRootNode; - - /** Scene under construction */ + /// Current node + D3DS::Node* mCurrentNode; + /// Root node + D3DS::Node *mRootNode; + /// Scene under construction D3DS::Scene* mScene; - - /** Ambient base color of the scene */ + /// Ambient base color of the scene aiColor3D mClrAmbient; - - /** Master scaling factor of the scene */ + /// Master scaling factor of the scene ai_real mMasterScale; - - /** Path to the background image of the scene */ + /// Path to the background image of the scene std::string mBackgroundImage; + /// true for has a background bool bHasBG; - - /** true if PRJ file */ + /// true if PRJ file bool bIsPrj; }; diff --git a/code/AssetLib/3MF/3MFTypes.h b/code/AssetLib/3MF/3MFTypes.h index 8207b568bc..d7b40d6f7a 100644 --- a/code/AssetLib/3MF/3MFTypes.h +++ b/code/AssetLib/3MF/3MFTypes.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -49,14 +49,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. struct aiMaterial; struct aiMesh; -namespace Assimp { -namespace D3MF { +namespace Assimp:: D3MF { enum class ResourceType { RT_Object, RT_BaseMaterials, RT_EmbeddedTexture2D, RT_Texture2DGroup, + RT_ColorGroup, RT_Unknown }; // To be extended with other resource types (eg. material extension resources like Texture2d, Texture2dGroup...) @@ -64,8 +64,7 @@ class Resource { public: int mId; - Resource(int id) : - mId(id) { + explicit Resource(int id) : mId(id) { // empty } @@ -76,7 +75,7 @@ class Resource { } }; -class EmbeddedTexture : public Resource { +class EmbeddedTexture final : public Resource { public: std::string mPath; std::string mContentType; @@ -84,12 +83,7 @@ class EmbeddedTexture : public Resource { std::string mTilestyleV; std::vector mBuffer; - EmbeddedTexture(int id) : - Resource(id), - mPath(), - mContentType(), - mTilestyleU(), - mTilestyleV() { + explicit EmbeddedTexture(int id) : Resource(id) { // empty } @@ -100,13 +94,12 @@ class EmbeddedTexture : public Resource { } }; -class Texture2DGroup : public Resource { +class Texture2DGroup final : public Resource { public: std::vector mTex2dCoords; int mTexId; - Texture2DGroup(int id) : - Resource(id), - mTexId(-1) { + + explicit Texture2DGroup(int id) : Resource(id), mTexId(-1) { // empty } @@ -117,13 +110,26 @@ class Texture2DGroup : public Resource { } }; -class BaseMaterials : public Resource { +class ColorGroup final : public Resource { +public: + std::vector mColors; + + explicit ColorGroup(int id) : Resource(id) { + // empty + } + + ~ColorGroup() override = default; + + ResourceType getType() const override { + return ResourceType::RT_ColorGroup; + } +}; + +class BaseMaterials final : public Resource { public: std::vector mMaterialIndex; - BaseMaterials(int id) : - Resource(id), - mMaterialIndex() { + explicit BaseMaterials(int id) : Resource(id) { // empty } @@ -139,14 +145,14 @@ struct Component { aiMatrix4x4 mTransformation; }; -class Object : public Resource { +class Object final : public Resource { public: std::vector mMeshes; std::vector mMeshIndex; std::vector mComponents; std::string mName; - Object(int id) : + explicit Object(int id) : Resource(id), mName(std::string("Object_") + ai_to_string(id)) { // empty @@ -159,5 +165,4 @@ class Object : public Resource { } }; -} // namespace D3MF -} // namespace Assimp +} // namespace Assimp::D3MF diff --git a/code/AssetLib/3MF/3MFXmlTags.h b/code/AssetLib/3MF/3MFXmlTags.h index 333d169aaf..25aa3cce71 100644 --- a/code/AssetLib/3MF/3MFXmlTags.h +++ b/code/AssetLib/3MF/3MFXmlTags.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -40,80 +40,80 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once -namespace Assimp { -namespace D3MF { - -namespace XmlTag { +namespace Assimp::D3MF::XmlTag { // Root tag - const char* const RootTag = "3MF"; + constexpr char RootTag[] = "3MF"; // Meta-data - const char* const meta = "metadata"; - const char* const meta_name = "name"; + constexpr char meta[] = "metadata"; + constexpr char meta_name[] = "name"; // Model-data specific tags - const char* const model = "model"; - const char* const model_unit = "unit"; - const char* const metadata = "metadata"; - const char* const resources = "resources"; - const char* const object = "object"; - const char* const mesh = "mesh"; - const char* const components = "components"; - const char* const component = "component"; - const char* const vertices = "vertices"; - const char* const vertex = "vertex"; - const char* const triangles = "triangles"; - const char* const triangle = "triangle"; - const char* const x = "x"; - const char* const y = "y"; - const char* const z = "z"; - const char* const v1 = "v1"; - const char* const v2 = "v2"; - const char* const v3 = "v3"; - const char* const id = "id"; - const char* const pid = "pid"; - const char* const pindex = "pindex"; - const char* const p1 = "p1"; - const char *const p2 = "p2"; - const char *const p3 = "p3"; - const char* const name = "name"; - const char* const type = "type"; - const char* const build = "build"; - const char* const item = "item"; - const char* const objectid = "objectid"; - const char* const transform = "transform"; - const char *const path = "path"; + constexpr char model[] = "model"; + constexpr char model_unit[] = "unit"; + constexpr char metadata[] = "metadata"; + constexpr char resources[] = "resources"; + constexpr char object[] = "object"; + constexpr char mesh[] = "mesh"; + constexpr char components[] = "components"; + constexpr char component[] = "component"; + constexpr char vertices[] = "vertices"; + constexpr char vertex[] = "vertex"; + constexpr char triangles[] = "triangles"; + constexpr char triangle[] = "triangle"; + constexpr char x[] = "x"; + constexpr char y[] = "y"; + constexpr char z[] = "z"; + constexpr char v1[] = "v1"; + constexpr char v2[] = "v2"; + constexpr char v3[] = "v3"; + constexpr char id[] = "id"; + constexpr char pid[] = "pid"; + constexpr char pindex[] = "pindex"; + constexpr char p1[] = "p1"; + constexpr char p2[] = "p2"; + constexpr char p3[] = "p3"; + constexpr char name[] = "name"; + constexpr char type[] = "type"; + constexpr char build[] = "build"; + constexpr char item[] = "item"; + constexpr char objectid[] = "objectid"; + constexpr char transform[] = "transform"; + constexpr char path[] = "path"; // Material definitions - const char* const basematerials = "basematerials"; - const char* const basematerials_base = "base"; - const char* const basematerials_name = "name"; - const char* const basematerials_displaycolor = "displaycolor"; - const char* const texture_2d = "m:texture2d"; - const char *const texture_group = "m:texture2dgroup"; - const char *const texture_content_type = "contenttype"; - const char *const texture_tilestyleu = "tilestyleu"; - const char *const texture_tilestylev = "tilestylev"; - const char *const texture_2d_coord = "m:tex2coord"; - const char *const texture_cuurd_u = "u"; - const char *const texture_cuurd_v = "v"; + constexpr char basematerials[] = "basematerials"; + constexpr char basematerials_base[] = "base"; + constexpr char basematerials_name[] = "name"; + constexpr char basematerials_displaycolor[] = "displaycolor"; + constexpr char texture_2d[] = "m:texture2d"; + constexpr char texture_group[] = "m:texture2dgroup"; + constexpr char texture_content_type[] = "contenttype"; + constexpr char texture_tilestyleu[] = "tilestyleu"; + constexpr char texture_tilestylev[] = "tilestylev"; + constexpr char texture_2d_coord[] = "m:tex2coord"; + constexpr char texture_cuurd_u[] = "u"; + constexpr char texture_cuurd_v[] = "v"; + + // vertex color definitions + constexpr char colorgroup[] = "m:colorgroup"; + constexpr char color_item[] = "m:color"; + constexpr char color_value[] = "color"; // Meta info tags - const char* const CONTENT_TYPES_ARCHIVE = "[Content_Types].xml"; - const char* const ROOT_RELATIONSHIPS_ARCHIVE = "_rels/.rels"; - const char* const SCHEMA_CONTENTTYPES = "http://schemas.openxmlformats.org/package/2006/content-types"; - const char* const SCHEMA_RELATIONSHIPS = "http://schemas.openxmlformats.org/package/2006/relationships"; - const char* const RELS_RELATIONSHIP_CONTAINER = "Relationships"; - const char* const RELS_RELATIONSHIP_NODE = "Relationship"; - const char* const RELS_ATTRIB_TARGET = "Target"; - const char* const RELS_ATTRIB_TYPE = "Type"; - const char* const RELS_ATTRIB_ID = "Id"; - const char* const PACKAGE_START_PART_RELATIONSHIP_TYPE = "http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel"; - const char* const PACKAGE_PRINT_TICKET_RELATIONSHIP_TYPE = "http://schemas.microsoft.com/3dmanufacturing/2013/01/printticket"; - const char* const PACKAGE_TEXTURE_RELATIONSHIP_TYPE = "http://schemas.microsoft.com/3dmanufacturing/2013/01/3dtexture"; - const char* const PACKAGE_CORE_PROPERTIES_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"; - const char* const PACKAGE_THUMBNAIL_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail"; -} + constexpr char CONTENT_TYPES_ARCHIVE[] = "[Content_Types].xml"; + constexpr char ROOT_RELATIONSHIPS_ARCHIVE[] = "_rels/.rels"; + constexpr char SCHEMA_CONTENTTYPES[] = "http://schemas.openxmlformats.org/package/2006/content-types"; + constexpr char SCHEMA_RELATIONSHIPS[] = "http://schemas.openxmlformats.org/package/2006/relationships"; + constexpr char RELS_RELATIONSHIP_CONTAINER[] = "Relationships"; + constexpr char RELS_RELATIONSHIP_NODE[] = "Relationship"; + constexpr char RELS_ATTRIB_TARGET[] = "Target"; + constexpr char RELS_ATTRIB_TYPE[] = "Type"; + constexpr char RELS_ATTRIB_ID[] = "Id"; + constexpr char PACKAGE_START_PART_RELATIONSHIP_TYPE[] = "http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel"; + constexpr char PACKAGE_PRINT_TICKET_RELATIONSHIP_TYPE[] = "http://schemas.microsoft.com/3dmanufacturing/2013/01/printticket"; + constexpr char PACKAGE_TEXTURE_RELATIONSHIP_TYPE[] = "http://schemas.microsoft.com/3dmanufacturing/2013/01/3dtexture"; + constexpr char PACKAGE_CORE_PROPERTIES_RELATIONSHIP_TYPE[] = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"; + constexpr char PACKAGE_THUMBNAIL_RELATIONSHIP_TYPE[] = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail"; -} // Namespace D3MF -} // Namespace Assimp +} // namespace Assimp::D3MF diff --git a/code/AssetLib/3MF/D3MFExporter.cpp b/code/AssetLib/3MF/D3MFExporter.cpp index 4ba3bbf240..923323c547 100644 --- a/code/AssetLib/3MF/D3MFExporter.cpp +++ b/code/AssetLib/3MF/D3MFExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -48,7 +48,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include #include #include "3MFXmlTags.h" @@ -94,7 +93,7 @@ D3MFExporter::~D3MFExporter() { mRelations.clear(); } -bool D3MFExporter::validate() { +bool D3MFExporter::validate() const { if (mArchiveName.empty()) { return false; } @@ -249,10 +248,10 @@ void D3MFExporter::writeBaseMaterials() { if (color.r <= 1 && color.g <= 1 && color.b <= 1 && color.a <= 1) { hexDiffuseColor = ai_rgba2hex( - (int)((ai_real)color.r) * 255, - (int)((ai_real)color.g) * 255, - (int)((ai_real)color.b) * 255, - (int)((ai_real)color.a) * 255, + (int)(((ai_real)color.r) * 255), + (int)(((ai_real)color.g) * 255), + (int)(((ai_real)color.b) * 255), + (int)(((ai_real)color.a) * 255), true); } else { diff --git a/code/AssetLib/3MF/D3MFExporter.h b/code/AssetLib/3MF/D3MFExporter.h index 680d54f919..686244117f 100644 --- a/code/AssetLib/3MF/D3MFExporter.h +++ b/code/AssetLib/3MF/D3MFExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -68,7 +68,7 @@ class D3MFExporter { public: D3MFExporter( const char* pFile, const aiScene* pScene ); ~D3MFExporter(); - bool validate(); + bool validate() const; bool exportArchive( const char *file ); bool exportContentTypes(); bool exportRelations(); diff --git a/code/AssetLib/3MF/D3MFImporter.cpp b/code/AssetLib/3MF/D3MFImporter.cpp index 5d9644fa58..8c67c38372 100644 --- a/code/AssetLib/3MF/D3MFImporter.cpp +++ b/code/AssetLib/3MF/D3MFImporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -68,7 +68,7 @@ namespace Assimp { using namespace D3MF; -static const aiImporterDesc desc = { +static constexpr aiImporterDesc desc = { "3mf Importer", "", "", @@ -81,16 +81,17 @@ static const aiImporterDesc desc = { "3mf" }; -D3MFImporter::D3MFImporter() = default; - -D3MFImporter::~D3MFImporter() = default; - -bool D3MFImporter::CanRead(const std::string &filename, IOSystem *pIOHandler, bool /*checkSig*/) const { +bool D3MFImporter::CanRead(const std::string &filename, IOSystem *pIOHandler, bool ) const { if (!ZipArchiveIOSystem::isZipArchive(pIOHandler, filename)) { return false; } - D3MF::D3MFOpcPackage opcPackage(pIOHandler, filename); - return opcPackage.validate(); + static constexpr char ModelRef[] = "3D/3dmodel.model"; + ZipArchiveIOSystem archive(pIOHandler, filename); + if (!archive.Exists(ModelRef)) { + return false; + } + + return true; } void D3MFImporter::SetupProperties(const Importer*) { @@ -106,7 +107,7 @@ void D3MFImporter::InternReadFile(const std::string &filename, aiScene *pScene, XmlParser xmlParser; if (xmlParser.parse(opcPackage.RootStream())) { - XmlSerializer xmlSerializer(&xmlParser); + XmlSerializer xmlSerializer(xmlParser); xmlSerializer.ImportXml(pScene); const std::vector &tex = opcPackage.GetEmbeddedTextures(); diff --git a/code/AssetLib/3MF/D3MFImporter.h b/code/AssetLib/3MF/D3MFImporter.h index a39ae790fc..986e785ea9 100644 --- a/code/AssetLib/3MF/D3MFImporter.h +++ b/code/AssetLib/3MF/D3MFImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -53,13 +53,13 @@ namespace Assimp { /// /// Implements the basic topology import and embedded textures. // --------------------------------------------------------------------------- -class D3MFImporter : public BaseImporter { +class D3MFImporter final : public BaseImporter { public: /// @brief The default class constructor. - D3MFImporter(); + D3MFImporter() = default; /// @brief The class destructor. - ~D3MFImporter() override; + ~D3MFImporter() override = default; /// @brief Performs the data format detection. /// @param pFile The filename to check. diff --git a/code/AssetLib/3MF/D3MFOpcPackage.cpp b/code/AssetLib/3MF/D3MFOpcPackage.cpp index 934305d49b..6aa20059eb 100644 --- a/code/AssetLib/3MF/D3MFOpcPackage.cpp +++ b/code/AssetLib/3MF/D3MFOpcPackage.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -65,10 +65,9 @@ namespace D3MF { using OpcPackageRelationshipPtr = std::shared_ptr; -class OpcPackageRelationshipReader { +class OpcPackageRelationshipReader final { public: - OpcPackageRelationshipReader(XmlParser &parser) : - m_relationShips() { + explicit OpcPackageRelationshipReader(XmlParser &parser) : mRelations() { XmlNode root = parser.getRootNode(); ParseRootNode(root); } @@ -108,20 +107,20 @@ class OpcPackageRelationshipReader { relPtr->type = currentNode.attribute(XmlTag::RELS_ATTRIB_TYPE).as_string(); relPtr->target = currentNode.attribute(XmlTag::RELS_ATTRIB_TARGET).as_string(); if (validateRels(relPtr)) { - m_relationShips.push_back(relPtr); + mRelations.push_back(relPtr); } } } } - std::vector m_relationShips; + std::vector mRelations; }; static bool IsEmbeddedTexture( const std::string &filename ) { const std::string extension = BaseImporter::GetExtension(filename); - if (extension == "jpg" || extension == "png") { + if (extension == "jpg" || extension == "png" || extension == "jpeg") { std::string::size_type pos = filename.find("thumbnail"); - if (pos == std::string::npos) { + if (pos != std::string::npos) { return false; } return true; @@ -186,9 +185,6 @@ D3MFOpcPackage::D3MFOpcPackage(IOSystem *pIOHandler, const std::string &rFile) : D3MFOpcPackage::~D3MFOpcPackage() { mZipArchive->Close(mRootStream); delete mZipArchive; - for (auto tex : mEmbeddedTextures) { - delete tex; - } } IOStream *D3MFOpcPackage::RootStream() const { @@ -217,11 +213,11 @@ std::string D3MFOpcPackage::ReadPackageRootRelationship(IOStream *stream) { OpcPackageRelationshipReader reader(xmlParser); - auto itr = std::find_if(reader.m_relationShips.begin(), reader.m_relationShips.end(), [](const OpcPackageRelationshipPtr &rel) { + auto itr = std::find_if(reader.mRelations.begin(), reader.mRelations.end(), [](const OpcPackageRelationshipPtr &rel) { return rel->type == XmlTag::PACKAGE_START_PART_RELATIONSHIP_TYPE; }); - if (itr == reader.m_relationShips.end()) { + if (itr == reader.mRelations.end()) { throw DeadlyImportError("Cannot find ", XmlTag::PACKAGE_START_PART_RELATIONSHIP_TYPE); } diff --git a/code/AssetLib/3MF/D3MFOpcPackage.h b/code/AssetLib/3MF/D3MFOpcPackage.h index f6803a0ef2..7fab87edd8 100644 --- a/code/AssetLib/3MF/D3MFOpcPackage.h +++ b/code/AssetLib/3MF/D3MFOpcPackage.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. diff --git a/code/AssetLib/3MF/XmlSerializer.cpp b/code/AssetLib/3MF/XmlSerializer.cpp index c771117283..a8330fae37 100644 --- a/code/AssetLib/3MF/XmlSerializer.cpp +++ b/code/AssetLib/3MF/XmlSerializer.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -49,16 +49,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Assimp { namespace D3MF { -static const int IdNotSet = -1; +static constexpr int IdNotSet = -1; namespace { -static const size_t ColRGBA_Len = 9; -static const size_t ColRGB_Len = 7; +static constexpr size_t ColRGBA_Len = 9; +static constexpr size_t ColRGB_Len = 7; // format of the color string: #RRGGBBAA or #RRGGBB (3MF Core chapter 5.1.1) -bool validateColorString(const char *color) { - const size_t len = strlen(color); +bool validateColorString(const std::string color) { + const size_t len = color.size(); if (ColRGBA_Len != len && ColRGB_Len != len) { return false; } @@ -75,7 +75,7 @@ aiFace ReadTriangle(XmlNode &node, int &texId0, int &texId1, int &texId2) { face.mIndices[1] = static_cast(std::atoi(node.attribute(XmlTag::v2).as_string())); face.mIndices[2] = static_cast(std::atoi(node.attribute(XmlTag::v3).as_string())); - texId0 = texId1 = texId2 = -1; + texId0 = texId1 = texId2 = IdNotSet; XmlParser::getIntAttribute(node, XmlTag::p1, texId0); XmlParser::getIntAttribute(node, XmlTag::p2, texId1); XmlParser::getIntAttribute(node, XmlTag::p3, texId2); @@ -157,8 +157,8 @@ aiMatrix4x4 parseTransformMatrix(const std::string& matrixStr) { return transformMatrix; } -bool parseColor(const char *color, aiColor4D &diffuse) { - if (nullptr == color) { +bool parseColor(const std::string &color, aiColor4D &diffuse) { + if (color.empty()) { return false; } @@ -178,7 +178,7 @@ bool parseColor(const char *color, aiColor4D &diffuse) { char b[3] = { color[5], color[6], '\0' }; diffuse.b = static_cast(strtol(b, nullptr, 16)) / ai_real(255.0); - const size_t len = strlen(color); + const size_t len = color.size(); if (ColRGB_Len == len) { return true; } @@ -199,11 +199,11 @@ void assignDiffuseColor(XmlNode &node, aiMaterial *mat) { } // namespace -XmlSerializer::XmlSerializer(XmlParser *xmlParser) : +XmlSerializer::XmlSerializer(XmlParser &xmlParser) : mResourcesDictionnary(), mMeshCount(0), mXmlParser(xmlParser) { - ai_assert(nullptr != xmlParser); + // empty } XmlSerializer::~XmlSerializer() { @@ -218,7 +218,7 @@ void XmlSerializer::ImportXml(aiScene *scene) { } scene->mRootNode = new aiNode(XmlTag::RootTag); - XmlNode node = mXmlParser->getRootNode().child(XmlTag::model); + XmlNode node = mXmlParser.getRootNode().child(XmlTag::model); if (node.empty()) { return; } @@ -236,6 +236,8 @@ void XmlSerializer::ImportXml(aiScene *scene) { ReadBaseMaterials(currentNode); } else if (currentNodeName == XmlTag::meta) { ReadMetadata(currentNode); + } else if (currentNodeName == XmlTag::colorgroup) { + ReadColorGroup(currentNode); } } StoreMaterialsInScene(scene); @@ -331,9 +333,49 @@ void XmlSerializer::ReadObject(XmlNode &node) { if (hasPid) { auto it = mResourcesDictionnary.find(pid); - if (hasPindex && it != mResourcesDictionnary.end() && it->second->getType() == ResourceType::RT_BaseMaterials) { - BaseMaterials *materials = static_cast(it->second); - mesh->mMaterialIndex = materials->mMaterialIndex[pindex]; + if (hasPindex && it != mResourcesDictionnary.end()) { + if (it->second->getType() == ResourceType::RT_BaseMaterials) { + BaseMaterials *materials = static_cast(it->second); + mesh->mMaterialIndex = materials->mMaterialIndex[pindex]; + } else if (it->second->getType() == ResourceType::RT_Texture2DGroup) { + Texture2DGroup *group = static_cast(it->second); + if (mesh->mTextureCoords[0] == nullptr) { + mesh->mNumUVComponents[0] = 2; + for (unsigned int i = 1; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) { + mesh->mNumUVComponents[i] = 0; + } + + const std::string name = ai_to_string(group->mTexId); + for (size_t i = 0; i < mMaterials.size(); ++i) { + if (name == mMaterials[i]->GetName().C_Str()) { + mesh->mMaterialIndex = static_cast(i); + } + } + + mesh->mTextureCoords[0] = new aiVector3D[mesh->mNumVertices]; + for (unsigned int vertex_idx = 0; vertex_idx < mesh->mNumVertices; vertex_idx++) { + mesh->mTextureCoords[0][vertex_idx] = + aiVector3D(group->mTex2dCoords[pindex].x, group->mTex2dCoords[pindex].y, 0.0f); + } + } else { + for (unsigned int vertex_idx = 0; vertex_idx < mesh->mNumVertices; vertex_idx++) { + if (mesh->mTextureCoords[0][vertex_idx].z < 0) { + // use default + mesh->mTextureCoords[0][vertex_idx] = + aiVector3D(group->mTex2dCoords[pindex].x, group->mTex2dCoords[pindex].y, 0.0f); + } + } + } + }else if (it->second->getType() == ResourceType::RT_ColorGroup) { + if (mesh->mColors[0] == nullptr) { + mesh->mColors[0] = new aiColor4D[mesh->mNumVertices]; + + ColorGroup *group = static_cast(it->second); + for (unsigned int vertex_idx = 0; vertex_idx < mesh->mNumVertices; vertex_idx++) { + mesh->mColors[0][vertex_idx] = group->mColors[pindex]; + } + } + } } } @@ -415,27 +457,36 @@ void XmlSerializer::ImportTriangles(XmlNode &node, aiMesh *mesh) { for (XmlNode ¤tNode : node.children()) { const std::string currentName = currentNode.name(); if (currentName == XmlTag::triangle) { - int pid = IdNotSet, p1 = IdNotSet; + int pid = IdNotSet; bool hasPid = getNodeAttribute(currentNode, D3MF::XmlTag::pid, pid); - bool hasP1 = getNodeAttribute(currentNode, D3MF::XmlTag::p1, p1); - int texId[3]; - Texture2DGroup *group = nullptr; - aiFace face = ReadTriangle(currentNode, texId[0], texId[1], texId[2]); - if (hasPid && hasP1) { + int pindex[3]; + aiFace face = ReadTriangle(currentNode, pindex[0], pindex[1], pindex[2]); + if (hasPid && (pindex[0] != IdNotSet || pindex[1] != IdNotSet || pindex[2] != IdNotSet)) { auto it = mResourcesDictionnary.find(pid); if (it != mResourcesDictionnary.end()) { if (it->second->getType() == ResourceType::RT_BaseMaterials) { BaseMaterials *baseMaterials = static_cast(it->second); - mesh->mMaterialIndex = baseMaterials->mMaterialIndex[p1]; + + auto update_material = [&](int idx) { + if (pindex[idx] != IdNotSet) { + mesh->mMaterialIndex = baseMaterials->mMaterialIndex[pindex[idx]]; + } + }; + + update_material(0); + update_material(1); + update_material(2); + } else if (it->second->getType() == ResourceType::RT_Texture2DGroup) { + // Load texture coordinates into mesh, when any + Texture2DGroup *group = static_cast(it->second); // fix bug if (mesh->mTextureCoords[0] == nullptr) { mesh->mNumUVComponents[0] = 2; for (unsigned int i = 1; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) { mesh->mNumUVComponents[i] = 0; } - group = static_cast(it->second); const std::string name = ai_to_string(group->mTexId); for (size_t i = 0; i < mMaterials.size(); ++i) { if (name == mMaterials[i]->GetName().C_Str()) { @@ -443,21 +494,44 @@ void XmlSerializer::ImportTriangles(XmlNode &node, aiMesh *mesh) { } } mesh->mTextureCoords[0] = new aiVector3D[mesh->mNumVertices]; + for (unsigned int vertex_index = 0; vertex_index < mesh->mNumVertices; vertex_index++) { + mesh->mTextureCoords[0][vertex_index].z = IdNotSet;//mark not set + } } + + auto update_texture = [&](int idx) { + if (pindex[idx] != IdNotSet) { + size_t vertex_index = face.mIndices[idx]; + mesh->mTextureCoords[0][vertex_index] = + aiVector3D(group->mTex2dCoords[pindex[idx]].x, group->mTex2dCoords[pindex[idx]].y, 0.0f); + } + }; + + update_texture(0); + update_texture(1); + update_texture(2); + + } else if (it->second->getType() == ResourceType::RT_ColorGroup) { + // Load vertex color into mesh, when any + ColorGroup *group = static_cast(it->second); + if (mesh->mColors[0] == nullptr) { + mesh->mColors[0] = new aiColor4D[mesh->mNumVertices]; + } + + auto update_color = [&](int idx) { + if (pindex[idx] != IdNotSet) { + size_t vertex_index = face.mIndices[idx]; + mesh->mColors[0][vertex_index] = group->mColors[pindex[idx]]; + } + }; + + update_color(0); + update_color(1); + update_color(2); } } } - // Load texture coordinates into mesh, when any - if (group != nullptr) { - size_t i0 = face.mIndices[0]; - size_t i1 = face.mIndices[1]; - size_t i2 = face.mIndices[2]; - mesh->mTextureCoords[0][i0] = aiVector3D(group->mTex2dCoords[texId[0]].x, group->mTex2dCoords[texId[0]].y, 0.0f); - mesh->mTextureCoords[0][i1] = aiVector3D(group->mTex2dCoords[texId[1]].x, group->mTex2dCoords[texId[1]].y, 0.0f); - mesh->mTextureCoords[0][i2] = aiVector3D(group->mTex2dCoords[texId[2]].x, group->mTex2dCoords[texId[2]].y, 0.0f); - } - faces.push_back(face); } } @@ -598,6 +672,38 @@ aiMaterial *XmlSerializer::readMaterialDef(XmlNode &node, unsigned int basemater return material; } +void XmlSerializer::ReadColor(XmlNode &node, ColorGroup *colorGroup) { + if (node.empty() || nullptr == colorGroup) { + return; + } + + for (XmlNode currentNode : node.children()) { + const std::string currentName = currentNode.name(); + if (currentName == XmlTag::color_item) { + const char *color = currentNode.attribute(XmlTag::color_value).as_string(); + aiColor4D color_value; + if (parseColor(color, color_value)) { + colorGroup->mColors.push_back(color_value); + } + } + } +} + +void XmlSerializer::ReadColorGroup(XmlNode &node) { + if (node.empty()) { + return; + } + + int id = IdNotSet; + if (!XmlParser::getIntAttribute(node, XmlTag::id, id)) { + return; + } + + ColorGroup *group = new ColorGroup(id); + ReadColor(node, group); + mResourcesDictionnary.insert(std::make_pair(id, group)); +} + void XmlSerializer::StoreMaterialsInScene(aiScene *scene) { if (nullptr == scene) { return; diff --git a/code/AssetLib/3MF/XmlSerializer.h b/code/AssetLib/3MF/XmlSerializer.h index 6cf6a70a91..f3944c2da4 100644 --- a/code/AssetLib/3MF/XmlSerializer.h +++ b/code/AssetLib/3MF/XmlSerializer.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -57,10 +57,12 @@ class D3MFOpcPackage; class Object; class Texture2DGroup; class EmbeddedTexture; +class ColorGroup; -class XmlSerializer { +/// @brief his class implements ther 3mf serialization. +class XmlSerializer final { public: - XmlSerializer(XmlParser *xmlParser); + explicit XmlSerializer(XmlParser &xmlParser); ~XmlSerializer(); void ImportXml(aiScene *scene); @@ -78,6 +80,8 @@ class XmlSerializer { void ReadTextureGroup(XmlNode &node); aiMaterial *readMaterialDef(XmlNode &node, unsigned int basematerialsId); void StoreMaterialsInScene(aiScene *scene); + void ReadColorGroup(XmlNode &node); + void ReadColor(XmlNode &node, ColorGroup *colorGroup); private: struct MetaEntry { @@ -89,7 +93,7 @@ class XmlSerializer { std::vector mMaterials; std::map mResourcesDictionnary; unsigned int mMeshCount; - XmlParser *mXmlParser; + XmlParser &mXmlParser; }; } // namespace D3MF diff --git a/code/AssetLib/AC/ACLoader.cpp b/code/AssetLib/AC/ACLoader.cpp index e93fba5f0f..df86ce92ce 100644 --- a/code/AssetLib/AC/ACLoader.cpp +++ b/code/AssetLib/AC/ACLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -60,9 +60,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -using namespace Assimp; +namespace Assimp { -static const aiImporterDesc desc = { +static constexpr aiImporterDesc desc = { "AC3D Importer", "", "", @@ -75,10 +75,12 @@ static const aiImporterDesc desc = { "ac acc ac3d" }; +static constexpr auto ACDoubleSidedFlag = 0x20; + // ------------------------------------------------------------------------------------------------ // skip to the next token -inline const char *AcSkipToNextToken(const char *buffer) { - if (!SkipSpaces(&buffer)) { +inline const char *AcSkipToNextToken(const char *buffer, const char *end) { + if (!SkipSpaces(&buffer, end)) { ASSIMP_LOG_ERROR("AC3D: Unexpected EOF/EOL"); } return buffer; @@ -86,13 +88,13 @@ inline const char *AcSkipToNextToken(const char *buffer) { // ------------------------------------------------------------------------------------------------ // read a string (may be enclosed in double quotation marks). buffer must point to " -inline const char *AcGetString(const char *buffer, std::string &out) { +inline const char *AcGetString(const char *buffer, const char *end, std::string &out) { if (*buffer == '\0') { throw DeadlyImportError("AC3D: Unexpected EOF in string"); } ++buffer; const char *sz = buffer; - while ('\"' != *buffer) { + while ('\"' != *buffer && buffer != end) { if (IsLineEnd(*buffer)) { ASSIMP_LOG_ERROR("AC3D: Unexpected EOF/EOL in string"); out = "ERROR"; @@ -112,8 +114,8 @@ inline const char *AcGetString(const char *buffer, std::string &out) { // ------------------------------------------------------------------------------------------------ // read 1 to n floats prefixed with an optional predefined identifier template -inline const char *TAcCheckedLoadFloatArray(const char *buffer, const char *name, size_t name_length, size_t num, T *out) { - buffer = AcSkipToNextToken(buffer); +inline const char *TAcCheckedLoadFloatArray(const char *buffer, const char *end, const char *name, size_t name_length, size_t num, T *out) { + buffer = AcSkipToNextToken(buffer, end); if (0 != name_length) { if (0 != strncmp(buffer, name, name_length) || !IsSpace(buffer[name_length])) { ASSIMP_LOG_ERROR("AC3D: Unexpected token. ", name, " was expected."); @@ -122,17 +124,41 @@ inline const char *TAcCheckedLoadFloatArray(const char *buffer, const char *name buffer += name_length + 1; } for (unsigned int _i = 0; _i < num; ++_i) { - buffer = AcSkipToNextToken(buffer); - buffer = fast_atoreal_move(buffer, ((float *)out)[_i]); + buffer = AcSkipToNextToken(buffer, end); + buffer = fast_atoreal_move(buffer, ((float *)out)[_i]); } return buffer; } +// ------------------------------------------------------------------------------------------------ +// Reverses vertex indices in a face. +static void flipWindingOrder(aiFace &f) { + std::reverse(f.mIndices, f.mIndices + f.mNumIndices); +} + +// ------------------------------------------------------------------------------------------------ +// Duplicates a face and inverts it. Also duplicates all vertices (so the new face gets its own +// set of normals and isn’t smoothed against the original). +static void buildBacksideOfFace(const aiFace &origFace, aiFace *&outFaces, aiVector3D *&outVertices, const aiVector3D *allVertices, + aiVector3D *&outUV, const aiVector3D *allUV, unsigned &curIdx) { + auto &newFace = *outFaces++; + newFace = origFace; + flipWindingOrder(newFace); + for (unsigned f = 0; f < newFace.mNumIndices; ++f) { + *outVertices++ = allVertices[newFace.mIndices[f]]; + if (outUV) { + *outUV = allUV[newFace.mIndices[f]]; + outUV++; + } + newFace.mIndices[f] = curIdx++; + } +} + // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer AC3DImporter::AC3DImporter() : - buffer(), + mBuffer(), configSplitBFCull(), configEvalSubdivision(), mNumMeshes(), @@ -144,14 +170,10 @@ AC3DImporter::AC3DImporter() : // nothing to be done here } -// ------------------------------------------------------------------------------------------------ -// Destructor, private as well -AC3DImporter::~AC3DImporter() = default; - // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. bool AC3DImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool /*checkSig*/) const { - static const uint32_t tokens[] = { AI_MAKE_MAGIC("AC3D") }; + static constexpr uint32_t tokens[] = { AI_MAKE_MAGIC("AC3D") }; return CheckMagicToken(pIOHandler, pFile, tokens, AI_COUNT_OF(tokens)); } @@ -164,17 +186,18 @@ const aiImporterDesc *AC3DImporter::GetInfo() const { // ------------------------------------------------------------------------------------------------ // Get a pointer to the next line from the file bool AC3DImporter::GetNextLine() { - SkipLine(&buffer); - return SkipSpaces(&buffer); + SkipLine(&mBuffer.data, mBuffer.end); + return SkipSpaces(&mBuffer.data, mBuffer.end); } // ------------------------------------------------------------------------------------------------ // Parse an object section in an AC file -void AC3DImporter::LoadObjectSection(std::vector &objects) { - if (!TokenMatch(buffer, "OBJECT", 6)) - return; +bool AC3DImporter::LoadObjectSection(std::vector &objects) { + if (!TokenMatch(mBuffer.data, "OBJECT", 6)) { + return false; + } - SkipSpaces(&buffer); + SkipSpaces(&mBuffer.data, mBuffer.end); ++mNumMeshes; @@ -182,7 +205,7 @@ void AC3DImporter::LoadObjectSection(std::vector &objects) { Object &obj = objects.back(); aiLight *light = nullptr; - if (!ASSIMP_strincmp(buffer, "light", 5)) { + if (!ASSIMP_strincmp(mBuffer.data, "light", 5)) { // This is a light source. Add it to the list mLights->push_back(light = new aiLight()); @@ -192,68 +215,73 @@ void AC3DImporter::LoadObjectSection(std::vector &objects) { light->mAttenuationConstant = 1.f; // Generate a default name for both the light source and the node - // FIXME - what's the right way to print a size_t? Is 'zu' universally available? stick with the safe version. - light->mName.length = ::ai_snprintf(light->mName.data, MAXLEN, "ACLight_%i", static_cast(mLights->size()) - 1); + light->mName.length = ::ai_snprintf(light->mName.data, AI_MAXLEN, "ACLight_%i", static_cast(mLights->size()) - 1); obj.name = std::string(light->mName.data); ASSIMP_LOG_VERBOSE_DEBUG("AC3D: Light source encountered"); obj.type = Object::Light; - } else if (!ASSIMP_strincmp(buffer, "group", 5)) { + } else if (!ASSIMP_strincmp(mBuffer.data, "group", 5)) { obj.type = Object::Group; - } else if (!ASSIMP_strincmp(buffer, "world", 5)) { + } else if (!ASSIMP_strincmp(mBuffer.data, "world", 5)) { obj.type = Object::World; - } else + } else { obj.type = Object::Poly; + } + while (GetNextLine()) { - if (TokenMatch(buffer, "kids", 4)) { - SkipSpaces(&buffer); - unsigned int num = strtoul10(buffer, &buffer); + if (TokenMatch(mBuffer.data, "kids", 4)) { + SkipSpaces(&mBuffer.data, mBuffer.end); + unsigned int num = strtoul10(mBuffer.data, &mBuffer.data); GetNextLine(); if (num) { // load the children of this object recursively obj.children.reserve(num); - for (unsigned int i = 0; i < num; ++i) - LoadObjectSection(obj.children); + for (unsigned int i = 0; i < num; ++i) { + if (!LoadObjectSection(obj.children)) { + ASSIMP_LOG_WARN("AC3D: wrong number of kids"); + break; + } + } } - return; - } else if (TokenMatch(buffer, "name", 4)) { - SkipSpaces(&buffer); - buffer = AcGetString(buffer, obj.name); + return true; + } else if (TokenMatch(mBuffer.data, "name", 4)) { + SkipSpaces(&mBuffer.data, mBuffer.data); + mBuffer.data = AcGetString(mBuffer.data, mBuffer.end, obj.name); // If this is a light source, we'll also need to store // the name of the node in it. if (light) { light->mName.Set(obj.name); } - } else if (TokenMatch(buffer, "texture", 7)) { - SkipSpaces(&buffer); + } else if (TokenMatch(mBuffer.data, "texture", 7)) { + SkipSpaces(&mBuffer.data, mBuffer.end); std::string texture; - buffer = AcGetString(buffer, texture); + mBuffer.data = AcGetString(mBuffer.data, mBuffer.end, texture); obj.textures.push_back(texture); - } else if (TokenMatch(buffer, "texrep", 6)) { - SkipSpaces(&buffer); - buffer = TAcCheckedLoadFloatArray(buffer, "", 0, 2, &obj.texRepeat); + } else if (TokenMatch(mBuffer.data, "texrep", 6)) { + SkipSpaces(&mBuffer.data, mBuffer.end); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "", 0, 2, &obj.texRepeat); if (!obj.texRepeat.x || !obj.texRepeat.y) obj.texRepeat = aiVector2D(1.f, 1.f); - } else if (TokenMatch(buffer, "texoff", 6)) { - SkipSpaces(&buffer); - buffer = TAcCheckedLoadFloatArray(buffer, "", 0, 2, &obj.texOffset); - } else if (TokenMatch(buffer, "rot", 3)) { - SkipSpaces(&buffer); - buffer = TAcCheckedLoadFloatArray(buffer, "", 0, 9, &obj.rotation); - } else if (TokenMatch(buffer, "loc", 3)) { - SkipSpaces(&buffer); - buffer = TAcCheckedLoadFloatArray(buffer, "", 0, 3, &obj.translation); - } else if (TokenMatch(buffer, "subdiv", 6)) { - SkipSpaces(&buffer); - obj.subDiv = strtoul10(buffer, &buffer); - } else if (TokenMatch(buffer, "crease", 6)) { - SkipSpaces(&buffer); - obj.crease = fast_atof(buffer); - } else if (TokenMatch(buffer, "numvert", 7)) { - SkipSpaces(&buffer); - - unsigned int t = strtoul10(buffer, &buffer); + } else if (TokenMatch(mBuffer.data, "texoff", 6)) { + SkipSpaces(&mBuffer.data, mBuffer.end); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "", 0, 2, &obj.texOffset); + } else if (TokenMatch(mBuffer.data, "rot", 3)) { + SkipSpaces(&mBuffer.data, mBuffer.end); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "", 0, 9, &obj.rotation); + } else if (TokenMatch(mBuffer.data, "loc", 3)) { + SkipSpaces(&mBuffer.data, mBuffer.end); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "", 0, 3, &obj.translation); + } else if (TokenMatch(mBuffer.data, "subdiv", 6)) { + SkipSpaces(&mBuffer.data, mBuffer.end); + obj.subDiv = strtoul10(mBuffer.data, &mBuffer.data); + } else if (TokenMatch(mBuffer.data, "crease", 6)) { + SkipSpaces(&mBuffer.data, mBuffer.end); + obj.crease = fast_atof(mBuffer.data); + } else if (TokenMatch(mBuffer.data, "numvert", 7)) { + SkipSpaces(&mBuffer.data, mBuffer.end); + + unsigned int t = strtoul10(mBuffer.data, &mBuffer.data); if (t >= AI_MAX_ALLOC(aiVector3D)) { throw DeadlyImportError("AC3D: Too many vertices, would run out of memory"); } @@ -262,59 +290,59 @@ void AC3DImporter::LoadObjectSection(std::vector &objects) { if (!GetNextLine()) { ASSIMP_LOG_ERROR("AC3D: Unexpected EOF: not all vertices have been parsed yet"); break; - } else if (!IsNumeric(*buffer)) { + } else if (!IsNumeric(*mBuffer.data)) { ASSIMP_LOG_ERROR("AC3D: Unexpected token: not all vertices have been parsed yet"); - --buffer; // make sure the line is processed a second time + --mBuffer.data; // make sure the line is processed a second time break; } obj.vertices.emplace_back(); aiVector3D &v = obj.vertices.back(); - buffer = TAcCheckedLoadFloatArray(buffer, "", 0, 3, &v.x); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "", 0, 3, &v.x); } - } else if (TokenMatch(buffer, "numsurf", 7)) { - SkipSpaces(&buffer); + } else if (TokenMatch(mBuffer.data, "numsurf", 7)) { + SkipSpaces(&mBuffer.data, mBuffer.end); bool Q3DWorkAround = false; - const unsigned int t = strtoul10(buffer, &buffer); + const unsigned int t = strtoul10(mBuffer.data, &mBuffer.data); obj.surfaces.reserve(t); for (unsigned int i = 0; i < t; ++i) { GetNextLine(); - if (!TokenMatch(buffer, "SURF", 4)) { + if (!TokenMatch(mBuffer.data, "SURF", 4)) { // FIX: this can occur for some files - Quick 3D for // example writes no surf chunks if (!Q3DWorkAround) { ASSIMP_LOG_WARN("AC3D: SURF token was expected"); ASSIMP_LOG_VERBOSE_DEBUG("Continuing with Quick3D Workaround enabled"); } - --buffer; // make sure the line is processed a second time + --mBuffer.data; // make sure the line is processed a second time // break; --- see fix notes above Q3DWorkAround = true; } - SkipSpaces(&buffer); + SkipSpaces(&mBuffer.data, mBuffer.end); obj.surfaces.emplace_back(); Surface &surf = obj.surfaces.back(); - surf.flags = strtoul_cppstyle(buffer); + surf.flags = strtoul_cppstyle(mBuffer.data); while (true) { if (!GetNextLine()) { throw DeadlyImportError("AC3D: Unexpected EOF: surface is incomplete"); } - if (TokenMatch(buffer, "mat", 3)) { - SkipSpaces(&buffer); - surf.mat = strtoul10(buffer); - } else if (TokenMatch(buffer, "refs", 4)) { + if (TokenMatch(mBuffer.data, "mat", 3)) { + SkipSpaces(&mBuffer.data, mBuffer.end); + surf.mat = strtoul10(mBuffer.data); + } else if (TokenMatch(mBuffer.data, "refs", 4)) { // --- see fix notes above if (Q3DWorkAround) { if (!surf.entries.empty()) { - buffer -= 6; + mBuffer.data -= 6; break; } } - SkipSpaces(&buffer); - const unsigned int m = strtoul10(buffer); + SkipSpaces(&mBuffer.data, mBuffer.end); + const unsigned int m = strtoul10(mBuffer.data); surf.entries.reserve(m); obj.numRefs += m; @@ -327,12 +355,12 @@ void AC3DImporter::LoadObjectSection(std::vector &objects) { surf.entries.emplace_back(); Surface::SurfaceEntry &entry = surf.entries.back(); - entry.first = strtoul10(buffer, &buffer); - SkipSpaces(&buffer); - buffer = TAcCheckedLoadFloatArray(buffer, "", 0, 2, &entry.second); + entry.first = strtoul10(mBuffer.data, &mBuffer.data); + SkipSpaces(&mBuffer.data, mBuffer.end); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "", 0, 2, &entry.second); } } else { - --buffer; // make sure the line is processed a second time + --mBuffer.data; // make sure the line is processed a second time break; } } @@ -340,6 +368,8 @@ void AC3DImporter::LoadObjectSection(std::vector &objects) { } } ASSIMP_LOG_ERROR("AC3D: Unexpected EOF: \'kids\' line was expected"); + + return false; } // ------------------------------------------------------------------------------------------------ @@ -445,8 +475,10 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object, idx = 0; } if ((*it).entries.empty()) { - ASSIMP_LOG_WARN("AC3D: surface her zero vertex references"); + ASSIMP_LOG_WARN("AC3D: surface has zero vertex references"); } + const bool isDoubleSided = ACDoubleSidedFlag == (it->flags & ACDoubleSidedFlag); + const int doubleSidedFactor = isDoubleSided ? 2 : 1; // validate all vertex indices to make sure we won't crash here for (it2 = (*it).entries.begin(), @@ -463,22 +495,21 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object, } switch ((*it).GetType()) { - // closed line - case Surface::ClosedLine: - needMat[idx].first += (unsigned int)(*it).entries.size(); - needMat[idx].second += (unsigned int)(*it).entries.size() << 1u; + case Surface::ClosedLine: // closed line + needMat[idx].first += static_cast((*it).entries.size()); + needMat[idx].second += static_cast((*it).entries.size() << 1u); break; // unclosed line case Surface::OpenLine: - needMat[idx].first += (unsigned int)(*it).entries.size() - 1; - needMat[idx].second += ((unsigned int)(*it).entries.size() - 1) << 1u; + needMat[idx].first += static_cast((*it).entries.size() - 1); + needMat[idx].second += static_cast(((*it).entries.size() - 1) << 1u); break; // triangle strip case Surface::TriangleStrip: - needMat[idx].first += (unsigned int)(*it).entries.size() - 2; - needMat[idx].second += ((unsigned int)(*it).entries.size() - 2) * 3; + needMat[idx].first += static_cast(it->entries.size() - 2) * doubleSidedFactor; + needMat[idx].second += static_cast(it->entries.size() - 2) * 3 * doubleSidedFactor; break; default: @@ -491,8 +522,8 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object, case Surface::Polygon: // the number of faces increments by one, the number // of vertices by surface.numref. - needMat[idx].first++; - needMat[idx].second += (unsigned int)(*it).entries.size(); + needMat[idx].first += doubleSidedFactor; + needMat[idx].second += static_cast(it->entries.size()) * doubleSidedFactor; }; } unsigned int *pip = node->mMeshes = new unsigned int[node->mNumMeshes]; @@ -542,6 +573,7 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object, for (it = object.surfaces.begin(); it != end; ++it) { if (mat == (*it).mat) { const Surface &src = *it; + const bool isDoubleSided = ACDoubleSidedFlag == (src.flags & ACDoubleSidedFlag); // closed polygon uint8_t type = (*it).GetType(); @@ -567,20 +599,17 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object, ++uv; } } + if(isDoubleSided) // Need a backface? + buildBacksideOfFace(faces[-1], faces, vertices, mesh->mVertices, uv, mesh->mTextureCoords[0], cur); } } else if (type == Surface::TriangleStrip) { for (unsigned int i = 0; i < (unsigned int)src.entries.size() - 2; ++i) { const Surface::SurfaceEntry &entry1 = src.entries[i]; const Surface::SurfaceEntry &entry2 = src.entries[i + 1]; const Surface::SurfaceEntry &entry3 = src.entries[i + 2]; - - // skip degenerate triangles - if (object.vertices[entry1.first] == object.vertices[entry2.first] || - object.vertices[entry1.first] == object.vertices[entry3.first] || - object.vertices[entry2.first] == object.vertices[entry3.first]) { - mesh->mNumFaces--; - mesh->mNumVertices -= 3; - continue; + const unsigned int verticesNeeded = isDoubleSided ? 6 : 3; + if (static_cast(vertices - mesh->mVertices) + verticesNeeded > mesh->mNumVertices) { + throw DeadlyImportError("AC3D: Invalid number of vertices"); } aiFace &face = *faces++; @@ -625,6 +654,8 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object, uv->y = entry3.second.y; ++uv; } + if(isDoubleSided) // Need a backface? + buildBacksideOfFace(faces[-1], faces, vertices, mesh->mVertices, uv, mesh->mTextureCoords[0], cur); } } else { @@ -634,6 +665,10 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object, unsigned int tmp = (unsigned int)(*it).entries.size(); if (Surface::OpenLine == type) --tmp; for (unsigned int m = 0; m < tmp; ++m) { + if (static_cast(vertices - mesh->mVertices) + 2 > mesh->mNumVertices) { + throw DeadlyImportError("AC3D: Invalid number of vertices"); + } + aiFace &face = *faces++; face.mNumIndices = 2; @@ -701,18 +736,18 @@ aiNode *AC3DImporter::ConvertObjectSection(Object &object, // generate a name depending on the type of the node switch (object.type) { case Object::Group: - node->mName.length = ::ai_snprintf(node->mName.data, MAXLEN, "ACGroup_%i", mGroupsCounter++); + node->mName.length = ::ai_snprintf(node->mName.data, AI_MAXLEN, "ACGroup_%i", mGroupsCounter++); break; case Object::Poly: - node->mName.length = ::ai_snprintf(node->mName.data, MAXLEN, "ACPoly_%i", mPolysCounter++); + node->mName.length = ::ai_snprintf(node->mName.data, AI_MAXLEN, "ACPoly_%i", mPolysCounter++); break; case Object::Light: - node->mName.length = ::ai_snprintf(node->mName.data, MAXLEN, "ACLight_%i", mLightsCounter++); + node->mName.length = ::ai_snprintf(node->mName.data, AI_MAXLEN, "ACLight_%i", mLightsCounter++); break; // there shouldn't be more than one world, but we don't care case Object::World: - node->mName.length = ::ai_snprintf(node->mName.data, MAXLEN, "ACWorld_%i", mWorldsCounter++); + node->mName.length = ::ai_snprintf(node->mName.data, AI_MAXLEN, "ACWorld_%i", mWorldsCounter++); break; } } @@ -760,17 +795,18 @@ void AC3DImporter::InternReadFile(const std::string &pFile, std::vector mBuffer2; TextFileToBuffer(file.get(), mBuffer2); - buffer = &mBuffer2[0]; + mBuffer.data = &mBuffer2[0]; + mBuffer.end = &mBuffer2[0] + mBuffer2.size(); mNumMeshes = 0; mLightsCounter = mPolysCounter = mWorldsCounter = mGroupsCounter = 0; - if (::strncmp(buffer, "AC3D", 4)) { + if (::strncmp(mBuffer.data, "AC3D", 4)) { throw DeadlyImportError("AC3D: No valid AC3D file, magic sequence not found"); } // print the file format version to the console - unsigned int version = HexDigitToDecimal(buffer[4]); + unsigned int version = HexDigitToDecimal(mBuffer.data[4]); char msg[3]; ASSIMP_itoa10(msg, 3, version); ASSIMP_LOG_INFO("AC3D file format version: ", msg); @@ -785,30 +821,31 @@ void AC3DImporter::InternReadFile(const std::string &pFile, mLights = &lights; while (GetNextLine()) { - if (TokenMatch(buffer, "MATERIAL", 8)) { + if (TokenMatch(mBuffer.data, "MATERIAL", 8)) { materials.emplace_back(); Material &mat = materials.back(); // manually parse the material ... sscanf would use the buldin atof ... // Format: (name) rgb %f %f %f amb %f %f %f emis %f %f %f spec %f %f %f shi %d trans %f - buffer = AcSkipToNextToken(buffer); - if ('\"' == *buffer) { - buffer = AcGetString(buffer, mat.name); - buffer = AcSkipToNextToken(buffer); + mBuffer.data = AcSkipToNextToken(mBuffer.data, mBuffer.end); + if ('\"' == *mBuffer.data) { + mBuffer.data = AcGetString(mBuffer.data, mBuffer.end, mat.name); + mBuffer.data = AcSkipToNextToken(mBuffer.data, mBuffer.end); } - buffer = TAcCheckedLoadFloatArray(buffer, "rgb", 3, 3, &mat.rgb); - buffer = TAcCheckedLoadFloatArray(buffer, "amb", 3, 3, &mat.amb); - buffer = TAcCheckedLoadFloatArray(buffer, "emis", 4, 3, &mat.emis); - buffer = TAcCheckedLoadFloatArray(buffer, "spec", 4, 3, &mat.spec); - buffer = TAcCheckedLoadFloatArray(buffer, "shi", 3, 1, &mat.shin); - buffer = TAcCheckedLoadFloatArray(buffer, "trans", 5, 1, &mat.trans); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "rgb", 3, 3, &mat.rgb); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "amb", 3, 3, &mat.amb); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "emis", 4, 3, &mat.emis); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "spec", 4, 3, &mat.spec); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "shi", 3, 1, &mat.shin); + mBuffer.data = TAcCheckedLoadFloatArray(mBuffer.data, mBuffer.end, "trans", 5, 1, &mat.trans); + } else { + LoadObjectSection(rootObjects); } - LoadObjectSection(rootObjects); } - if (rootObjects.empty() || !mNumMeshes) { + if (rootObjects.empty() || mNumMeshes == 0u) { throw DeadlyImportError("AC3D: No meshes have been loaded"); } if (materials.empty()) { @@ -824,7 +861,7 @@ void AC3DImporter::InternReadFile(const std::string &pFile, materials.reserve(mNumMeshes); // generate a dummy root if there are multiple objects on the top layer - Object *root; + Object *root = nullptr; if (1 == rootObjects.size()) root = &rootObjects[0]; else { @@ -837,7 +874,7 @@ void AC3DImporter::InternReadFile(const std::string &pFile, delete root; } - if (!::strncmp(pScene->mRootNode->mName.data, "Node", 4)) { + if (::strncmp(pScene->mRootNode->mName.data, "Node", 4) == 0) { pScene->mRootNode->mName.Set(""); } @@ -856,10 +893,12 @@ void AC3DImporter::InternReadFile(const std::string &pFile, // copy lights pScene->mNumLights = (unsigned int)lights.size(); - if (lights.size()) { + if (!lights.empty()) { pScene->mLights = new aiLight *[lights.size()]; ::memcpy(pScene->mLights, &lights[0], lights.size() * sizeof(void *)); } } +} // namespace Assimp + #endif //!defined ASSIMP_BUILD_NO_AC_IMPORTER diff --git a/code/AssetLib/AC/ACLoader.h b/code/AssetLib/AC/ACLoader.h index 7f8dfd03c9..84222c2d5e 100644 --- a/code/AssetLib/AC/ACLoader.h +++ b/code/AssetLib/AC/ACLoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -60,10 +60,10 @@ namespace Assimp { // --------------------------------------------------------------------------- /** AC3D (*.ac) importer class */ -class AC3DImporter : public BaseImporter { +class AC3DImporter final : public BaseImporter { public: AC3DImporter(); - ~AC3DImporter() override; + ~AC3DImporter() override = default; // Represents an AC3D material struct Material { @@ -103,7 +103,7 @@ class AC3DImporter : public BaseImporter { unsigned int mat, flags; - typedef std::pair SurfaceEntry; + using SurfaceEntry = std::pair; std::vector entries; // Type is low nibble of flags @@ -216,7 +216,7 @@ class AC3DImporter : public BaseImporter { * load subobjects, the method returns after a 'kids 0' was * encountered. * @objects List of output objects*/ - void LoadObjectSection(std::vector &objects); + bool LoadObjectSection(std::vector &objects); // ------------------------------------------------------------------- /** Convert all objects into meshes and nodes. @@ -242,7 +242,7 @@ class AC3DImporter : public BaseImporter { private: // points to the next data line - const char *buffer; + aiBuffer mBuffer; // Configuration option: if enabled, up to two meshes // are generated per material: those faces who have diff --git a/code/AssetLib/AMF/AMFImporter.cpp b/code/AssetLib/AMF/AMFImporter.cpp index ff581b492d..eb531f9414 100644 --- a/code/AssetLib/AMF/AMFImporter.cpp +++ b/code/AssetLib/AMF/AMFImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Assimp { -const aiImporterDesc AMFImporter::Description = { +static constexpr aiImporterDesc Description = { "Additive manufacturing file format(AMF) Importer", "smalcom", "", @@ -178,28 +178,6 @@ bool AMFImporter::XML_SearchNode(const std::string &nodeName) { return nullptr != mXmlParser->findNode(nodeName); } -void AMFImporter::ParseHelper_FixTruncatedFloatString(const char *pInStr, std::string &pOutString) { - size_t instr_len; - - pOutString.clear(); - instr_len = strlen(pInStr); - if (!instr_len) return; - - pOutString.reserve(instr_len * 3 / 2); - // check and correct floats in format ".x". Must be "x.y". - if (pInStr[0] == '.') pOutString.push_back('0'); - - pOutString.push_back(pInStr[0]); - for (size_t ci = 1; ci < instr_len; ci++) { - if ((pInStr[ci] == '.') && ((pInStr[ci - 1] == ' ') || (pInStr[ci - 1] == '-') || (pInStr[ci - 1] == '+') || (pInStr[ci - 1] == '\t'))) { - pOutString.push_back('0'); - pOutString.push_back('.'); - } else { - pOutString.push_back(pInStr[ci]); - } - } -} - static bool ParseHelper_Decode_Base64_IsBase64(const char pChar) { return (isalnum((unsigned char)pChar) || (pChar == '+') || (pChar == '/')); } @@ -213,7 +191,10 @@ void AMFImporter::ParseHelper_Decode_Base64(const std::string &pInputBase64, std uint8_t arr4[4], arr3[3]; // check input data - if (pInputBase64.size() % 4) throw DeadlyImportError("Base64-encoded data must have size multiply of four."); + if (pInputBase64.size() % 4) { + throw DeadlyImportError("Base64-encoded data must have size multiply of four."); + } + // prepare output place pOutputData.clear(); pOutputData.reserve(pInputBase64.size() / 4 * 3); @@ -346,8 +327,7 @@ void AMFImporter::ParseNode_Root() { // Multi elements - Yes. // Parent element - . void AMFImporter::ParseNode_Constellation(XmlNode &node) { - std::string id; - id = node.attribute("id").as_string(); + std::string id = node.attribute("id").as_string(); // create and if needed - define new grouping object. AMFNodeElementBase *ne = new AMFConstellation(mNodeElement_Cur); @@ -403,17 +383,17 @@ void AMFImporter::ParseNode_Instance(XmlNode &node) { for (auto ¤tNode : node.children()) { const std::string ¤tName = currentNode.name(); if (currentName == "deltax") { - XmlParser::getValueAsFloat(currentNode, als.Delta.x); + XmlParser::getValueAsReal(currentNode, als.Delta.x); } else if (currentName == "deltay") { - XmlParser::getValueAsFloat(currentNode, als.Delta.y); + XmlParser::getValueAsReal(currentNode, als.Delta.y); } else if (currentName == "deltaz") { - XmlParser::getValueAsFloat(currentNode, als.Delta.z); + XmlParser::getValueAsReal(currentNode, als.Delta.z); } else if (currentName == "rx") { - XmlParser::getValueAsFloat(currentNode, als.Delta.x); + XmlParser::getValueAsReal(currentNode, als.Delta.x); } else if (currentName == "ry") { - XmlParser::getValueAsFloat(currentNode, als.Delta.y); + XmlParser::getValueAsReal(currentNode, als.Delta.y); } else if (currentName == "rz") { - XmlParser::getValueAsFloat(currentNode, als.Delta.z); + XmlParser::getValueAsReal(currentNode, als.Delta.z); } } ParseHelper_Node_Exit(); @@ -493,7 +473,7 @@ void AMFImporter::ParseNode_Metadata(XmlNode &node) { // read attribute ne = new AMFMetadata(mNodeElement_Cur); - ((AMFMetadata *)ne)->Type = type; + ((AMFMetadata *)ne)->MetaType = type; ((AMFMetadata *)ne)->Value = value; mNodeElement_Cur->Child.push_back(ne); // Add element to child list of current element mNodeElement_List.push_back(ne); // and to node element list because its a new object in graph. diff --git a/code/AssetLib/AMF/AMFImporter.hpp b/code/AssetLib/AMF/AMFImporter.hpp index 27f7330435..7a0a56ab2d 100644 --- a/code/AssetLib/AMF/AMFImporter.hpp +++ b/code/AssetLib/AMF/AMFImporter.hpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -97,9 +97,13 @@ namespace Assimp { /// new - and children , , , , , /// old - and children , , , , , /// -class AMFImporter : public BaseImporter { -private: - struct SPP_Material; // forward declaration +class AMFImporter final : public BaseImporter { + using AMFMetaDataArray = std::vector; + using MeshArray = std::vector; + using NodeArray = std::vector; + +public: + struct SPP_Material; /// Data type for post-processing step. More suitable container for part of material's composition. struct SPP_Composite { @@ -107,7 +111,22 @@ class AMFImporter : public BaseImporter { std::string Formula; ///< Formula for calculating ratio of \ref Material. }; - /// \struct SPP_Material + /// Data type for post-processing step. More suitable container for texture. + struct SPP_Texture { + std::string ID; + size_t Width, Height, Depth; + bool Tiled; + char FormatHint[9]; // 8 for string + 1 for terminator. + uint8_t *Data; + }; + + /// Data type for post-processing step. Contain face data. + struct SComplexFace { + aiFace Face; ///< Face vertices. + const AMFColor *Color; ///< Face color. Equal to nullptr if color is not set for the face. + const AMFTexMap *TexMap; ///< Face texture mapping data. Equal to nullptr if texture mapping is not set for the face. + }; + /// Data type for post-processing step. More suitable container for material. struct SPP_Material { std::string ID; ///< Material ID. @@ -123,26 +142,36 @@ class AMFImporter : public BaseImporter { aiColor4D GetColor(const float pX, const float pY, const float pZ) const; }; - /// Data type for post-processing step. More suitable container for texture. - struct SPP_Texture { - std::string ID; - size_t Width, Height, Depth; - bool Tiled; - char FormatHint[9]; // 8 for string + 1 for terminator. - uint8_t *Data; - }; + /// Default constructor. + AMFImporter() AI_NO_EXCEPT; - /// Data type for post-processing step. Contain face data. - struct SComplexFace { - aiFace Face; ///< Face vertices. - const AMFColor *Color; ///< Face color. Equal to nullptr if color is not set for the face. - const AMFTexMap *TexMap; ///< Face texture mapping data. Equal to nullptr if texture mapping is not set for the face. - }; + /// Default destructor. + ~AMFImporter() override; - using AMFMetaDataArray = std::vector; - using MeshArray = std::vector; - using NodeArray = std::vector; + /// Parse AMF file and fill scene graph. The function has no return value. Result can be found by analyzing the generated graph. + /// Also exception can be thrown if trouble will found. + /// \param [in] pFile - name of file to be parsed. + /// \param [in] pIOHandler - pointer to IO helper object. + void ParseFile(const std::string &pFile, IOSystem *pIOHandler); + void ParseHelper_Node_Enter(AMFNodeElementBase *child); + void ParseHelper_Node_Exit(); + bool CanRead(const std::string &pFile, IOSystem *pIOHandler, bool pCheckSig) const override; + void InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) override; + const aiImporterDesc *GetInfo() const override; + bool Find_NodeElement(const std::string &pID, const AMFNodeElementBase::EType pType, AMFNodeElementBase **pNodeElement) const; + bool Find_ConvertedNode(const std::string &pID, NodeArray &nodeArray, aiNode **pNode) const; + bool Find_ConvertedMaterial(const std::string &pID, const SPP_Material **pConvertedMaterial) const; + AI_WONT_RETURN void Throw_CloseNotFound(const std::string &nodeName) AI_WONT_RETURN_SUFFIX; + AI_WONT_RETURN void Throw_IncorrectAttr(const std::string &nodeName, const std::string &pAttrName) AI_WONT_RETURN_SUFFIX; + AI_WONT_RETURN void Throw_IncorrectAttrValue(const std::string &nodeName, const std::string &pAttrName) AI_WONT_RETURN_SUFFIX; + AI_WONT_RETURN void Throw_MoreThanOnceDefined(const std::string &nodeName, const std::string &pNodeType, const std::string &pDescription) AI_WONT_RETURN_SUFFIX; + AI_WONT_RETURN void Throw_ID_NotFound(const std::string &pID) const AI_WONT_RETURN_SUFFIX; + void XML_CheckNode_MustHaveChildren(pugi::xml_node &node); + bool XML_SearchNode(const std::string &nodeName); + AMFImporter(const AMFImporter &pScene) = delete; + AMFImporter &operator=(const AMFImporter &pScene) = delete; +private: /// Clear all temporary data. void Clear(); @@ -262,40 +291,9 @@ class AMFImporter : public BaseImporter { /// \param [in] pUseOldName - if true then use old name of node(and children) - , instead of new name - . void ParseNode_TexMap(XmlNode &node, const bool pUseOldName = false); -public: - /// Default constructor. - AMFImporter() AI_NO_EXCEPT; - /// Default destructor. - ~AMFImporter() override; - - /// Parse AMF file and fill scene graph. The function has no return value. Result can be found by analyzing the generated graph. - /// Also exception can be thrown if trouble will found. - /// \param [in] pFile - name of file to be parsed. - /// \param [in] pIOHandler - pointer to IO helper object. - void ParseFile(const std::string &pFile, IOSystem *pIOHandler); - void ParseHelper_Node_Enter(AMFNodeElementBase *child); - void ParseHelper_Node_Exit(); - bool CanRead(const std::string &pFile, IOSystem *pIOHandler, bool pCheckSig) const override; - void InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) override; - const aiImporterDesc *GetInfo() const override; - bool Find_NodeElement(const std::string &pID, const AMFNodeElementBase::EType pType, AMFNodeElementBase **pNodeElement) const; - bool Find_ConvertedNode(const std::string &pID, NodeArray &nodeArray, aiNode **pNode) const; - bool Find_ConvertedMaterial(const std::string &pID, const SPP_Material **pConvertedMaterial) const; - AI_WONT_RETURN void Throw_CloseNotFound(const std::string &nodeName) AI_WONT_RETURN_SUFFIX; - AI_WONT_RETURN void Throw_IncorrectAttr(const std::string &nodeName, const std::string &pAttrName) AI_WONT_RETURN_SUFFIX; - AI_WONT_RETURN void Throw_IncorrectAttrValue(const std::string &nodeName, const std::string &pAttrName) AI_WONT_RETURN_SUFFIX; - AI_WONT_RETURN void Throw_MoreThanOnceDefined(const std::string &nodeName, const std::string &pNodeType, const std::string &pDescription) AI_WONT_RETURN_SUFFIX; - AI_WONT_RETURN void Throw_ID_NotFound(const std::string &pID) const AI_WONT_RETURN_SUFFIX; - void XML_CheckNode_MustHaveChildren(pugi::xml_node &node); - bool XML_SearchNode(const std::string &nodeName); - void ParseHelper_FixTruncatedFloatString(const char *pInStr, std::string &pOutString); - AMFImporter(const AMFImporter &pScene) = delete; - AMFImporter &operator=(const AMFImporter &pScene) = delete; private: - static const aiImporterDesc Description; - AMFNodeElementBase *mNodeElement_Cur; ///< Current element. std::list mNodeElement_List; ///< All elements of scene graph. XmlParser *mXmlParser; diff --git a/code/AssetLib/AMF/AMFImporter_Geometry.cpp b/code/AssetLib/AMF/AMFImporter_Geometry.cpp index 341999f560..1335974dae 100644 --- a/code/AssetLib/AMF/AMFImporter_Geometry.cpp +++ b/code/AssetLib/AMF/AMFImporter_Geometry.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -167,11 +167,11 @@ void AMFImporter::ParseNode_Coordinates(XmlNode &node) { AMFCoordinates &als = *((AMFCoordinates *)ne); // alias for convenience const std::string ¤tName = ai_tolower(currentNode.name()); if (currentName == "x") { - XmlParser::getValueAsFloat(currentNode, als.Coordinate.x); + XmlParser::getValueAsReal(currentNode, als.Coordinate.x); } else if (currentName == "y") { - XmlParser::getValueAsFloat(currentNode, als.Coordinate.y); + XmlParser::getValueAsReal(currentNode, als.Coordinate.y); } else if (currentName == "z") { - XmlParser::getValueAsFloat(currentNode, als.Coordinate.z); + XmlParser::getValueAsReal(currentNode, als.Coordinate.z); } } ParseHelper_Node_Exit(); @@ -202,7 +202,7 @@ void AMFImporter::ParseNode_Volume(XmlNode &node) { ((AMFVolume *)ne)->MaterialID = node.attribute("materialid").as_string(); - ((AMFVolume *)ne)->Type = type; + ((AMFVolume *)ne)->VolumeType = type; // Check for child nodes bool col_read = false; if (!node.empty()) { diff --git a/code/AssetLib/AMF/AMFImporter_Material.cpp b/code/AssetLib/AMF/AMFImporter_Material.cpp index 676e748569..74cbf72d19 100644 --- a/code/AssetLib/AMF/AMFImporter_Material.cpp +++ b/code/AssetLib/AMF/AMFImporter_Material.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -263,26 +263,25 @@ void AMFImporter::ParseNode_TexMap(XmlNode &node, const bool pUseOldName) { const std::string &name = currentNode.name(); if (name == "utex1") { read_flag[0] = true; - XmlParser::getValueAsFloat(node, als.TextureCoordinate[0].x); + XmlParser::getValueAsReal(currentNode, als.TextureCoordinate[0].x); } else if (name == "utex2") { read_flag[1] = true; - XmlParser::getValueAsFloat(node, als.TextureCoordinate[1].x); + XmlParser::getValueAsReal(currentNode, als.TextureCoordinate[1].x); } else if (name == "utex3") { read_flag[2] = true; - XmlParser::getValueAsFloat(node, als.TextureCoordinate[2].x); + XmlParser::getValueAsReal(currentNode, als.TextureCoordinate[2].x); } else if (name == "vtex1") { read_flag[3] = true; - XmlParser::getValueAsFloat(node, als.TextureCoordinate[0].y); + XmlParser::getValueAsReal(currentNode, als.TextureCoordinate[0].y); } else if (name == "vtex2") { read_flag[4] = true; - XmlParser::getValueAsFloat(node, als.TextureCoordinate[1].y); + XmlParser::getValueAsReal(currentNode, als.TextureCoordinate[1].y); } else if (name == "vtex3") { read_flag[5] = true; - XmlParser::getValueAsFloat(node, als.TextureCoordinate[2].y); + XmlParser::getValueAsReal(currentNode, als.TextureCoordinate[2].y); } } ParseHelper_Node_Exit(); - } else { for (pugi::xml_attribute &attr : node.attributes()) { const std::string name = attr.name(); diff --git a/code/AssetLib/AMF/AMFImporter_Node.hpp b/code/AssetLib/AMF/AMFImporter_Node.hpp index dd27316d3d..83ce2b1458 100644 --- a/code/AssetLib/AMF/AMFImporter_Node.hpp +++ b/code/AssetLib/AMF/AMFImporter_Node.hpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -56,7 +56,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -/// \class CAMFImporter_NodeElement /// Base class for elements of nodes. class AMFNodeElementBase { public: @@ -87,7 +86,8 @@ class AMFNodeElementBase { AMFNodeElementBase *Parent; ///< Parent element. If nullptr then this node is root. std::list Child; ///< Child elements. -public: /// Destructor, virtual.. +public: + /// Destructor, virtual.. virtual ~AMFNodeElementBase() = default; /// Disabled copy constructor and co. @@ -98,27 +98,25 @@ class AMFNodeElementBase { protected: /// In constructor inheritor must set element type. - /// \param [in] pType - element type. + /// \param [in] type - element type. /// \param [in] pParent - parent element. - AMFNodeElementBase(const EType pType, AMFNodeElementBase *pParent) : - Type(pType), Parent(pParent) { + AMFNodeElementBase(EType type, AMFNodeElementBase *pParent) : + Type(type), Parent(pParent) { // empty } }; // class IAMFImporter_NodeElement -/// \struct CAMFImporter_NodeElement_Constellation /// A collection of objects or constellations with specific relative locations. -struct AMFConstellation : public AMFNodeElementBase { +struct AMFConstellation final : public AMFNodeElementBase { /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFConstellation(AMFNodeElementBase *pParent) : + explicit AMFConstellation(AMFNodeElementBase *pParent) : AMFNodeElementBase(ENET_Constellation, pParent) {} }; // struct CAMFImporter_NodeElement_Constellation -/// \struct CAMFImporter_NodeElement_Instance /// Part of constellation. -struct AMFInstance : public AMFNodeElementBase { +struct AMFInstance final : public AMFNodeElementBase { std::string ObjectID; ///< ID of object for instantiation. /// \var Delta - The distance of translation in the x, y, or z direction, respectively, in the referenced object's coordinate system, to @@ -131,24 +129,24 @@ struct AMFInstance : public AMFNodeElementBase { /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFInstance(AMFNodeElementBase *pParent) : + explicit AMFInstance(AMFNodeElementBase *pParent) : AMFNodeElementBase(ENET_Instance, pParent) {} }; -/// \struct CAMFImporter_NodeElement_Metadata /// Structure that define metadata node. struct AMFMetadata : public AMFNodeElementBase { - std::string Type; ///< Type of "Value". - std::string Value; ///< Value. + std::string MetaType; ///< Type of "Value". + std::string Value; ///< Value. /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFMetadata(AMFNodeElementBase *pParent) : - AMFNodeElementBase(ENET_Metadata, pParent) {} + explicit AMFMetadata(AMFNodeElementBase *pParent) : + AMFNodeElementBase(ENET_Metadata, pParent) { + // empty + } }; -/// \struct CAMFImporter_NodeElement_Root /// Structure that define root node. struct AMFRoot : public AMFNodeElementBase { @@ -157,11 +155,12 @@ struct AMFRoot : public AMFNodeElementBase { /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFRoot(AMFNodeElementBase *pParent) : - AMFNodeElementBase(ENET_Root, pParent) {} + explicit AMFRoot(AMFNodeElementBase *pParent) : + AMFNodeElementBase(ENET_Root, pParent) { + // empty + } }; -/// \struct CAMFImporter_NodeElement_Color /// Structure that define object node. struct AMFColor : public AMFNodeElementBase { bool Composed; ///< Type of color stored: if true then look for formula in \ref Color_Composed[4], else - in \ref Color. @@ -171,92 +170,97 @@ struct AMFColor : public AMFNodeElementBase { /// @brief Constructor. /// @param [in] pParent - pointer to parent node. - AMFColor(AMFNodeElementBase *pParent) : + explicit AMFColor(AMFNodeElementBase *pParent) : AMFNodeElementBase(ENET_Color, pParent), Composed(false), Color() { // empty } }; -/// \struct CAMFImporter_NodeElement_Material /// Structure that define material node. struct AMFMaterial : public AMFNodeElementBase { - /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFMaterial(AMFNodeElementBase *pParent) : - AMFNodeElementBase(ENET_Material, pParent) {} + explicit AMFMaterial(AMFNodeElementBase *pParent) : + AMFNodeElementBase(ENET_Material, pParent) { + // empty + } }; -/// \struct CAMFImporter_NodeElement_Object /// Structure that define object node. struct AMFObject : public AMFNodeElementBase { - /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFObject(AMFNodeElementBase *pParent) : - AMFNodeElementBase(ENET_Object, pParent) {} + explicit AMFObject(AMFNodeElementBase *pParent) : + AMFNodeElementBase(ENET_Object, pParent) { + // empty + } }; -/// \struct CAMFImporter_NodeElement_Mesh /// Structure that define mesh node. struct AMFMesh : public AMFNodeElementBase { /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFMesh(AMFNodeElementBase *pParent) : - AMFNodeElementBase(ENET_Mesh, pParent) {} + explicit AMFMesh(AMFNodeElementBase *pParent) : + AMFNodeElementBase(ENET_Mesh, pParent) { + // empty + } }; -/// \struct CAMFImporter_NodeElement_Vertex /// Structure that define vertex node. struct AMFVertex : public AMFNodeElementBase { /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFVertex(AMFNodeElementBase *pParent) : - AMFNodeElementBase(ENET_Vertex, pParent) {} + explicit AMFVertex(AMFNodeElementBase *pParent) : + AMFNodeElementBase(ENET_Vertex, pParent) { + // empty + } }; -/// \struct CAMFImporter_NodeElement_Edge /// Structure that define edge node. struct AMFEdge : public AMFNodeElementBase { /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFEdge(AMFNodeElementBase *pParent) : - AMFNodeElementBase(ENET_Edge, pParent) {} + explicit AMFEdge(AMFNodeElementBase *pParent) : + AMFNodeElementBase(ENET_Edge, pParent) { + // empty + } }; -/// \struct CAMFImporter_NodeElement_Vertices /// Structure that define vertices node. struct AMFVertices : public AMFNodeElementBase { /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFVertices(AMFNodeElementBase *pParent) : - AMFNodeElementBase(ENET_Vertices, pParent) {} + explicit AMFVertices(AMFNodeElementBase *pParent) : + AMFNodeElementBase(ENET_Vertices, pParent) { + // empty + } }; -/// \struct CAMFImporter_NodeElement_Volume /// Structure that define volume node. struct AMFVolume : public AMFNodeElementBase { std::string MaterialID; ///< Which material to use. - std::string Type; ///< What this volume describes can be "region" or "support". If none specified, "object" is assumed. + std::string VolumeType; ///< What this volume describes can be "region" or "support". If none specified, "object" is assumed. /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFVolume(AMFNodeElementBase *pParent) : - AMFNodeElementBase(ENET_Volume, pParent) {} + explicit AMFVolume(AMFNodeElementBase *pParent) : + AMFNodeElementBase(ENET_Volume, pParent) { + // empty + } }; -/// \struct CAMFImporter_NodeElement_Coordinates /// Structure that define coordinates node. struct AMFCoordinates : public AMFNodeElementBase { aiVector3D Coordinate; ///< Coordinate. /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFCoordinates(AMFNodeElementBase *pParent) : - AMFNodeElementBase(ENET_Coordinates, pParent) {} + explicit AMFCoordinates(AMFNodeElementBase *pParent) : + AMFNodeElementBase(ENET_Coordinates, pParent) { + // empty + } }; -/// \struct CAMFImporter_NodeElement_TexMap /// Structure that define texture coordinates node. struct AMFTexMap : public AMFNodeElementBase { aiVector3D TextureCoordinate[3]; ///< Texture coordinates. @@ -267,20 +271,19 @@ struct AMFTexMap : public AMFNodeElementBase { /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFTexMap(AMFNodeElementBase *pParent) : + explicit AMFTexMap(AMFNodeElementBase *pParent) : AMFNodeElementBase(ENET_TexMap, pParent), TextureCoordinate{} { // empty } }; -/// \struct CAMFImporter_NodeElement_Triangle /// Structure that define triangle node. struct AMFTriangle : public AMFNodeElementBase { size_t V[3]; ///< Triangle vertices. /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFTriangle(AMFNodeElementBase *pParent) : + explicit AMFTriangle(AMFNodeElementBase *pParent) : AMFNodeElementBase(ENET_Triangle, pParent) { // empty } @@ -294,7 +297,7 @@ struct AMFTexture : public AMFNodeElementBase { /// Constructor. /// \param [in] pParent - pointer to parent node. - AMFTexture(AMFNodeElementBase *pParent) : + explicit AMFTexture(AMFNodeElementBase *pParent) : AMFNodeElementBase(ENET_Texture, pParent), Width(0), Height(0), Depth(0), Data(), Tiled(false) { // empty } diff --git a/code/AssetLib/AMF/AMFImporter_Postprocess.cpp b/code/AssetLib/AMF/AMFImporter_Postprocess.cpp index d5160870a5..7e9f2e05f6 100644 --- a/code/AssetLib/AMF/AMFImporter_Postprocess.cpp +++ b/code/AssetLib/AMF/AMFImporter_Postprocess.cpp @@ -1,9 +1,9 @@ -/* +/* --------------------------------------------------------------------------- Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -57,8 +57,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Assimp { aiColor4D AMFImporter::SPP_Material::GetColor(const float /*pX*/, const float /*pY*/, const float /*pZ*/) const { - aiColor4D tcol; - // Check if stored data are supported. if (!Composition.empty()) { throw DeadlyImportError("IME. GetColor for composition"); @@ -68,7 +66,7 @@ aiColor4D AMFImporter::SPP_Material::GetColor(const float /*pX*/, const float /* throw DeadlyImportError("IME. GetColor, composed color"); } - tcol = Color->Color; + aiColor4D tcol = Color->Color; // Check if default color must be used if ((tcol.r == 0) && (tcol.g == 0) && (tcol.b == 0) && (tcol.a == 0)) { @@ -224,7 +222,8 @@ size_t AMFImporter::PostprocessHelper_GetTextureID_Or_Create(const std::string & } // Create format hint. - strcpy(converted_texture.FormatHint, "rgba0000"); // copy initial string. + constexpr char templateColor[] = "rgba0000"; + memcpy(converted_texture.FormatHint, templateColor, 8); if (!r.empty()) converted_texture.FormatHint[4] = '8'; if (!g.empty()) converted_texture.FormatHint[5] = '8'; if (!b.empty()) converted_texture.FormatHint[6] = '8'; @@ -332,7 +331,7 @@ void AMFImporter::Postprocess_AddMetadata(const AMFMetaDataArray &metadataList, size_t meta_idx(0); for (const AMFMetadata *metadata : metadataList) { - sceneNode.mMetaData->Set(static_cast(meta_idx++), metadata->Type, aiString(metadata->Value)); + sceneNode.mMetaData->Set(static_cast(meta_idx++), metadata->MetaType, aiString(metadata->Value)); } } @@ -531,11 +530,9 @@ void AMFImporter::Postprocess_BuildMeshSet(const AMFMesh &pNodeElement, const st col_arr.reserve(VertexCount_Max * 2); { // fill arrays - size_t vert_idx_from, vert_idx_to; - // first iteration. - vert_idx_to = 0; - vert_idx_from = VertexIndex_GetMinimal(face_list_cur, nullptr); + size_t vert_idx_to = 0; + size_t vert_idx_from = VertexIndex_GetMinimal(face_list_cur, nullptr); vert_arr.push_back(pVertexCoordinateArray.at(vert_idx_from)); col_arr.push_back(Vertex_CalculateColor(vert_idx_from)); if (vert_idx_from != vert_idx_to) VertexIndex_Replace(face_list_cur, vert_idx_from, vert_idx_to); @@ -867,7 +864,7 @@ void AMFImporter::Postprocess_BuildScene(aiScene *pScene) { pScene->mTextures[idx]->mHeight = static_cast(tex_convd.Height); pScene->mTextures[idx]->pcData = (aiTexel *)tex_convd.Data; // texture format description. - strcpy(pScene->mTextures[idx]->achFormatHint, tex_convd.FormatHint); + strncpy(pScene->mTextures[idx]->achFormatHint, tex_convd.FormatHint, HINTMAXTEXTURELEN); idx++; } // for(const SPP_Texture& tex_convd: mTexture_Converted) diff --git a/code/AssetLib/ASE/ASELoader.cpp b/code/AssetLib/ASE/ASELoader.cpp index 951e8539da..28f107a1db 100644 --- a/code/AssetLib/ASE/ASELoader.cpp +++ b/code/AssetLib/ASE/ASELoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -44,7 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ASSIMP_BUILD_NO_ASE_IMPORTER - #ifndef ASSIMP_BUILD_NO_3DS_IMPORTER // internal headers @@ -64,10 +63,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // utilities #include -using namespace Assimp; +namespace Assimp { using namespace Assimp::ASE; -static const aiImporterDesc desc = { +static constexpr aiImporterDesc desc = { "ASE Importer", "", "", @@ -125,7 +124,7 @@ void ASEImporter::InternReadFile(const std::string &pFile, // Allocate storage and copy the contents of the file to a memory buffer std::vector mBuffer2; TextFileToBuffer(file.get(), mBuffer2); - + const size_t fileSize = mBuffer2.size(); this->mBuffer = &mBuffer2[0]; this->pcScene = pScene; @@ -147,7 +146,7 @@ void ASEImporter::InternReadFile(const std::string &pFile, }; // Construct an ASE parser and parse the file - ASE::Parser parser(mBuffer, defaultFormat); + ASE::Parser parser(mBuffer, fileSize, defaultFormat); mParser = &parser; mParser->Parse(); @@ -322,21 +321,6 @@ void ASEImporter::BuildAnimations(const std::vector &nodes) { aiNodeAnim *nd = pcAnim->mChannels[iNum++] = new aiNodeAnim(); nd->mNodeName.Set(me->mName + ".Target"); - // If there is no input position channel we will need - // to supply the default position from the node's - // local transformation matrix. - /*TargetAnimationHelper helper; - if (me->mAnim.akeyPositions.empty()) - { - aiMatrix4x4& mat = (*i)->mTransform; - helper.SetFixedMainAnimationChannel(aiVector3D( - mat.a4, mat.b4, mat.c4)); - } - else helper.SetMainAnimationChannel (&me->mAnim.akeyPositions); - helper.SetTargetAnimationChannel (&me->mTargetAnim.akeyPositions); - - helper.Process(&me->mTargetAnim.akeyPositions);*/ - // Allocate the key array and fill it nd->mNumPositionKeys = (unsigned int)me->mTargetAnim.akeyPositions.size(); nd->mPositionKeys = new aiVectorKey[nd->mNumPositionKeys]; @@ -462,10 +446,9 @@ void ASEImporter::BuildLights() { } // ------------------------------------------------------------------------------------------------ -void ASEImporter::AddNodes(const std::vector &nodes, - aiNode *pcParent, const char *szName) { +void ASEImporter::AddNodes(const std::vector &nodes, aiNode *pcParent, const std::string &name) { aiMatrix4x4 m; - AddNodes(nodes, pcParent, szName, m); + AddNodes(nodes, pcParent, name, m); } // ------------------------------------------------------------------------------------------------ @@ -522,10 +505,9 @@ void ASEImporter::AddMeshes(const ASE::BaseNode *snode, aiNode *node) { // ------------------------------------------------------------------------------------------------ // Add child nodes to a given parent node -void ASEImporter::AddNodes(const std::vector &nodes, - aiNode *pcParent, const char *szName, +void ASEImporter::AddNodes(const std::vector &nodes, aiNode *pcParent, const std::string &name, const aiMatrix4x4 &mat) { - const size_t len = szName ? ::strlen(szName) : 0; + const size_t len = name.size(); ai_assert(4 <= AI_MAX_NUMBER_OF_COLOR_SETS); // Receives child nodes for the pcParent node @@ -535,16 +517,18 @@ void ASEImporter::AddNodes(const std::vector &nodes, // which has *us* as parent. for (std::vector::const_iterator it = nodes.begin(), end = nodes.end(); it != end; ++it) { const BaseNode *snode = *it; - if (szName) { - if (len != snode->mParent.length() || ::strcmp(szName, snode->mParent.c_str())) + if (!name.empty()) { + if (len != snode->mParent.length() || name != snode->mParent.c_str()) { continue; - } else if (snode->mParent.length()) + } + } else if (snode->mParent.length()) { continue; + } (*it)->mProcessed = true; // Allocate a new node and add it to the output data structure - apcNodes.push_back(new aiNode()); + apcNodes.push_back(new aiNode); aiNode *node = apcNodes.back(); node->mName.Set((snode->mName.length() ? snode->mName.c_str() : "Unnamed_Node")); @@ -557,7 +541,7 @@ void ASEImporter::AddNodes(const std::vector &nodes, // Add sub nodes - prevent stack overflow due to recursive parenting if (node->mName != node->mParent->mName && node->mName != node->mParent->mParent->mName) { - AddNodes(nodes, node, node->mName.data, snode->mTransform); + AddNodes(nodes, node, node->mName.C_Str(), snode->mTransform); } // Further processing depends on the type of the node @@ -635,7 +619,8 @@ void ASEImporter::BuildNodes(std::vector &nodes) { } // add all nodes - AddNodes(nodes, ch, nullptr); + static const std::string none = ""; + AddNodes(nodes, ch, none); // now iterate through al nodes and find those that have not yet // been added to the nodegraph (= their parent could not be recognized) @@ -746,6 +731,10 @@ void ASEImporter::BuildUniqueRepresentation(ASE::Mesh &mesh) { unsigned int iCurrent = 0, fi = 0; for (std::vector::iterator i = mesh.mFaces.begin(); i != mesh.mFaces.end(); ++i, ++fi) { for (unsigned int n = 0; n < 3; ++n, ++iCurrent) { + const uint32_t curIndex = (*i).mIndices[n]; + if (curIndex >= mesh.mPositions.size()) { + throw DeadlyImportError("ASE: Invalid vertex index in face ", fi, "."); + } mPositions[iCurrent] = mesh.mPositions[(*i).mIndices[n]]; // add texture coordinates @@ -920,7 +909,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh &mesh, std::vector &avOutMes ASSIMP_LOG_WARN("Material index is out of range"); } - // If the material the mesh is assigned to is consisting of submeshes, split it + // If the material the mesh is assigned to consists of submeshes, split it if (!mParser->m_vMaterials[mesh.iMaterialIndex].avSubMaterials.empty()) { std::vector vSubMaterials = mParser->m_vMaterials[mesh.iMaterialIndex].avSubMaterials; @@ -1278,6 +1267,7 @@ bool ASEImporter::GenerateNormals(ASE::Mesh &mesh) { return false; } -#endif // ASSIMP_BUILD_NO_3DS_IMPORTER +} -#endif // !! ASSIMP_BUILD_NO_BASE_IMPORTER +#endif // ASSIMP_BUILD_NO_3DS_IMPORTER +#endif // ASSIMP_BUILD_NO_ASE_IMPORTER diff --git a/code/AssetLib/ASE/ASELoader.h b/code/AssetLib/ASE/ASELoader.h index 2509671ef8..b16ffae444 100644 --- a/code/AssetLib/ASE/ASELoader.h +++ b/code/AssetLib/ASE/ASELoader.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -59,7 +59,7 @@ namespace Assimp { /** Importer class for the 3DS ASE ASCII format. * */ -class ASEImporter : public BaseImporter { +class ASEImporter final : public BaseImporter { public: ASEImporter(); ~ASEImporter() override = default; @@ -153,13 +153,13 @@ class ASEImporter : public BaseImporter { * \param matrix Current transform */ void AddNodes(const std::vector& nodes, - aiNode* pcParent,const char* szName); + aiNode* pcParent, const std::string &name); void AddNodes(const std::vector& nodes, - aiNode* pcParent,const char* szName, + aiNode* pcParent, const std::string &name, const aiMatrix4x4& matrix); - void AddMeshes(const ASE::BaseNode* snode,aiNode* node); + void AddMeshes(const ASE::BaseNode* snode, aiNode* node); // ------------------------------------------------------------------- /** Generate a default material and add it to the parser's list @@ -188,5 +188,4 @@ class ASEImporter : public BaseImporter { } // end of namespace Assimp - #endif // AI_3DSIMPORTER_H_INC diff --git a/code/AssetLib/ASE/ASEParser.cpp b/code/AssetLib/ASE/ASEParser.cpp index 8e7ca63d73..fd6a711bfa 100644 --- a/code/AssetLib/ASE/ASEParser.cpp +++ b/code/AssetLib/ASE/ASEParser.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -using namespace Assimp; +namespace Assimp { using namespace Assimp::ASE; // ------------------------------------------------------------------------------------------------ @@ -66,23 +66,24 @@ using namespace Assimp::ASE; // Handle a "top-level" section in the file. EOF is no error in this case. #define AI_ASE_HANDLE_TOP_LEVEL_SECTION() \ - else if ('{' == *filePtr) iDepth++; \ - else if ('}' == *filePtr) { \ + else if ('{' == *mFilePtr) \ + ++iDepth; \ + else if ('}' == *mFilePtr) { \ if (0 == --iDepth) { \ - ++filePtr; \ + ++mFilePtr; \ SkipToNextToken(); \ return; \ } \ } \ - if ('\0' == *filePtr) { \ + if ('\0' == *mFilePtr) { \ return; \ } \ - if (IsLineEnd(*filePtr) && !bLastWasEndLine) { \ + if (IsLineEnd(*mFilePtr) && !bLastWasEndLine) {\ ++iLineNumber; \ bLastWasEndLine = true; \ } else \ bLastWasEndLine = false; \ - ++filePtr; + ++mFilePtr; // ------------------------------------------------------------------------------------------------ // Handle a nested section in the file. EOF is an error in this case @@ -90,30 +91,32 @@ using namespace Assimp::ASE; // @param msg Full name of the section (including the asterisk) #define AI_ASE_HANDLE_SECTION(level, msg) \ - if ('{' == *filePtr) \ + if ('{' == *mFilePtr) \ iDepth++; \ - else if ('}' == *filePtr) { \ + else if ('}' == *mFilePtr) { \ if (0 == --iDepth) { \ - ++filePtr; \ + ++mFilePtr; \ SkipToNextToken(); \ return; \ } \ - } else if ('\0' == *filePtr) { \ + } else if ('\0' == *mFilePtr) { \ LogError("Encountered unexpected EOL while parsing a " msg \ " chunk (Level " level ")"); \ } \ - if (IsLineEnd(*filePtr) && !bLastWasEndLine) { \ + if (IsLineEnd(*mFilePtr) && !bLastWasEndLine) { \ ++iLineNumber; \ bLastWasEndLine = true; \ } else \ bLastWasEndLine = false; \ - ++filePtr; + ++mFilePtr; // ------------------------------------------------------------------------------------------------ -Parser::Parser(const char *szFile, unsigned int fileFormatDefault) { - ai_assert(nullptr != szFile); +Parser::Parser(const char *file, size_t fileLen, unsigned int fileFormatDefault) : + mFilePtr(nullptr), mEnd (nullptr) { + ai_assert(file != nullptr); - filePtr = szFile; + mFilePtr = file; + mEnd = mFilePtr + fileLen; iFileFormat = fileFormatDefault; // make sure that the color values are invalid @@ -177,7 +180,11 @@ AI_WONT_RETURN void Parser::LogError(const char *szWarn) { // ------------------------------------------------------------------------------------------------ bool Parser::SkipToNextToken() { while (true) { - char me = *filePtr; + char me = *mFilePtr; + + if (mFilePtr == mEnd) { + return false; + } // increase the line number counter if necessary if (IsLineEnd(me) && !bLastWasEndLine) { @@ -185,10 +192,14 @@ bool Parser::SkipToNextToken() { bLastWasEndLine = true; } else bLastWasEndLine = false; - if ('*' == me || '}' == me || '{' == me) return true; - if ('\0' == me) return false; + if ('*' == me || '}' == me || '{' == me) { + return true; + } + if ('\0' == me) { + return false; + } - ++filePtr; + ++mFilePtr; } } @@ -197,22 +208,22 @@ bool Parser::SkipSection() { // must handle subsections ... int iCnt = 0; while (true) { - if ('}' == *filePtr) { + if ('}' == *mFilePtr) { --iCnt; if (0 == iCnt) { // go to the next valid token ... - ++filePtr; + ++mFilePtr; SkipToNextToken(); return true; } - } else if ('{' == *filePtr) { + } else if ('{' == *mFilePtr) { ++iCnt; - } else if ('\0' == *filePtr) { + } else if ('\0' == *mFilePtr) { LogWarning("Unable to parse block: Unexpected EOF, closing bracket \'}\' was expected [#1]"); return false; - } else if (IsLineEnd(*filePtr)) + } else if (IsLineEnd(*mFilePtr)) ++iLineNumber; - ++filePtr; + ++mFilePtr; } } @@ -220,11 +231,11 @@ bool Parser::SkipSection() { void Parser::Parse() { AI_ASE_PARSER_INIT(); while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Version should be 200. Validate this ... - if (TokenMatch(filePtr, "3DSMAX_ASCIIEXPORT", 18)) { + if (TokenMatch(mFilePtr, "3DSMAX_ASCIIEXPORT", 18)) { unsigned int fmt; ParseLV4MeshLong(fmt); @@ -245,23 +256,23 @@ void Parser::Parse() { continue; } // main scene information - if (TokenMatch(filePtr, "SCENE", 5)) { + if (TokenMatch(mFilePtr, "SCENE", 5)) { ParseLV1SceneBlock(); continue; } // "group" - no implementation yet, in facte // we're just ignoring them for the moment - if (TokenMatch(filePtr, "GROUP", 5)) { + if (TokenMatch(mFilePtr, "GROUP", 5)) { Parse(); continue; } // material list - if (TokenMatch(filePtr, "MATERIAL_LIST", 13)) { + if (TokenMatch(mFilePtr, "MATERIAL_LIST", 13)) { ParseLV1MaterialListBlock(); continue; } // geometric object (mesh) - if (TokenMatch(filePtr, "GEOMOBJECT", 10)) + if (TokenMatch(mFilePtr, "GEOMOBJECT", 10)) { m_vMeshes.emplace_back("UNNAMED"); @@ -269,7 +280,7 @@ void Parser::Parse() { continue; } // helper object = dummy in the hierarchy - if (TokenMatch(filePtr, "HELPEROBJECT", 12)) + if (TokenMatch(mFilePtr, "HELPEROBJECT", 12)) { m_vDummies.emplace_back(); @@ -277,7 +288,7 @@ void Parser::Parse() { continue; } // light object - if (TokenMatch(filePtr, "LIGHTOBJECT", 11)) + if (TokenMatch(mFilePtr, "LIGHTOBJECT", 11)) { m_vLights.emplace_back("UNNAMED"); @@ -285,20 +296,20 @@ void Parser::Parse() { continue; } // camera object - if (TokenMatch(filePtr, "CAMERAOBJECT", 12)) { + if (TokenMatch(mFilePtr, "CAMERAOBJECT", 12)) { m_vCameras.emplace_back("UNNAMED"); ParseLV1ObjectBlock(m_vCameras.back()); continue; } // comment - print it on the console - if (TokenMatch(filePtr, "COMMENT", 7)) { + if (TokenMatch(mFilePtr, "COMMENT", 7)) { std::string out = ""; ParseString(out, "*COMMENT"); LogInfo(("Comment: " + out).c_str()); continue; } // ASC bone weights - if (AI_ASE_IS_OLD_FILE_FORMAT() && TokenMatch(filePtr, "MESH_SOFTSKINVERTS", 18)) { + if (AI_ASE_IS_OLD_FILE_FORMAT() && TokenMatch(mFilePtr, "MESH_SOFTSKINVERTS", 18)) { ParseLV1SoftSkinBlock(); } } @@ -330,24 +341,25 @@ void Parser::ParseLV1SoftSkinBlock() { */ // ************************************************************** while (true) { - if (*filePtr == '}') { - ++filePtr; + if (*mFilePtr == '}') { + ++mFilePtr; return; - } else if (*filePtr == '\0') + } else if (*mFilePtr == '\0') return; - else if (*filePtr == '{') - ++filePtr; + else if (*mFilePtr == '{') + ++mFilePtr; else // if (!IsSpace(*filePtr) && !IsLineEnd(*filePtr)) { ASE::Mesh *curMesh = nullptr; unsigned int numVerts = 0; - const char *sz = filePtr; - while (!IsSpaceOrNewLine(*filePtr)) - ++filePtr; + const char *sz = mFilePtr; + while (!IsSpaceOrNewLine(*mFilePtr)) { + ++mFilePtr; + } - const unsigned int diff = (unsigned int)(filePtr - sz); + const unsigned int diff = (unsigned int)(mFilePtr - sz); if (diff) { std::string name = std::string(sz, diff); for (std::vector::iterator it = m_vMeshes.begin(); @@ -363,24 +375,24 @@ void Parser::ParseLV1SoftSkinBlock() { // Skip the mesh data - until we find a new mesh // or the end of the *MESH_SOFTSKINVERTS section while (true) { - SkipSpacesAndLineEnd(&filePtr); - if (*filePtr == '}') { - ++filePtr; + SkipSpacesAndLineEnd(&mFilePtr, mEnd); + if (*mFilePtr == '}') { + ++mFilePtr; return; - } else if (!IsNumeric(*filePtr)) + } else if (!IsNumeric(*mFilePtr)) break; - SkipLine(&filePtr); + SkipLine(&mFilePtr, mEnd); } } else { - SkipSpacesAndLineEnd(&filePtr); + SkipSpacesAndLineEnd(&mFilePtr, mEnd); ParseLV4MeshLong(numVerts); // Reserve enough storage curMesh->mBoneVertices.reserve(numVerts); for (unsigned int i = 0; i < numVerts; ++i) { - SkipSpacesAndLineEnd(&filePtr); + SkipSpacesAndLineEnd(&mFilePtr, mEnd); unsigned int numWeights; ParseLV4MeshLong(numWeights); @@ -410,7 +422,7 @@ void Parser::ParseLV1SoftSkinBlock() { me.first = static_cast(curMesh->mBones.size()); curMesh->mBones.emplace_back(bone); } - ParseLV4MeshFloat(me.second); + ParseLV4MeshReal(me.second); // Add the new bone weight to list vert.mBoneWeights.push_back(me); @@ -419,10 +431,10 @@ void Parser::ParseLV1SoftSkinBlock() { } } } - if (*filePtr == '\0') + if (*mFilePtr == '\0') return; - ++filePtr; - SkipSpacesAndLineEnd(&filePtr); + ++mFilePtr; + SkipSpacesAndLineEnd(&mFilePtr, mEnd); } } @@ -430,35 +442,35 @@ void Parser::ParseLV1SoftSkinBlock() { void Parser::ParseLV1SceneBlock() { AI_ASE_PARSER_INIT(); while (true) { - if ('*' == *filePtr) { - ++filePtr; - if (TokenMatch(filePtr, "SCENE_BACKGROUND_STATIC", 23)) + if ('*' == *mFilePtr) { + ++mFilePtr; + if (TokenMatch(mFilePtr, "SCENE_BACKGROUND_STATIC", 23)) { // parse a color triple and assume it is really the bg color ParseLV4MeshFloatTriple(&m_clrBackground.r); continue; } - if (TokenMatch(filePtr, "SCENE_AMBIENT_STATIC", 20)) + if (TokenMatch(mFilePtr, "SCENE_AMBIENT_STATIC", 20)) { // parse a color triple and assume it is really the bg color ParseLV4MeshFloatTriple(&m_clrAmbient.r); continue; } - if (TokenMatch(filePtr, "SCENE_FIRSTFRAME", 16)) { + if (TokenMatch(mFilePtr, "SCENE_FIRSTFRAME", 16)) { ParseLV4MeshLong(iFirstFrame); continue; } - if (TokenMatch(filePtr, "SCENE_LASTFRAME", 15)) { + if (TokenMatch(mFilePtr, "SCENE_LASTFRAME", 15)) { ParseLV4MeshLong(iLastFrame); continue; } - if (TokenMatch(filePtr, "SCENE_FRAMESPEED", 16)) { + if (TokenMatch(mFilePtr, "SCENE_FRAMESPEED", 16)) { ParseLV4MeshLong(iFrameSpeed); continue; } - if (TokenMatch(filePtr, "SCENE_TICKSPERFRAME", 19)) { + if (TokenMatch(mFilePtr, "SCENE_TICKSPERFRAME", 19)) { ParseLV4MeshLong(iTicksPerFrame); continue; } @@ -474,23 +486,34 @@ void Parser::ParseLV1MaterialListBlock() { unsigned int iMaterialCount = 0; unsigned int iOldMaterialCount = (unsigned int)m_vMaterials.size(); while (true) { - if ('*' == *filePtr) { - ++filePtr; - if (TokenMatch(filePtr, "MATERIAL_COUNT", 14)) { + if ('*' == *mFilePtr) { + ++mFilePtr; + if (TokenMatch(mFilePtr, "MATERIAL_COUNT", 14)) { ParseLV4MeshLong(iMaterialCount); + if (UINT_MAX - iOldMaterialCount < iMaterialCount) { + LogWarning("Out of range: material index is too large"); + return; + } + // now allocate enough storage to hold all materials m_vMaterials.resize(iOldMaterialCount + iMaterialCount, Material("INVALID")); continue; } - if (TokenMatch(filePtr, "MATERIAL", 8)) { + if (TokenMatch(mFilePtr, "MATERIAL", 8)) { + // ensure we have at least one material allocated + if (iMaterialCount == 0) { + LogWarning("*MATERIAL_COUNT unspecified or 0"); + iMaterialCount = 1; + m_vMaterials.resize(iOldMaterialCount + iMaterialCount, Material("INVALID")); + } + unsigned int iIndex = 0; ParseLV4MeshLong(iIndex); if (iIndex >= iMaterialCount) { LogWarning("Out of range: material index is too large"); iIndex = iMaterialCount - 1; - return; } // get a reference to the material @@ -502,7 +525,7 @@ void Parser::ParseLV1MaterialListBlock() { if( iDepth == 1 ){ // CRUDE HACK: support missing brace after "Ascii Scene Exporter v2.51" LogWarning("Missing closing brace in material list"); - --filePtr; + --mFilePtr; return; } } @@ -516,37 +539,37 @@ void Parser::ParseLV2MaterialBlock(ASE::Material &mat) { unsigned int iNumSubMaterials = 0; while (true) { - if ('*' == *filePtr) { - ++filePtr; - if (TokenMatch(filePtr, "MATERIAL_NAME", 13)) { + if ('*' == *mFilePtr) { + ++mFilePtr; + if (TokenMatch(mFilePtr, "MATERIAL_NAME", 13)) { if (!ParseString(mat.mName, "*MATERIAL_NAME")) SkipToNextToken(); continue; } // ambient material color - if (TokenMatch(filePtr, "MATERIAL_AMBIENT", 16)) { + if (TokenMatch(mFilePtr, "MATERIAL_AMBIENT", 16)) { ParseLV4MeshFloatTriple(&mat.mAmbient.r); continue; } // diffuse material color - if (TokenMatch(filePtr, "MATERIAL_DIFFUSE", 16)) { + if (TokenMatch(mFilePtr, "MATERIAL_DIFFUSE", 16)) { ParseLV4MeshFloatTriple(&mat.mDiffuse.r); continue; } // specular material color - if (TokenMatch(filePtr, "MATERIAL_SPECULAR", 17)) { + if (TokenMatch(mFilePtr, "MATERIAL_SPECULAR", 17)) { ParseLV4MeshFloatTriple(&mat.mSpecular.r); continue; } // material shading type - if (TokenMatch(filePtr, "MATERIAL_SHADING", 16)) { - if (TokenMatch(filePtr, "Blinn", 5)) { + if (TokenMatch(mFilePtr, "MATERIAL_SHADING", 16)) { + if (TokenMatch(mFilePtr, "Blinn", 5)) { mat.mShading = Discreet3DS::Blinn; - } else if (TokenMatch(filePtr, "Phong", 5)) { + } else if (TokenMatch(mFilePtr, "Phong", 5)) { mat.mShading = Discreet3DS::Phong; - } else if (TokenMatch(filePtr, "Flat", 4)) { + } else if (TokenMatch(mFilePtr, "Flat", 4)) { mat.mShading = Discreet3DS::Flat; - } else if (TokenMatch(filePtr, "Wire", 4)) { + } else if (TokenMatch(mFilePtr, "Wire", 4)) { mat.mShading = Discreet3DS::Wire; } else { // assume gouraud shading @@ -556,15 +579,15 @@ void Parser::ParseLV2MaterialBlock(ASE::Material &mat) { continue; } // material transparency - if (TokenMatch(filePtr, "MATERIAL_TRANSPARENCY", 21)) { - ParseLV4MeshFloat(mat.mTransparency); + if (TokenMatch(mFilePtr, "MATERIAL_TRANSPARENCY", 21)) { + ParseLV4MeshReal(mat.mTransparency); mat.mTransparency = ai_real(1.0) - mat.mTransparency; continue; } // material self illumination - if (TokenMatch(filePtr, "MATERIAL_SELFILLUM", 18)) { + if (TokenMatch(mFilePtr, "MATERIAL_SELFILLUM", 18)) { ai_real f = 0.0; - ParseLV4MeshFloat(f); + ParseLV4MeshReal(f); mat.mEmissive.r = f; mat.mEmissive.g = f; @@ -572,71 +595,77 @@ void Parser::ParseLV2MaterialBlock(ASE::Material &mat) { continue; } // material shininess - if (TokenMatch(filePtr, "MATERIAL_SHINE", 14)) { - ParseLV4MeshFloat(mat.mSpecularExponent); + if (TokenMatch(mFilePtr, "MATERIAL_SHINE", 14)) { + ParseLV4MeshReal(mat.mSpecularExponent); mat.mSpecularExponent *= 15; continue; } // two-sided material - if (TokenMatch(filePtr, "MATERIAL_TWOSIDED", 17)) { + if (TokenMatch(mFilePtr, "MATERIAL_TWOSIDED", 17)) { mat.mTwoSided = true; continue; } // material shininess strength - if (TokenMatch(filePtr, "MATERIAL_SHINESTRENGTH", 22)) { - ParseLV4MeshFloat(mat.mShininessStrength); + if (TokenMatch(mFilePtr, "MATERIAL_SHINESTRENGTH", 22)) { + ParseLV4MeshReal(mat.mShininessStrength); continue; } // diffuse color map - if (TokenMatch(filePtr, "MAP_DIFFUSE", 11)) { + if (TokenMatch(mFilePtr, "MAP_DIFFUSE", 11)) { // parse the texture block ParseLV3MapBlock(mat.sTexDiffuse); continue; } // ambient color map - if (TokenMatch(filePtr, "MAP_AMBIENT", 11)) { + if (TokenMatch(mFilePtr, "MAP_AMBIENT", 11)) { // parse the texture block ParseLV3MapBlock(mat.sTexAmbient); continue; } // specular color map - if (TokenMatch(filePtr, "MAP_SPECULAR", 12)) { + if (TokenMatch(mFilePtr, "MAP_SPECULAR", 12)) { // parse the texture block ParseLV3MapBlock(mat.sTexSpecular); continue; } // opacity map - if (TokenMatch(filePtr, "MAP_OPACITY", 11)) { + if (TokenMatch(mFilePtr, "MAP_OPACITY", 11)) { // parse the texture block ParseLV3MapBlock(mat.sTexOpacity); continue; } // emissive map - if (TokenMatch(filePtr, "MAP_SELFILLUM", 13)) { + if (TokenMatch(mFilePtr, "MAP_SELFILLUM", 13)) { // parse the texture block ParseLV3MapBlock(mat.sTexEmissive); continue; } // bump map - if (TokenMatch(filePtr, "MAP_BUMP", 8)) { + if (TokenMatch(mFilePtr, "MAP_BUMP", 8)) { // parse the texture block ParseLV3MapBlock(mat.sTexBump); } // specular/shininess map - if (TokenMatch(filePtr, "MAP_SHINESTRENGTH", 17)) { + if (TokenMatch(mFilePtr, "MAP_SHINESTRENGTH", 17)) { // parse the texture block ParseLV3MapBlock(mat.sTexShininess); continue; } // number of submaterials - if (TokenMatch(filePtr, "NUMSUBMTLS", 10)) { + if (TokenMatch(mFilePtr, "NUMSUBMTLS", 10)) { ParseLV4MeshLong(iNumSubMaterials); // allocate enough storage mat.avSubMaterials.resize(iNumSubMaterials, Material("INVALID SUBMATERIAL")); } // submaterial chunks - if (TokenMatch(filePtr, "SUBMATERIAL", 11)) { + if (TokenMatch(mFilePtr, "SUBMATERIAL", 11)) { + // ensure we have at least one material allocated + if (iNumSubMaterials == 0) { + LogWarning("*NUMSUBMTLS unspecified or 0"); + iNumSubMaterials = 1; + mat.avSubMaterials.resize(iNumSubMaterials, Material("INVALID SUBMATERIAL")); + } unsigned int iIndex = 0; ParseLV4MeshLong(iIndex); @@ -673,10 +702,10 @@ void Parser::ParseLV3MapBlock(Texture &map) { bool parsePath = true; std::string temp; while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // type of map - if (TokenMatch(filePtr, "MAP_CLASS", 9)) { + if (TokenMatch(mFilePtr, "MAP_CLASS", 9)) { temp.clear(); if (!ParseString(temp, "*MAP_CLASS")) SkipToNextToken(); @@ -687,7 +716,7 @@ void Parser::ParseLV3MapBlock(Texture &map) { continue; } // path to the texture - if (parsePath && TokenMatch(filePtr, "BITMAP", 6)) { + if (parsePath && TokenMatch(mFilePtr, "BITMAP", 6)) { if (!ParseString(map.mMapName, "*BITMAP")) SkipToNextToken(); @@ -701,33 +730,33 @@ void Parser::ParseLV3MapBlock(Texture &map) { continue; } // offset on the u axis - if (TokenMatch(filePtr, "UVW_U_OFFSET", 12)) { - ParseLV4MeshFloat(map.mOffsetU); + if (TokenMatch(mFilePtr, "UVW_U_OFFSET", 12)) { + ParseLV4MeshReal(map.mOffsetU); continue; } // offset on the v axis - if (TokenMatch(filePtr, "UVW_V_OFFSET", 12)) { - ParseLV4MeshFloat(map.mOffsetV); + if (TokenMatch(mFilePtr, "UVW_V_OFFSET", 12)) { + ParseLV4MeshReal(map.mOffsetV); continue; } // tiling on the u axis - if (TokenMatch(filePtr, "UVW_U_TILING", 12)) { - ParseLV4MeshFloat(map.mScaleU); + if (TokenMatch(mFilePtr, "UVW_U_TILING", 12)) { + ParseLV4MeshReal(map.mScaleU); continue; } // tiling on the v axis - if (TokenMatch(filePtr, "UVW_V_TILING", 12)) { - ParseLV4MeshFloat(map.mScaleV); + if (TokenMatch(mFilePtr, "UVW_V_TILING", 12)) { + ParseLV4MeshReal(map.mScaleV); continue; } // rotation around the z-axis - if (TokenMatch(filePtr, "UVW_ANGLE", 9)) { - ParseLV4MeshFloat(map.mRotation); + if (TokenMatch(mFilePtr, "UVW_ANGLE", 9)) { + ParseLV4MeshReal(map.mRotation); continue; } // map blending factor - if (TokenMatch(filePtr, "MAP_AMOUNT", 10)) { - ParseLV4MeshFloat(map.mTextureBlend); + if (TokenMatch(mFilePtr, "MAP_AMOUNT", 10)) { + ParseLV4MeshReal(map.mTextureBlend); continue; } } @@ -738,14 +767,14 @@ void Parser::ParseLV3MapBlock(Texture &map) { // ------------------------------------------------------------------------------------------------ bool Parser::ParseString(std::string &out, const char *szName) { char szBuffer[1024]; - if (!SkipSpaces(&filePtr)) { + if (!SkipSpaces(&mFilePtr, mEnd)) { ai_snprintf(szBuffer, 1024, "Unable to parse %s block: Unexpected EOL", szName); LogWarning(szBuffer); return false; } // there must be '"' - if ('\"' != *filePtr) { + if ('\"' != *mFilePtr) { ai_snprintf(szBuffer, 1024, "Unable to parse %s block: Strings are expected " "to be enclosed in double quotation marks", @@ -753,8 +782,8 @@ bool Parser::ParseString(std::string &out, const char *szName) { LogWarning(szBuffer); return false; } - ++filePtr; - const char *sz = filePtr; + ++mFilePtr; + const char *sz = mFilePtr; while (true) { if ('\"' == *sz) break; @@ -768,8 +797,8 @@ bool Parser::ParseString(std::string &out, const char *szName) { } sz++; } - out = std::string(filePtr, (uintptr_t)sz - (uintptr_t)filePtr); - filePtr = sz + 1; + out = std::string(mFilePtr, (uintptr_t)sz - (uintptr_t)mFilePtr); + mFilePtr = sz + 1; return true; } @@ -777,48 +806,48 @@ bool Parser::ParseString(std::string &out, const char *szName) { void Parser::ParseLV1ObjectBlock(ASE::BaseNode &node) { AI_ASE_PARSER_INIT(); while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // first process common tokens such as node name and transform // name of the mesh/node - if (TokenMatch(filePtr, "NODE_NAME", 9)) { + if (TokenMatch(mFilePtr, "NODE_NAME", 9)) { if (!ParseString(node.mName, "*NODE_NAME")) SkipToNextToken(); continue; } // name of the parent of the node - if (TokenMatch(filePtr, "NODE_PARENT", 11)) { + if (TokenMatch(mFilePtr, "NODE_PARENT", 11)) { if (!ParseString(node.mParent, "*NODE_PARENT")) SkipToNextToken(); continue; } // transformation matrix of the node - if (TokenMatch(filePtr, "NODE_TM", 7)) { + if (TokenMatch(mFilePtr, "NODE_TM", 7)) { ParseLV2NodeTransformBlock(node); continue; } // animation data of the node - if (TokenMatch(filePtr, "TM_ANIMATION", 12)) { + if (TokenMatch(mFilePtr, "TM_ANIMATION", 12)) { ParseLV2AnimationBlock(node); continue; } if (node.mType == BaseNode::Light) { // light settings - if (TokenMatch(filePtr, "LIGHT_SETTINGS", 14)) { + if (TokenMatch(mFilePtr, "LIGHT_SETTINGS", 14)) { ParseLV2LightSettingsBlock((ASE::Light &)node); continue; } // type of the light source - if (TokenMatch(filePtr, "LIGHT_TYPE", 10)) { - if (!ASSIMP_strincmp("omni", filePtr, 4)) { + if (TokenMatch(mFilePtr, "LIGHT_TYPE", 10)) { + if (!ASSIMP_strincmp("omni", mFilePtr, 4)) { ((ASE::Light &)node).mLightType = ASE::Light::OMNI; - } else if (!ASSIMP_strincmp("target", filePtr, 6)) { + } else if (!ASSIMP_strincmp("target", mFilePtr, 6)) { ((ASE::Light &)node).mLightType = ASE::Light::TARGET; - } else if (!ASSIMP_strincmp("free", filePtr, 4)) { + } else if (!ASSIMP_strincmp("free", mFilePtr, 4)) { ((ASE::Light &)node).mLightType = ASE::Light::FREE; - } else if (!ASSIMP_strincmp("directional", filePtr, 11)) { + } else if (!ASSIMP_strincmp("directional", mFilePtr, 11)) { ((ASE::Light &)node).mLightType = ASE::Light::DIRECTIONAL; } else { LogWarning("Unknown kind of light source"); @@ -827,13 +856,13 @@ void Parser::ParseLV1ObjectBlock(ASE::BaseNode &node) { } } else if (node.mType == BaseNode::Camera) { // Camera settings - if (TokenMatch(filePtr, "CAMERA_SETTINGS", 15)) { + if (TokenMatch(mFilePtr, "CAMERA_SETTINGS", 15)) { ParseLV2CameraSettingsBlock((ASE::Camera &)node); continue; - } else if (TokenMatch(filePtr, "CAMERA_TYPE", 11)) { - if (!ASSIMP_strincmp("target", filePtr, 6)) { + } else if (TokenMatch(mFilePtr, "CAMERA_TYPE", 11)) { + if (!ASSIMP_strincmp("target", mFilePtr, 6)) { ((ASE::Camera &)node).mCameraType = ASE::Camera::TARGET; - } else if (!ASSIMP_strincmp("free", filePtr, 4)) { + } else if (!ASSIMP_strincmp("free", mFilePtr, 4)) { ((ASE::Camera &)node).mCameraType = ASE::Camera::FREE; } else { LogWarning("Unknown kind of camera"); @@ -843,13 +872,13 @@ void Parser::ParseLV1ObjectBlock(ASE::BaseNode &node) { } else if (node.mType == BaseNode::Mesh) { // mesh data // FIX: Older files use MESH_SOFTSKIN - if (TokenMatch(filePtr, "MESH", 4) || - TokenMatch(filePtr, "MESH_SOFTSKIN", 13)) { + if (TokenMatch(mFilePtr, "MESH", 4) || + TokenMatch(mFilePtr, "MESH_SOFTSKIN", 13)) { ParseLV2MeshBlock((ASE::Mesh &)node); continue; } // mesh material index - if (TokenMatch(filePtr, "MATERIAL_REF", 12)) { + if (TokenMatch(mFilePtr, "MATERIAL_REF", 12)) { ParseLV4MeshLong(((ASE::Mesh &)node).iMaterialIndex); continue; } @@ -863,18 +892,18 @@ void Parser::ParseLV1ObjectBlock(ASE::BaseNode &node) { void Parser::ParseLV2CameraSettingsBlock(ASE::Camera &camera) { AI_ASE_PARSER_INIT(); while (true) { - if ('*' == *filePtr) { - ++filePtr; - if (TokenMatch(filePtr, "CAMERA_NEAR", 11)) { - ParseLV4MeshFloat(camera.mNear); + if ('*' == *mFilePtr) { + ++mFilePtr; + if (TokenMatch(mFilePtr, "CAMERA_NEAR", 11)) { + ParseLV4MeshReal(camera.mNear); continue; } - if (TokenMatch(filePtr, "CAMERA_FAR", 10)) { - ParseLV4MeshFloat(camera.mFar); + if (TokenMatch(mFilePtr, "CAMERA_FAR", 10)) { + ParseLV4MeshReal(camera.mFar); continue; } - if (TokenMatch(filePtr, "CAMERA_FOV", 10)) { - ParseLV4MeshFloat(camera.mFOV); + if (TokenMatch(mFilePtr, "CAMERA_FOV", 10)) { + ParseLV4MeshReal(camera.mFOV); continue; } } @@ -886,22 +915,22 @@ void Parser::ParseLV2CameraSettingsBlock(ASE::Camera &camera) { void Parser::ParseLV2LightSettingsBlock(ASE::Light &light) { AI_ASE_PARSER_INIT(); while (true) { - if ('*' == *filePtr) { - ++filePtr; - if (TokenMatch(filePtr, "LIGHT_COLOR", 11)) { + if ('*' == *mFilePtr) { + ++mFilePtr; + if (TokenMatch(mFilePtr, "LIGHT_COLOR", 11)) { ParseLV4MeshFloatTriple(&light.mColor.r); continue; } - if (TokenMatch(filePtr, "LIGHT_INTENS", 12)) { - ParseLV4MeshFloat(light.mIntensity); + if (TokenMatch(mFilePtr, "LIGHT_INTENS", 12)) { + ParseLV4MeshReal(light.mIntensity); continue; } - if (TokenMatch(filePtr, "LIGHT_HOTSPOT", 13)) { - ParseLV4MeshFloat(light.mAngle); + if (TokenMatch(mFilePtr, "LIGHT_HOTSPOT", 13)) { + ParseLV4MeshReal(light.mAngle); continue; } - if (TokenMatch(filePtr, "LIGHT_FALLOFF", 13)) { - ParseLV4MeshFloat(light.mFalloff); + if (TokenMatch(mFilePtr, "LIGHT_FALLOFF", 13)) { + ParseLV4MeshReal(light.mFalloff); continue; } } @@ -915,9 +944,9 @@ void Parser::ParseLV2AnimationBlock(ASE::BaseNode &mesh) { ASE::Animation *anim = &mesh.mAnim; while (true) { - if ('*' == *filePtr) { - ++filePtr; - if (TokenMatch(filePtr, "NODE_NAME", 9)) { + if ('*' == *mFilePtr) { + ++mFilePtr; + if (TokenMatch(mFilePtr, "NODE_NAME", 9)) { std::string temp; if (!ParseString(temp, "*NODE_NAME")) SkipToNextToken(); @@ -939,9 +968,9 @@ void Parser::ParseLV2AnimationBlock(ASE::BaseNode &mesh) { } // position keyframes - if (TokenMatch(filePtr, "CONTROL_POS_TRACK", 17) || - TokenMatch(filePtr, "CONTROL_POS_BEZIER", 18) || - TokenMatch(filePtr, "CONTROL_POS_TCB", 15)) { + if (TokenMatch(mFilePtr, "CONTROL_POS_TRACK", 17) || + TokenMatch(mFilePtr, "CONTROL_POS_BEZIER", 18) || + TokenMatch(mFilePtr, "CONTROL_POS_TCB", 15)) { if (!anim) SkipSection(); else @@ -949,9 +978,9 @@ void Parser::ParseLV2AnimationBlock(ASE::BaseNode &mesh) { continue; } // scaling keyframes - if (TokenMatch(filePtr, "CONTROL_SCALE_TRACK", 19) || - TokenMatch(filePtr, "CONTROL_SCALE_BEZIER", 20) || - TokenMatch(filePtr, "CONTROL_SCALE_TCB", 17)) { + if (TokenMatch(mFilePtr, "CONTROL_SCALE_TRACK", 19) || + TokenMatch(mFilePtr, "CONTROL_SCALE_BEZIER", 20) || + TokenMatch(mFilePtr, "CONTROL_SCALE_TCB", 17)) { if (!anim || anim == &mesh.mTargetAnim) { // Target animation channels may have no rotation channels ASSIMP_LOG_ERROR("ASE: Ignoring scaling channel in target animation"); @@ -961,9 +990,9 @@ void Parser::ParseLV2AnimationBlock(ASE::BaseNode &mesh) { continue; } // rotation keyframes - if (TokenMatch(filePtr, "CONTROL_ROT_TRACK", 17) || - TokenMatch(filePtr, "CONTROL_ROT_BEZIER", 18) || - TokenMatch(filePtr, "CONTROL_ROT_TCB", 15)) { + if (TokenMatch(mFilePtr, "CONTROL_ROT_TRACK", 17) || + TokenMatch(mFilePtr, "CONTROL_ROT_BEZIER", 18) || + TokenMatch(mFilePtr, "CONTROL_ROT_TCB", 15)) { if (!anim || anim == &mesh.mTargetAnim) { // Target animation channels may have no rotation channels ASSIMP_LOG_ERROR("ASE: Ignoring rotation channel in target animation"); @@ -982,8 +1011,8 @@ void Parser::ParseLV3ScaleAnimationBlock(ASE::Animation &anim) { unsigned int iIndex; while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; bool b = false; @@ -991,25 +1020,25 @@ void Parser::ParseLV3ScaleAnimationBlock(ASE::Animation &anim) { // we ignore the additional information for bezier's and TCBs // simple scaling keyframe - if (TokenMatch(filePtr, "CONTROL_SCALE_SAMPLE", 20)) { + if (TokenMatch(mFilePtr, "CONTROL_SCALE_SAMPLE", 20)) { b = true; anim.mScalingType = ASE::Animation::TRACK; } // Bezier scaling keyframe - if (TokenMatch(filePtr, "CONTROL_BEZIER_SCALE_KEY", 24)) { + if (TokenMatch(mFilePtr, "CONTROL_BEZIER_SCALE_KEY", 24)) { b = true; anim.mScalingType = ASE::Animation::BEZIER; } // TCB scaling keyframe - if (TokenMatch(filePtr, "CONTROL_TCB_SCALE_KEY", 21)) { + if (TokenMatch(mFilePtr, "CONTROL_TCB_SCALE_KEY", 21)) { b = true; anim.mScalingType = ASE::Animation::TCB; } if (b) { anim.akeyScaling.emplace_back(); aiVectorKey &key = anim.akeyScaling.back(); - ParseLV4MeshFloatTriple(&key.mValue.x, iIndex); + ParseLV4MeshRealTriple(&key.mValue.x, iIndex); key.mTime = (double)iIndex; } } @@ -1021,8 +1050,8 @@ void Parser::ParseLV3PosAnimationBlock(ASE::Animation &anim) { AI_ASE_PARSER_INIT(); unsigned int iIndex; while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; bool b = false; @@ -1030,25 +1059,25 @@ void Parser::ParseLV3PosAnimationBlock(ASE::Animation &anim) { // we ignore the additional information for bezier's and TCBs // simple scaling keyframe - if (TokenMatch(filePtr, "CONTROL_POS_SAMPLE", 18)) { + if (TokenMatch(mFilePtr, "CONTROL_POS_SAMPLE", 18)) { b = true; anim.mPositionType = ASE::Animation::TRACK; } // Bezier scaling keyframe - if (TokenMatch(filePtr, "CONTROL_BEZIER_POS_KEY", 22)) { + if (TokenMatch(mFilePtr, "CONTROL_BEZIER_POS_KEY", 22)) { b = true; anim.mPositionType = ASE::Animation::BEZIER; } // TCB scaling keyframe - if (TokenMatch(filePtr, "CONTROL_TCB_POS_KEY", 19)) { + if (TokenMatch(mFilePtr, "CONTROL_TCB_POS_KEY", 19)) { b = true; anim.mPositionType = ASE::Animation::TCB; } if (b) { anim.akeyPositions.emplace_back(); aiVectorKey &key = anim.akeyPositions.back(); - ParseLV4MeshFloatTriple(&key.mValue.x, iIndex); + ParseLV4MeshRealTriple(&key.mValue.x, iIndex); key.mTime = (double)iIndex; } } @@ -1060,8 +1089,8 @@ void Parser::ParseLV3RotAnimationBlock(ASE::Animation &anim) { AI_ASE_PARSER_INIT(); unsigned int iIndex; while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; bool b = false; @@ -1069,18 +1098,18 @@ void Parser::ParseLV3RotAnimationBlock(ASE::Animation &anim) { // we ignore the additional information for bezier's and TCBs // simple scaling keyframe - if (TokenMatch(filePtr, "CONTROL_ROT_SAMPLE", 18)) { + if (TokenMatch(mFilePtr, "CONTROL_ROT_SAMPLE", 18)) { b = true; anim.mRotationType = ASE::Animation::TRACK; } // Bezier scaling keyframe - if (TokenMatch(filePtr, "CONTROL_BEZIER_ROT_KEY", 22)) { + if (TokenMatch(mFilePtr, "CONTROL_BEZIER_ROT_KEY", 22)) { b = true; anim.mRotationType = ASE::Animation::BEZIER; } // TCB scaling keyframe - if (TokenMatch(filePtr, "CONTROL_TCB_ROT_KEY", 19)) { + if (TokenMatch(mFilePtr, "CONTROL_TCB_ROT_KEY", 19)) { b = true; anim.mRotationType = ASE::Animation::TCB; } @@ -1089,8 +1118,8 @@ void Parser::ParseLV3RotAnimationBlock(ASE::Animation &anim) { aiQuatKey &key = anim.akeyRotations.back(); aiVector3D v; ai_real f; - ParseLV4MeshFloatTriple(&v.x, iIndex); - ParseLV4MeshFloat(f); + ParseLV4MeshRealTriple(&v.x, iIndex); + ParseLV4MeshReal(f); key.mTime = (double)iIndex; key.mValue = aiQuaternion(v, f); } @@ -1103,10 +1132,10 @@ void Parser::ParseLV2NodeTransformBlock(ASE::BaseNode &mesh) { AI_ASE_PARSER_INIT(); int mode = 0; while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // name of the node - if (TokenMatch(filePtr, "NODE_NAME", 9)) { + if (TokenMatch(mFilePtr, "NODE_NAME", 9)) { std::string temp; if (!ParseString(temp, "*NODE_NAME")) SkipToNextToken(); @@ -1133,28 +1162,28 @@ void Parser::ParseLV2NodeTransformBlock(ASE::BaseNode &mesh) { if (mode) { // fourth row of the transformation matrix - and also the // only information here that is interesting for targets - if (TokenMatch(filePtr, "TM_ROW3", 7)) { - ParseLV4MeshFloatTriple((mode == 1 ? mesh.mTransform[3] : &mesh.mTargetPosition.x)); + if (TokenMatch(mFilePtr, "TM_ROW3", 7)) { + ParseLV4MeshRealTriple((mode == 1 ? mesh.mTransform[3] : &mesh.mTargetPosition.x)); continue; } if (mode == 1) { // first row of the transformation matrix - if (TokenMatch(filePtr, "TM_ROW0", 7)) { - ParseLV4MeshFloatTriple(mesh.mTransform[0]); + if (TokenMatch(mFilePtr, "TM_ROW0", 7)) { + ParseLV4MeshRealTriple(mesh.mTransform[0]); continue; } // second row of the transformation matrix - if (TokenMatch(filePtr, "TM_ROW1", 7)) { - ParseLV4MeshFloatTriple(mesh.mTransform[1]); + if (TokenMatch(mFilePtr, "TM_ROW1", 7)) { + ParseLV4MeshRealTriple(mesh.mTransform[1]); continue; } // third row of the transformation matrix - if (TokenMatch(filePtr, "TM_ROW2", 7)) { - ParseLV4MeshFloatTriple(mesh.mTransform[2]); + if (TokenMatch(mFilePtr, "TM_ROW2", 7)) { + ParseLV4MeshRealTriple(mesh.mTransform[2]); continue; } // inherited position axes - if (TokenMatch(filePtr, "INHERIT_POS", 11)) { + if (TokenMatch(mFilePtr, "INHERIT_POS", 11)) { unsigned int aiVal[3]; ParseLV4MeshLongTriple(aiVal); @@ -1163,7 +1192,7 @@ void Parser::ParseLV2NodeTransformBlock(ASE::BaseNode &mesh) { continue; } // inherited rotation axes - if (TokenMatch(filePtr, "INHERIT_ROT", 11)) { + if (TokenMatch(mFilePtr, "INHERIT_ROT", 11)) { unsigned int aiVal[3]; ParseLV4MeshLongTriple(aiVal); @@ -1172,7 +1201,7 @@ void Parser::ParseLV2NodeTransformBlock(ASE::BaseNode &mesh) { continue; } // inherited scaling axes - if (TokenMatch(filePtr, "INHERIT_SCL", 11)) { + if (TokenMatch(mFilePtr, "INHERIT_SCL", 11)) { unsigned int aiVal[3]; ParseLV4MeshLongTriple(aiVal); @@ -1197,75 +1226,75 @@ void Parser::ParseLV2MeshBlock(ASE::Mesh &mesh) { unsigned int iNumCVertices = 0; unsigned int iNumCFaces = 0; while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Number of vertices in the mesh - if (TokenMatch(filePtr, "MESH_NUMVERTEX", 14)) { + if (TokenMatch(mFilePtr, "MESH_NUMVERTEX", 14)) { ParseLV4MeshLong(iNumVertices); continue; } // Number of texture coordinates in the mesh - if (TokenMatch(filePtr, "MESH_NUMTVERTEX", 15)) { + if (TokenMatch(mFilePtr, "MESH_NUMTVERTEX", 15)) { ParseLV4MeshLong(iNumTVertices); continue; } // Number of vertex colors in the mesh - if (TokenMatch(filePtr, "MESH_NUMCVERTEX", 15)) { + if (TokenMatch(mFilePtr, "MESH_NUMCVERTEX", 15)) { ParseLV4MeshLong(iNumCVertices); continue; } // Number of regular faces in the mesh - if (TokenMatch(filePtr, "MESH_NUMFACES", 13)) { + if (TokenMatch(mFilePtr, "MESH_NUMFACES", 13)) { ParseLV4MeshLong(iNumFaces); continue; } // Number of UVWed faces in the mesh - if (TokenMatch(filePtr, "MESH_NUMTVFACES", 15)) { + if (TokenMatch(mFilePtr, "MESH_NUMTVFACES", 15)) { ParseLV4MeshLong(iNumTFaces); continue; } // Number of colored faces in the mesh - if (TokenMatch(filePtr, "MESH_NUMCVFACES", 15)) { + if (TokenMatch(mFilePtr, "MESH_NUMCVFACES", 15)) { ParseLV4MeshLong(iNumCFaces); continue; } // mesh vertex list block - if (TokenMatch(filePtr, "MESH_VERTEX_LIST", 16)) { + if (TokenMatch(mFilePtr, "MESH_VERTEX_LIST", 16)) { ParseLV3MeshVertexListBlock(iNumVertices, mesh); continue; } // mesh face list block - if (TokenMatch(filePtr, "MESH_FACE_LIST", 14)) { + if (TokenMatch(mFilePtr, "MESH_FACE_LIST", 14)) { ParseLV3MeshFaceListBlock(iNumFaces, mesh); continue; } // mesh texture vertex list block - if (TokenMatch(filePtr, "MESH_TVERTLIST", 14)) { + if (TokenMatch(mFilePtr, "MESH_TVERTLIST", 14)) { ParseLV3MeshTListBlock(iNumTVertices, mesh); continue; } // mesh texture face block - if (TokenMatch(filePtr, "MESH_TFACELIST", 14)) { + if (TokenMatch(mFilePtr, "MESH_TFACELIST", 14)) { ParseLV3MeshTFaceListBlock(iNumTFaces, mesh); continue; } // mesh color vertex list block - if (TokenMatch(filePtr, "MESH_CVERTLIST", 14)) { + if (TokenMatch(mFilePtr, "MESH_CVERTLIST", 14)) { ParseLV3MeshCListBlock(iNumCVertices, mesh); continue; } // mesh color face block - if (TokenMatch(filePtr, "MESH_CFACELIST", 14)) { + if (TokenMatch(mFilePtr, "MESH_CFACELIST", 14)) { ParseLV3MeshCFaceListBlock(iNumCFaces, mesh); continue; } // mesh normals - if (TokenMatch(filePtr, "MESH_NORMALS", 12)) { + if (TokenMatch(mFilePtr, "MESH_NORMALS", 12)) { ParseLV3MeshNormalListBlock(mesh); continue; } // another mesh UV channel ... - if (TokenMatch(filePtr, "MESH_MAPPINGCHANNEL", 19)) { + if (TokenMatch(mFilePtr, "MESH_MAPPINGCHANNEL", 19)) { unsigned int iIndex(0); ParseLV4MeshLong(iIndex); if (0 == iIndex) { @@ -1290,7 +1319,7 @@ void Parser::ParseLV2MeshBlock(ASE::Mesh &mesh) { } } // mesh animation keyframe. Not supported - if (TokenMatch(filePtr, "MESH_ANIMATION", 14)) { + if (TokenMatch(mFilePtr, "MESH_ANIMATION", 14)) { LogWarning("Found *MESH_ANIMATION element in ASE/ASK file. " "Keyframe animation is not supported by Assimp, this element " @@ -1298,7 +1327,7 @@ void Parser::ParseLV2MeshBlock(ASE::Mesh &mesh) { //SkipSection(); continue; } - if (TokenMatch(filePtr, "MESH_WEIGHTS", 12)) { + if (TokenMatch(mFilePtr, "MESH_WEIGHTS", 12)) { ParseLV3MeshWeightsBlock(mesh); continue; } @@ -1312,26 +1341,26 @@ void Parser::ParseLV3MeshWeightsBlock(ASE::Mesh &mesh) { unsigned int iNumVertices = 0, iNumBones = 0; while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Number of bone vertices ... - if (TokenMatch(filePtr, "MESH_NUMVERTEX", 14)) { + if (TokenMatch(mFilePtr, "MESH_NUMVERTEX", 14)) { ParseLV4MeshLong(iNumVertices); continue; } // Number of bones - if (TokenMatch(filePtr, "MESH_NUMBONE", 12)) { + if (TokenMatch(mFilePtr, "MESH_NUMBONE", 12)) { ParseLV4MeshLong(iNumBones); continue; } // parse the list of bones - if (TokenMatch(filePtr, "MESH_BONE_LIST", 14)) { + if (TokenMatch(mFilePtr, "MESH_BONE_LIST", 14)) { ParseLV4MeshBones(iNumBones, mesh); continue; } // parse the list of bones vertices - if (TokenMatch(filePtr, "MESH_BONE_VERTEX_LIST", 21)) { + if (TokenMatch(mFilePtr, "MESH_BONE_VERTEX_LIST", 21)) { ParseLV4MeshBonesVertices(iNumVertices, mesh); continue; } @@ -1344,14 +1373,14 @@ void Parser::ParseLV4MeshBones(unsigned int iNumBones, ASE::Mesh &mesh) { AI_ASE_PARSER_INIT(); mesh.mBones.resize(iNumBones, Bone("UNNAMED")); while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Mesh bone with name ... - if (TokenMatch(filePtr, "MESH_BONE_NAME", 14)) { + if (TokenMatch(mFilePtr, "MESH_BONE_NAME", 14)) { // parse an index ... - if (SkipSpaces(&filePtr)) { - unsigned int iIndex = strtoul10(filePtr, &filePtr); + if (SkipSpaces(&mFilePtr, mEnd)) { + unsigned int iIndex = strtoul10(mFilePtr, &mFilePtr); if (iIndex >= iNumBones) { LogWarning("Bone index is out of bounds"); continue; @@ -1370,32 +1399,35 @@ void Parser::ParseLV4MeshBonesVertices(unsigned int iNumVertices, ASE::Mesh &mes AI_ASE_PARSER_INIT(); mesh.mBoneVertices.resize(iNumVertices); while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Mesh bone vertex - if (TokenMatch(filePtr, "MESH_BONE_VERTEX", 16)) { + if (TokenMatch(mFilePtr, "MESH_BONE_VERTEX", 16)) { // read the vertex index - unsigned int iIndex = strtoul10(filePtr, &filePtr); - if (iIndex >= mesh.mPositions.size()) { - iIndex = (unsigned int)mesh.mPositions.size() - 1; + unsigned int iIndex = strtoul10(mFilePtr, &mFilePtr); + if (mesh.mBoneVertices.empty()) { + SkipSection(); + } + if (iIndex >= mesh.mBoneVertices.size() ) { LogWarning("Bone vertex index is out of bounds. Using the largest valid " "bone vertex index instead"); + iIndex = (unsigned int)mesh.mBoneVertices.size() - 1; } // --- ignored ai_real afVert[3]; - ParseLV4MeshFloatTriple(afVert); + ParseLV4MeshRealTriple(afVert); std::pair pairOut; while (true) { // first parse the bone index ... - if (!SkipSpaces(&filePtr)) break; - pairOut.first = strtoul10(filePtr, &filePtr); + if (!SkipSpaces(&mFilePtr, mEnd)) break; + pairOut.first = strtoul10(mFilePtr, &mFilePtr); // then parse the vertex weight - if (!SkipSpaces(&filePtr)) break; - filePtr = fast_atoreal_move(filePtr, pairOut.second); + if (!SkipSpaces(&mFilePtr, mEnd)) break; + mFilePtr = fast_atoreal_move(mFilePtr, pairOut.second); // -1 marks unused entries if (-1 != pairOut.first) { @@ -1416,15 +1448,15 @@ void Parser::ParseLV3MeshVertexListBlock( // allocate enough storage in the array mesh.mPositions.resize(iNumVertices); while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Vertex entry - if (TokenMatch(filePtr, "MESH_VERTEX", 11)) { + if (TokenMatch(mFilePtr, "MESH_VERTEX", 11)) { aiVector3D vTemp; unsigned int iIndex; - ParseLV4MeshFloatTriple(&vTemp.x, iIndex); + ParseLV4MeshRealTriple(&vTemp.x, iIndex); if (iIndex >= iNumVertices) { LogWarning("Invalid vertex index. It will be ignored"); @@ -1443,11 +1475,11 @@ void Parser::ParseLV3MeshFaceListBlock(unsigned int iNumFaces, ASE::Mesh &mesh) // allocate enough storage in the face array mesh.mFaces.resize(iNumFaces); while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Face entry - if (TokenMatch(filePtr, "MESH_FACE", 9)) { + if (TokenMatch(mFilePtr, "MESH_FACE", 9)) { ASE::Face mFace; ParseLV4MeshFace(mFace); @@ -1470,14 +1502,14 @@ void Parser::ParseLV3MeshTListBlock(unsigned int iNumVertices, // allocate enough storage in the array mesh.amTexCoords[iChannel].resize(iNumVertices); while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Vertex entry - if (TokenMatch(filePtr, "MESH_TVERT", 10)) { + if (TokenMatch(mFilePtr, "MESH_TVERT", 10)) { aiVector3D vTemp; unsigned int iIndex; - ParseLV4MeshFloatTriple(&vTemp.x, iIndex); + ParseLV4MeshRealTriple(&vTemp.x, iIndex); if (iIndex >= iNumVertices) { LogWarning("Tvertex has an invalid index. It will be ignored"); @@ -1499,11 +1531,11 @@ void Parser::ParseLV3MeshTFaceListBlock(unsigned int iNumFaces, ASE::Mesh &mesh, unsigned int iChannel) { AI_ASE_PARSER_INIT(); while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Face entry - if (TokenMatch(filePtr, "MESH_TFACE", 10)) { + if (TokenMatch(mFilePtr, "MESH_TFACE", 10)) { unsigned int aiValues[3]; unsigned int iIndex = 0; @@ -1529,26 +1561,26 @@ void Parser::ParseLV3MappingChannel(unsigned int iChannel, ASE::Mesh &mesh) { unsigned int iNumTVertices = 0; unsigned int iNumTFaces = 0; while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Number of texture coordinates in the mesh - if (TokenMatch(filePtr, "MESH_NUMTVERTEX", 15)) { + if (TokenMatch(mFilePtr, "MESH_NUMTVERTEX", 15)) { ParseLV4MeshLong(iNumTVertices); continue; } // Number of UVWed faces in the mesh - if (TokenMatch(filePtr, "MESH_NUMTVFACES", 15)) { + if (TokenMatch(mFilePtr, "MESH_NUMTVFACES", 15)) { ParseLV4MeshLong(iNumTFaces); continue; } // mesh texture vertex list block - if (TokenMatch(filePtr, "MESH_TVERTLIST", 14)) { + if (TokenMatch(mFilePtr, "MESH_TVERTLIST", 14)) { ParseLV3MeshTListBlock(iNumTVertices, mesh, iChannel); continue; } // mesh texture face block - if (TokenMatch(filePtr, "MESH_TFACELIST", 14)) { + if (TokenMatch(mFilePtr, "MESH_TFACELIST", 14)) { ParseLV3MeshTFaceListBlock(iNumTFaces, mesh, iChannel); continue; } @@ -1563,11 +1595,11 @@ void Parser::ParseLV3MeshCListBlock(unsigned int iNumVertices, ASE::Mesh &mesh) // allocate enough storage in the array mesh.mVertexColors.resize(iNumVertices); while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Vertex entry - if (TokenMatch(filePtr, "MESH_VERTCOL", 12)) { + if (TokenMatch(mFilePtr, "MESH_VERTCOL", 12)) { aiColor4D vTemp; vTemp.a = 1.0f; unsigned int iIndex; @@ -1587,11 +1619,11 @@ void Parser::ParseLV3MeshCListBlock(unsigned int iNumVertices, ASE::Mesh &mesh) void Parser::ParseLV3MeshCFaceListBlock(unsigned int iNumFaces, ASE::Mesh &mesh) { AI_ASE_PARSER_INIT(); while (true) { - if ('*' == *filePtr) { - ++filePtr; + if ('*' == *mFilePtr) { + ++mFilePtr; // Face entry - if (TokenMatch(filePtr, "MESH_CFACE", 10)) { + if (TokenMatch(mFilePtr, "MESH_CFACE", 10)) { unsigned int aiValues[3]; unsigned int iIndex = 0; @@ -1624,11 +1656,11 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh &sMesh) { // Smooth the vertex and face normals together. The result // will be edgy then, but otherwise everything would be soft ... while (true) { - if ('*' == *filePtr) { - ++filePtr; - if (faceIdx != UINT_MAX && TokenMatch(filePtr, "MESH_VERTEXNORMAL", 17)) { + if ('*' == *mFilePtr) { + ++mFilePtr; + if (faceIdx != UINT_MAX && TokenMatch(mFilePtr, "MESH_VERTEXNORMAL", 17)) { aiVector3D vNormal; - ParseLV4MeshFloatTriple(&vNormal.x, index); + ParseLV4MeshRealTriple(&vNormal.x, index); if (faceIdx >= sMesh.mFaces.size()) continue; @@ -1648,9 +1680,9 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh &sMesh) { sMesh.mNormals[faceIdx * 3 + index] += vNormal; continue; } - if (TokenMatch(filePtr, "MESH_FACENORMAL", 15)) { + if (TokenMatch(mFilePtr, "MESH_FACENORMAL", 15)) { aiVector3D vNormal; - ParseLV4MeshFloatTriple(&vNormal.x, faceIdx); + ParseLV4MeshRealTriple(&vNormal.x, faceIdx); if (faceIdx >= sMesh.mFaces.size()) { ASSIMP_LOG_ERROR("ASE: Invalid vertex index in MESH_FACENORMAL section"); @@ -1670,34 +1702,34 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh &sMesh) { // ------------------------------------------------------------------------------------------------ void Parser::ParseLV4MeshFace(ASE::Face &out) { // skip spaces and tabs - if (!SkipSpaces(&filePtr)) { + if (!SkipSpaces(&mFilePtr, mEnd)) { LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL [#1]"); SkipToNextToken(); return; } // parse the face index - out.iFace = strtoul10(filePtr, &filePtr); + out.iFace = strtoul10(mFilePtr, &mFilePtr); // next character should be ':' - if (!SkipSpaces(&filePtr)) { + if (!SkipSpaces(&mFilePtr, mEnd)) { // FIX: there are some ASE files which haven't got : here .... LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL. \':\' expected [#2]"); SkipToNextToken(); return; } // FIX: There are some ASE files which haven't got ':' here - if (':' == *filePtr) ++filePtr; + if (':' == *mFilePtr) ++mFilePtr; // Parse all mesh indices for (unsigned int i = 0; i < 3; ++i) { unsigned int iIndex = 0; - if (!SkipSpaces(&filePtr)) { + if (!SkipSpaces(&mFilePtr, mEnd)) { LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL"); SkipToNextToken(); return; } - switch (*filePtr) { + switch (*mFilePtr) { case 'A': case 'a': break; @@ -1715,39 +1747,39 @@ void Parser::ParseLV4MeshFace(ASE::Face &out) { SkipToNextToken(); return; }; - ++filePtr; + ++mFilePtr; // next character should be ':' - if (!SkipSpaces(&filePtr) || ':' != *filePtr) { + if (!SkipSpaces(&mFilePtr, mEnd) || ':' != *mFilePtr) { LogWarning("Unable to parse *MESH_FACE Element: " "Unexpected EOL. \':\' expected [#2]"); SkipToNextToken(); return; } - ++filePtr; - if (!SkipSpaces(&filePtr)) { + ++mFilePtr; + if (!SkipSpaces(&mFilePtr, mEnd)) { LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL. " - "Vertex index ecpected [#4]"); + "Vertex index expected [#4]"); SkipToNextToken(); return; } - out.mIndices[iIndex] = strtoul10(filePtr, &filePtr); + out.mIndices[iIndex] = strtoul10(mFilePtr, &mFilePtr); } // now we need to skip the AB, BC, CA blocks. while (true) { - if ('*' == *filePtr) break; - if (IsLineEnd(*filePtr)) { + if ('*' == *mFilePtr) break; + if (IsLineEnd(*mFilePtr)) { //iLineNumber++; return; } - filePtr++; + mFilePtr++; } // parse the smoothing group of the face - if (TokenMatch(filePtr, "*MESH_SMOOTHING", 15)) { - if (!SkipSpaces(&filePtr)) { + if (TokenMatch(mFilePtr, "*MESH_SMOOTHING", 15)) { + if (!SkipSpaces(&mFilePtr, mEnd)) { LogWarning("Unable to parse *MESH_SMOOTHING Element: " "Unexpected EOL. Smoothing group(s) expected [#5]"); SkipToNextToken(); @@ -1757,43 +1789,43 @@ void Parser::ParseLV4MeshFace(ASE::Face &out) { // Parse smoothing groups until we don't anymore see commas // FIX: There needn't always be a value, sad but true while (true) { - if (*filePtr < '9' && *filePtr >= '0') { - uint32_t value = strtoul10(filePtr, &filePtr); + if (*mFilePtr < '9' && *mFilePtr >= '0') { + uint32_t value = strtoul10(mFilePtr, &mFilePtr); if (value < 32) { - out.iSmoothGroup |= (1 << strtoul10(filePtr, &filePtr)); + out.iSmoothGroup |= (1 << strtoul10(mFilePtr, &mFilePtr)); } else { const std::string message = std::string("Unable to set smooth group, value with ") + ai_to_string(value) + std::string(" out of range"); LogWarning(message.c_str()); } } - SkipSpaces(&filePtr); - if (',' != *filePtr) { + SkipSpaces(&mFilePtr, mEnd); + if (',' != *mFilePtr) { break; } - ++filePtr; - SkipSpaces(&filePtr); + ++mFilePtr; + SkipSpaces(&mFilePtr, mEnd); } } // *MESH_MTLID is optional, too while (true) { - if ('*' == *filePtr) { + if ('*' == *mFilePtr) { break; } - if (IsLineEnd(*filePtr)) { + if (IsLineEnd(*mFilePtr)) { return; } - filePtr++; + mFilePtr++; } - if (TokenMatch(filePtr, "*MESH_MTLID", 11)) { - if (!SkipSpaces(&filePtr)) { + if (TokenMatch(mFilePtr, "*MESH_MTLID", 11)) { + if (!SkipSpaces(&mFilePtr, mEnd)) { LogWarning("Unable to parse *MESH_MTLID Element: Unexpected EOL. " "Material index expected [#6]"); SkipToNextToken(); return; } - out.iMaterial = strtoul10(filePtr, &filePtr); + out.iMaterial = strtoul10(mFilePtr, &mFilePtr); } return; } @@ -1815,7 +1847,17 @@ void Parser::ParseLV4MeshLongTriple(unsigned int *apOut, unsigned int &rIndexOut ParseLV4MeshLongTriple(apOut); } // ------------------------------------------------------------------------------------------------ -void Parser::ParseLV4MeshFloatTriple(ai_real *apOut, unsigned int &rIndexOut) { +void Parser::ParseLV4MeshRealTriple(ai_real *apOut, unsigned int &rIndexOut) { + ai_assert(nullptr != apOut); + + // parse the index + ParseLV4MeshLong(rIndexOut); + + // parse the three others + ParseLV4MeshRealTriple(apOut); +} +// ------------------------------------------------------------------------------------------------ +void Parser::ParseLV4MeshFloatTriple(float* apOut, unsigned int& rIndexOut) { ai_assert(nullptr != apOut); // parse the index @@ -1825,7 +1867,15 @@ void Parser::ParseLV4MeshFloatTriple(ai_real *apOut, unsigned int &rIndexOut) { ParseLV4MeshFloatTriple(apOut); } // ------------------------------------------------------------------------------------------------ -void Parser::ParseLV4MeshFloatTriple(ai_real *apOut) { +void Parser::ParseLV4MeshRealTriple(ai_real *apOut) { + ai_assert(nullptr != apOut); + + for (unsigned int i = 0; i < 3; ++i) { + ParseLV4MeshReal(apOut[i]); + } +} +// ------------------------------------------------------------------------------------------------ +void Parser::ParseLV4MeshFloatTriple(float* apOut) { ai_assert(nullptr != apOut); for (unsigned int i = 0; i < 3; ++i) { @@ -1833,9 +1883,9 @@ void Parser::ParseLV4MeshFloatTriple(ai_real *apOut) { } } // ------------------------------------------------------------------------------------------------ -void Parser::ParseLV4MeshFloat(ai_real &fOut) { +void Parser::ParseLV4MeshReal(ai_real &fOut) { // skip spaces and tabs - if (!SkipSpaces(&filePtr)) { + if (!SkipSpaces(&mFilePtr, mEnd)) { // LOG LogWarning("Unable to parse float: unexpected EOL [#1]"); fOut = 0.0; @@ -1843,12 +1893,25 @@ void Parser::ParseLV4MeshFloat(ai_real &fOut) { return; } // parse the first float - filePtr = fast_atoreal_move(filePtr, fOut); + mFilePtr = fast_atoreal_move(mFilePtr, fOut); +} +// ------------------------------------------------------------------------------------------------ +void Parser::ParseLV4MeshFloat(float &fOut) { + // skip spaces and tabs + if (!SkipSpaces(&mFilePtr, mEnd)) { + // LOG + LogWarning("Unable to parse float: unexpected EOL [#1]"); + fOut = 0.0; + ++iLineNumber; + return; + } + // parse the first float + mFilePtr = fast_atoreal_move(mFilePtr, fOut); } // ------------------------------------------------------------------------------------------------ void Parser::ParseLV4MeshLong(unsigned int &iOut) { // Skip spaces and tabs - if (!SkipSpaces(&filePtr)) { + if (!SkipSpaces(&mFilePtr, mEnd)) { // LOG LogWarning("Unable to parse long: unexpected EOL [#1]"); iOut = 0; @@ -1856,7 +1919,9 @@ void Parser::ParseLV4MeshLong(unsigned int &iOut) { return; } // parse the value - iOut = strtoul10(filePtr, &filePtr); + iOut = strtoul10(mFilePtr, &mFilePtr); +} + } #endif // ASSIMP_BUILD_NO_3DS_IMPORTER diff --git a/code/AssetLib/ASE/ASEParser.h b/code/AssetLib/ASE/ASEParser.h index c41cd59d35..8892b82c5c 100644 --- a/code/AssetLib/ASE/ASEParser.h +++ b/code/AssetLib/ASE/ASEParser.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -57,14 +57,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ASE is quite similar to 3ds. We can reuse some structures #include "AssetLib/3DS/3DSLoader.h" -namespace Assimp { -namespace ASE { +namespace Assimp::ASE { using namespace D3DS; // --------------------------------------------------------------------------- /** Helper structure representing an ASE material */ -struct Material : public D3DS::Material { +struct Material final : D3DS::Material { //! Default constructor has been deleted Material() = delete; @@ -115,7 +114,7 @@ struct Material : public D3DS::Material { return *this; } - ~Material() = default; + ~Material() override = default; //! Contains all sub materials of this material std::vector avSubMaterials; @@ -373,8 +372,8 @@ struct Dummy : public BaseNode { }; // Parameters to Parser::Parse() -#define AI_ASE_NEW_FILE_FORMAT 200 -#define AI_ASE_OLD_FILE_FORMAT 110 +static constexpr unsigned int AI_ASE_NEW_FILE_FORMAT = 200; +static constexpr unsigned int AI_ASE_OLD_FILE_FORMAT = 110; // Internally we're a little bit more tolerant #define AI_ASE_IS_NEW_FILE_FORMAT() (iFileFormat >= 200) @@ -391,11 +390,11 @@ class Parser { // ------------------------------------------------------------------- //! Construct a parser from a given input file which is //! guaranteed to be terminated with zero. - //! @param szFile Input file + //! @param file The name of the input file. //! @param fileFormatDefault Assumed file format version. If the //! file format is specified in the file the new value replaces //! the default value. - Parser(const char *szFile, unsigned int fileFormatDefault); + Parser(const char *file, size_t fileLen, unsigned int fileFormatDefault); // ------------------------------------------------------------------- //! Parses the file into the parsers internal representation @@ -553,13 +552,15 @@ class Parser { //! (also works for MESH_TVERT, MESH_CFACE, MESH_VERTCOL ...) //! \param apOut Output buffer (3 floats) //! \param rIndexOut Output index - void ParseLV4MeshFloatTriple(ai_real *apOut, unsigned int &rIndexOut); + void ParseLV4MeshRealTriple(ai_real *apOut, unsigned int &rIndexOut); + void ParseLV4MeshFloatTriple(float *apOut, unsigned int &rIndexOut); // ------------------------------------------------------------------- //! Parse a *MESH_VERT block in a file //! (also works for MESH_TVERT, MESH_CFACE, MESH_VERTCOL ...) //! \param apOut Output buffer (3 floats) - void ParseLV4MeshFloatTriple(ai_real *apOut); + void ParseLV4MeshRealTriple(ai_real *apOut); + void ParseLV4MeshFloatTriple(float *apOut); // ------------------------------------------------------------------- //! Parse a *MESH_TFACE block in a file @@ -577,7 +578,8 @@ class Parser { // ------------------------------------------------------------------- //! Parse a single float element //! \param fOut Output float - void ParseLV4MeshFloat(ai_real &fOut); + void ParseLV4MeshReal(ai_real &fOut); + void ParseLV4MeshFloat(float &fOut); // ------------------------------------------------------------------- //! Parse a single int element @@ -617,8 +619,8 @@ class Parser { bool ParseString(std::string &out, const char *szName); public: - //! Pointer to current data - const char *filePtr; + const char *mFilePtr; ////< Pointer to current data + const char *mEnd; ///< The end pointer of the file data //! background color to be passed to the viewer //! QNAN if none was found @@ -665,8 +667,7 @@ class Parser { unsigned int iFileFormat; }; -} // Namespace ASE -} // namespace Assimp +} // Namespace Assimp::ASE #endif // ASSIMP_BUILD_NO_3DS_IMPORTER diff --git a/code/AssetLib/Assbin/AssbinExporter.cpp b/code/AssetLib/Assbin/AssbinExporter.cpp index 149b3c5f30..2a595021a6 100644 --- a/code/AssetLib/Assbin/AssbinExporter.cpp +++ b/code/AssetLib/Assbin/AssbinExporter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. diff --git a/code/AssetLib/Assbin/AssbinExporter.h b/code/AssetLib/Assbin/AssbinExporter.h index 8b721994d4..f0d0d07055 100644 --- a/code/AssetLib/Assbin/AssbinExporter.h +++ b/code/AssetLib/Assbin/AssbinExporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. diff --git a/code/AssetLib/Assbin/AssbinFileWriter.cpp b/code/AssetLib/Assbin/AssbinFileWriter.cpp index e9d857a840..fd6b17002d 100644 --- a/code/AssetLib/Assbin/AssbinFileWriter.cpp +++ b/code/AssetLib/Assbin/AssbinFileWriter.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -50,11 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#ifdef ASSIMP_BUILD_NO_OWN_ZLIB -#include -#else -#include "../contrib/zlib/zlib.h" -#endif +#include "zlib.h" #include @@ -243,29 +239,7 @@ inline size_t WriteArray(IOStream *stream, const T *in, unsigned int 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; - } - +class AssbinChunkWriter final : public IOStream { public: AssbinChunkWriter(IOStream *container, uint32_t magic, size_t initial = 4096) : buffer(nullptr), @@ -319,6 +293,28 @@ class AssbinChunkWriter : public IOStream { return pCount; } + +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; + } + +private: + uint8_t *buffer; + uint32_t magic; + IOStream *container; + size_t cur_size, cursor, initial; }; // ---------------------------------------------------------------------------------- diff --git a/code/AssetLib/Assbin/AssbinFileWriter.h b/code/AssetLib/Assbin/AssbinFileWriter.h index cfed3b400c..1b101b5bf7 100644 --- a/code/AssetLib/Assbin/AssbinFileWriter.h +++ b/code/AssetLib/Assbin/AssbinFileWriter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. diff --git a/code/AssetLib/Assbin/AssbinLoader.cpp b/code/AssetLib/Assbin/AssbinLoader.cpp index f7b35636c7..c87d6a08b3 100644 --- a/code/AssetLib/Assbin/AssbinLoader.cpp +++ b/code/AssetLib/Assbin/AssbinLoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_ASSBIN_IMPORTER // internal headers -#include "AssetLib/Assbin/AssbinLoader.h" +#include "AssbinLoader.h" #include "Common/assbin_chunks.h" #include #include @@ -65,7 +65,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace Assimp; -static const aiImporterDesc desc = { +static constexpr aiImporterDesc desc = { "Assimp Binary Importer", "Gargaj / Conspiracy", "", @@ -91,10 +91,14 @@ bool AssbinImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, boo } char s[32]; - in->Read(s, sizeof(char), 32); + const size_t read = in->Read(s, sizeof(char), 32); pIOHandler->Close(in); + if (read < 19) { + return false; + } + return strncmp(s, "ASSIMP.binary-dump.", 19) == 0; } @@ -684,6 +688,7 @@ void AssbinImporter::InternReadFile(const std::string &pFile, aiScene *pScene, I unsigned int versionMajor = Read(stream); unsigned int versionMinor = Read(stream); if (versionMinor != ASSBIN_VERSION_MINOR || versionMajor != ASSBIN_VERSION_MAJOR) { + pIOHandler->Close(stream); throw DeadlyImportError("Invalid version, data format not compatible!"); } @@ -693,8 +698,10 @@ void AssbinImporter::InternReadFile(const std::string &pFile, aiScene *pScene, I shortened = Read(stream) > 0; compressed = Read(stream) > 0; - if (shortened) + if (shortened) { + pIOHandler->Close(stream); throw DeadlyImportError("Shortened binaries are not supported!"); + } stream->Seek(256, aiOrigin_CUR); // original filename stream->Seek(128, aiOrigin_CUR); // options diff --git a/code/AssetLib/Assbin/AssbinLoader.h b/code/AssetLib/Assbin/AssbinLoader.h index f922b91fd4..f1a550c7d0 100644 --- a/code/AssetLib/Assbin/AssbinLoader.h +++ b/code/AssetLib/Assbin/AssbinLoader.h @@ -1,9 +1,8 @@ - /* Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -61,7 +60,7 @@ struct aiCamera; #ifndef ASSIMP_BUILD_NO_ASSBIN_IMPORTER -namespace Assimp { +namespace Assimp { // --------------------------------------------------------------------------------- /** Importer class for 3D Studio r3 and r4 3DS files diff --git a/code/AssetLib/Assxml/AssxmlExporter.cpp b/code/AssetLib/Assxml/AssxmlExporter.cpp index 731916a25e..511abab725 100644 --- a/code/AssetLib/Assxml/AssxmlExporter.cpp +++ b/code/AssetLib/Assxml/AssxmlExporter.cpp @@ -2,8 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team - +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -50,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -namespace Assimp { +namespace Assimp { void ExportSceneAssxml(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/) { diff --git a/code/AssetLib/Assxml/AssxmlExporter.h b/code/AssetLib/Assxml/AssxmlExporter.h index 6fcdebfab7..c3bdeabf50 100644 --- a/code/AssetLib/Assxml/AssxmlExporter.h +++ b/code/AssetLib/Assxml/AssxmlExporter.h @@ -2,8 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team - +Copyright (c) 2006-2026, assimp team All rights reserved. diff --git a/code/AssetLib/Assxml/AssxmlFileWriter.cpp b/code/AssetLib/Assxml/AssxmlFileWriter.cpp index 8f8e76bd2f..8a35f0aac5 100644 --- a/code/AssetLib/Assxml/AssxmlFileWriter.cpp +++ b/code/AssetLib/Assxml/AssxmlFileWriter.cpp @@ -2,8 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team - +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -36,7 +35,6 @@ 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. - ---------------------------------------------------------------------- */ @@ -79,8 +77,7 @@ static int ioprintf(IOStream *io, const char *format, ...) { } static const int Size = 4096; - char sz[Size]; - ::memset(sz, '\0', Size); + char sz[Size] = {}; va_list va; va_start(va, format); const unsigned int nSize = vsnprintf(sz, Size - 1, format, va); @@ -223,7 +220,7 @@ static void WriteDump(const char *pFile, const char *cmd, const aiScene *scene, const unsigned int majorVersion(aiGetVersionMajor()); const unsigned int minorVersion(aiGetVersionMinor()); const unsigned int rev(aiGetVersionRevision()); - const char *curtime(asctime(p)); + const char *curtime = asctime(p); ioprintf(io, header.c_str(), majorVersion, minorVersion, rev, pFile, c.c_str(), curtime, scene->mFlags, 0u); // write the node graph @@ -304,7 +301,11 @@ static void WriteDump(const char *pFile, const char *cmd, const aiScene *scene, bool compressed = (tex->mHeight == 0); // mesh header - ioprintf(io, "\t \n", + std::string texName = "unknown"; + if (tex->mFilename.length != 0u) { + texName = tex->mFilename.data; + } + ioprintf(io, "\t \n", texName.c_str(), (compressed ? -1 : tex->mWidth), (compressed ? -1 : tex->mHeight), (compressed ? "true" : "false")); @@ -352,7 +353,7 @@ static void WriteDump(const char *pFile, const char *cmd, const aiScene *scene, for (unsigned int n = 0; n < mat->mNumProperties; ++n) { const aiMaterialProperty *prop = mat->mProperties[n]; - const char *sz = ""; + auto sz = ""; if (prop->mType == aiPTI_Float) { sz = "float"; } else if (prop->mType == aiPTI_Integer) { diff --git a/code/AssetLib/Assxml/AssxmlFileWriter.h b/code/AssetLib/Assxml/AssxmlFileWriter.h index 0620c9db73..894eb12caf 100644 --- a/code/AssetLib/Assxml/AssxmlFileWriter.h +++ b/code/AssetLib/Assxml/AssxmlFileWriter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. diff --git a/code/AssetLib/B3D/B3DImporter.cpp b/code/AssetLib/B3D/B3DImporter.cpp index bf8145798e..680371627b 100644 --- a/code/AssetLib/B3D/B3DImporter.cpp +++ b/code/AssetLib/B3D/B3DImporter.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_B3D_IMPORTER // internal headers -#include "AssetLib/B3D/B3DImporter.h" +#include "B3DImporter.h" #include "PostProcessing/ConvertToLHProcess.h" #include "PostProcessing/TextureTransform.h" @@ -59,10 +59,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -using namespace Assimp; +namespace Assimp { using namespace std; -static const aiImporterDesc desc = { +static constexpr aiImporterDesc desc = { "BlitzBasic 3D Importer", "", "", @@ -79,9 +79,9 @@ static const aiImporterDesc desc = { #pragma warning(disable : 4018) #endif -//#define DEBUG_B3D +// #define DEBUG_B3D -template +template void DeleteAllBarePointers(std::vector &x) { for (auto p : x) { delete p; @@ -329,7 +329,7 @@ void B3DImporter::ReadBRUS() { mat->AddProperty(&i, 1, AI_MATKEY_TWOSIDED); } - //Textures + // Textures for (int i = 0; i < n_texs; ++i) { int texid = ReadInt(); if (texid < -1 || (texid >= 0 && texid >= static_cast(_textures.size()))) { @@ -372,7 +372,7 @@ void B3DImporter::ReadVRTS() { } if (_vflags & 2) { - ReadQuat(); //skip v 4bytes... + ReadQuat(); // skip v 4bytes... } for (int j = 0; j < _tcsets; ++j) { @@ -469,9 +469,11 @@ void B3DImporter::ReadBONE(int id) { } // ------------------------------------------------------------------------------------------------ -void B3DImporter::ReadKEYS(aiNodeAnim *nodeAnim) { - vector trans, scale; - vector rot; +void B3DImporter::ReadKEYS(AnimKeys& keys) { + vector& trans = keys.positionKeys; + vector& scale = keys.scalingKeys; + vector& rot = keys.rotationKeys; + int flags = ReadInt(); while (ChunkSize()) { int frame = ReadInt(); @@ -485,21 +487,6 @@ void B3DImporter::ReadKEYS(aiNodeAnim *nodeAnim) { rot.emplace_back(frame, ReadQuat()); } } - - if (flags & 1) { - nodeAnim->mNumPositionKeys = static_cast(trans.size()); - nodeAnim->mPositionKeys = to_array(trans); - } - - if (flags & 2) { - nodeAnim->mNumScalingKeys = static_cast(scale.size()); - nodeAnim->mScalingKeys = to_array(scale); - } - - if (flags & 4) { - nodeAnim->mNumRotationKeys = static_cast(rot.size()); - nodeAnim->mRotationKeys = to_array(rot); - } } // ------------------------------------------------------------------------------------------------ @@ -542,6 +529,7 @@ aiNode *B3DImporter::ReadNODE(aiNode *parent) { std::unique_ptr nodeAnim; vector meshes; vector children; + AnimKeys keys; while (ChunkSize()) { const string chunk = ReadChunk(); @@ -560,7 +548,7 @@ aiNode *B3DImporter::ReadNODE(aiNode *parent) { nodeAnim.reset(new aiNodeAnim); nodeAnim->mNodeName = node->mName; } - ReadKEYS(nodeAnim.get()); + ReadKEYS(keys); } else if (chunk == "NODE") { aiNode *child = ReadNODE(node); children.push_back(child); @@ -569,6 +557,21 @@ aiNode *B3DImporter::ReadNODE(aiNode *parent) { } if (nodeAnim) { + if (!keys.positionKeys.empty()) { + nodeAnim->mNumPositionKeys = static_cast(keys.positionKeys.size()); + nodeAnim->mPositionKeys = to_array(keys.positionKeys); + } + + if (!keys.scalingKeys.empty()) { + nodeAnim->mNumScalingKeys = static_cast(keys.scalingKeys.size()); + nodeAnim->mScalingKeys = to_array(keys.scalingKeys); + } + + if (!keys.rotationKeys.empty()) { + nodeAnim->mNumRotationKeys = static_cast(keys.rotationKeys.size()); + nodeAnim->mRotationKeys = to_array(keys.rotationKeys); + } + _nodeAnims.emplace_back(std::move(nodeAnim)); } @@ -704,22 +707,22 @@ void B3DImporter::ReadBB3D(aiScene *scene) { } } - //nodes + // nodes scene->mRootNode = _nodes[0]; _nodes.clear(); // node ownership now belongs to scene - //material + // material if (!_materials.size()) { _materials.emplace_back(std::unique_ptr(new aiMaterial)); } scene->mNumMaterials = static_cast(_materials.size()); scene->mMaterials = unique_to_array(_materials); - //meshes + // meshes scene->mNumMeshes = static_cast(_meshes.size()); scene->mMeshes = unique_to_array(_meshes); - //animations + // animations if (_animations.size() == 1 && _nodeAnims.size()) { aiAnimation *anim = _animations.back().get(); @@ -738,4 +741,6 @@ void B3DImporter::ReadBB3D(aiScene *scene) { flip.Execute(scene); } +} // namespace Assimp + #endif // !! ASSIMP_BUILD_NO_B3D_IMPORTER diff --git a/code/AssetLib/B3D/B3DImporter.h b/code/AssetLib/B3D/B3DImporter.h index e47d9078bd..9aa5350def 100644 --- a/code/AssetLib/B3D/B3DImporter.h +++ b/code/AssetLib/B3D/B3DImporter.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -49,6 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include #include @@ -60,7 +61,7 @@ struct aiAnimation; namespace Assimp{ -class B3DImporter : public BaseImporter{ +class B3DImporter final : public BaseImporter{ public: B3DImporter() = default; ~B3DImporter() override; @@ -94,6 +95,12 @@ class B3DImporter : public BaseImporter{ float weights[4]; }; + struct AnimKeys { + std::vector positionKeys; + std::vector scalingKeys; + std::vector rotationKeys; + }; + AI_WONT_RETURN void Oops() AI_WONT_RETURN_SUFFIX; AI_WONT_RETURN void Fail(const std::string &str) AI_WONT_RETURN_SUFFIX; @@ -104,7 +111,7 @@ class B3DImporter : public BaseImporter{ void ReadTRIS( int v0 ); void ReadMESH(); void ReadBONE( int id ); - void ReadKEYS( aiNodeAnim *nodeAnim ); + void ReadKEYS( AnimKeys& keys ); void ReadANIM(); aiNode *ReadNODE( aiNode *parent ); diff --git a/code/AssetLib/BVH/BVHLoader.cpp b/code/AssetLib/BVH/BVHLoader.cpp index d92887c9e6..e655034074 100644 --- a/code/AssetLib/BVH/BVHLoader.cpp +++ b/code/AssetLib/BVH/BVHLoader.cpp @@ -4,9 +4,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team - - +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -55,10 +53,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -using namespace Assimp; +namespace Assimp { + using namespace Assimp::Formatter; -static const aiImporterDesc desc = { +static constexpr aiImporterDesc desc = { "BVH Importer (MoCap)", "", "", @@ -73,8 +72,8 @@ static const aiImporterDesc desc = { // ------------------------------------------------------------------------------------------------ // Aborts the file reading with an exception -template -AI_WONT_RETURN void BVHLoader::ThrowException(T&&... args) { +template +AI_WONT_RETURN void BVHLoader::ThrowException(T &&...args) { throw DeadlyImportError(mFileName, ":", mLine, " - ", args...); } @@ -84,11 +83,9 @@ BVHLoader::BVHLoader() : mLine(), mAnimTickDuration(), mAnimNumFrames(), - noSkeletonMesh() {} - -// ------------------------------------------------------------------------------------------------ -// Destructor, private as well -BVHLoader::~BVHLoader() = default; + noSkeletonMesh() { + // empty +} // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. @@ -388,7 +385,7 @@ float BVHLoader::GetNextTokenAsFloat() { // check if the float is valid by testing if the atof() function consumed every char of the token const char *ctoken = token.c_str(); float result = 0.0f; - ctoken = fast_atoreal_move(ctoken, result); + ctoken = fast_atoreal_move(ctoken, result); if (ctoken != token.c_str() + token.length()) ThrowException("Expected a floating point number, but found \"", token, "\"."); @@ -426,7 +423,7 @@ void BVHLoader::CreateAnimation(aiScene *pScene) { nodeAnim->mNodeName.Set(nodeName); std::map channelMap; - //Build map of channels + // Build map of channels for (unsigned int channel = 0; channel < node.mChannels.size(); ++channel) { channelMap[node.mChannels[channel]] = channel; } @@ -441,7 +438,7 @@ void BVHLoader::CreateAnimation(aiScene *pScene) { // Now compute all translations for (BVHLoader::ChannelType channel = Channel_PositionX; channel <= Channel_PositionZ; channel = (BVHLoader::ChannelType)(channel + 1)) { - //Find channel in node + // Find channel in node std::map::iterator mapIter = channelMap.find(channel); if (mapIter == channelMap.end()) @@ -485,30 +482,27 @@ void BVHLoader::CreateAnimation(aiScene *pScene) { for (unsigned int fr = 0; fr < mAnimNumFrames; ++fr) { aiMatrix4x4 temp; aiMatrix3x3 rotMatrix; - for (unsigned int channelIdx = 0; channelIdx < node.mChannels.size(); ++ channelIdx) { - switch (node.mChannels[channelIdx]) { - case Channel_RotationX: - { + for (unsigned int channelIdx = 0; channelIdx < node.mChannels.size(); ++channelIdx) { + switch (node.mChannels[channelIdx]) { + case Channel_RotationX: { const float angle = node.mChannelValues[fr * node.mChannels.size() + channelIdx] * float(AI_MATH_PI) / 180.0f; - aiMatrix4x4::RotationX( angle, temp); rotMatrix *= aiMatrix3x3( temp); - } - break; - case Channel_RotationY: - { + aiMatrix4x4::RotationX(angle, temp); + rotMatrix *= aiMatrix3x3(temp); + } break; + case Channel_RotationY: { const float angle = node.mChannelValues[fr * node.mChannels.size() + channelIdx] * float(AI_MATH_PI) / 180.0f; - aiMatrix4x4::RotationY( angle, temp); rotMatrix *= aiMatrix3x3( temp); - } - break; - case Channel_RotationZ: - { + aiMatrix4x4::RotationY(angle, temp); + rotMatrix *= aiMatrix3x3(temp); + } break; + case Channel_RotationZ: { const float angle = node.mChannelValues[fr * node.mChannels.size() + channelIdx] * float(AI_MATH_PI) / 180.0f; - aiMatrix4x4::RotationZ( angle, temp); rotMatrix *= aiMatrix3x3( temp); - } - break; + aiMatrix4x4::RotationZ(angle, temp); + rotMatrix *= aiMatrix3x3(temp); + } break; default: break; - } - } + } + } rotkey->mTime = double(fr); rotkey->mValue = aiQuaternion(rotMatrix); ++rotkey; @@ -525,4 +519,6 @@ void BVHLoader::CreateAnimation(aiScene *pScene) { } } +} // namespace Assimp + #endif // !! ASSIMP_BUILD_NO_BVH_IMPORTER diff --git a/code/AssetLib/BVH/BVHLoader.h b/code/AssetLib/BVH/BVHLoader.h index 56c32bd99a..5a2800fc74 100644 --- a/code/AssetLib/BVH/BVHLoader.h +++ b/code/AssetLib/BVH/BVHLoader.h @@ -4,8 +4,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team - +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -62,7 +61,7 @@ namespace Assimp { * the hierarchy. It contains no actual mesh data, but we generate a dummy mesh * inside the loader just to be able to see something. */ -class BVHLoader : public BaseImporter { +class BVHLoader final : public BaseImporter { /** Possible animation channels for which the motion data holds the values */ enum ChannelType { @@ -80,32 +79,27 @@ class BVHLoader : public BaseImporter { std::vector mChannels; std::vector mChannelValues; // motion data values for that node. Of size NumChannels * NumFrames - Node() : - mNode(nullptr) {} - - explicit Node(const aiNode *pNode) : - mNode(pNode) {} + Node() : mNode(nullptr) {} + explicit Node(const aiNode *pNode) :mNode(pNode) {} }; public: BVHLoader(); - ~BVHLoader(); + ~BVHLoader() override = default; -public: /** Returns whether the class can handle the format of the given file. * See BaseImporter::CanRead() for details. */ - bool CanRead(const std::string &pFile, IOSystem *pIOHandler, bool cs) const; + bool CanRead(const std::string &pFile, IOSystem *pIOHandler, bool cs) const override; - void SetupProperties(const Importer *pImp); - const aiImporterDesc *GetInfo() const; + void SetupProperties(const Importer *pImp) override; + const aiImporterDesc *GetInfo() const override; protected: /** Imports the given file into the given scene structure. * See BaseImporter::InternReadFile() for details */ - void InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler); + void InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) override; -protected: /** Reads the file */ void ReadStructure(aiScene *pScene); diff --git a/code/AssetLib/Blender/BlenderBMesh.cpp b/code/AssetLib/Blender/BlenderBMesh.cpp index a82e7c6786..3f44ddfcb4 100644 --- a/code/AssetLib/Blender/BlenderBMesh.cpp +++ b/code/AssetLib/Blender/BlenderBMesh.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. Redistribution and use of this software in source and binary forms, @@ -74,7 +74,9 @@ BlenderBMeshConverter::~BlenderBMeshConverter() { // ------------------------------------------------------------------------------------------------ bool BlenderBMeshConverter::ContainsBMesh() const { - // TODO - Should probably do some additional verification here + if (BMesh == nullptr) { + return false; + } return BMesh->totpoly && BMesh->totloop && BMesh->totvert; } diff --git a/code/AssetLib/Blender/BlenderBMesh.h b/code/AssetLib/Blender/BlenderBMesh.h index 7d2f71717e..6d50e97ad9 100644 --- a/code/AssetLib/Blender/BlenderBMesh.h +++ b/code/AssetLib/Blender/BlenderBMesh.h @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. Redistribution and use of this software in source and binary forms, @@ -63,14 +63,12 @@ namespace Assimp struct MLoop; } - class BlenderBMeshConverter: public LogFunctions< BlenderBMeshConverter > + class BlenderBMeshConverter final : public LogFunctions< BlenderBMeshConverter > { public: - BlenderBMeshConverter( const Blender::Mesh* mesh ); - ~BlenderBMeshConverter( ); - - bool ContainsBMesh( ) const; - + explicit BlenderBMeshConverter( const Blender::Mesh* mesh ); + ~BlenderBMeshConverter(); + bool ContainsBMesh() const; const Blender::Mesh* TriangulateBMesh( ); private: diff --git a/code/AssetLib/Blender/BlenderCustomData.cpp b/code/AssetLib/Blender/BlenderCustomData.cpp index 2359482e17..0c85f9815d 100644 --- a/code/AssetLib/Blender/BlenderCustomData.cpp +++ b/code/AssetLib/Blender/BlenderCustomData.cpp @@ -96,7 +96,7 @@ struct CustomDataTypeDescription { * other (like CD_ORCO, ...) uses arrays of rawtypes or even arrays of Structures * use a special readfunction for that cases */ -static std::array customDataTypeDescriptions = { { +static const std::array customDataTypeDescriptions = { { DECL_STRUCT_CUSTOMDATATYPEDESCRIPTION(MVert), DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION, DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION, @@ -142,7 +142,8 @@ static std::array customDataTypeDescript DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION, DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION, - DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION } }; + DECL_UNSUPPORTED_CUSTOMDATATYPEDESCRIPTION +} }; bool isValidCustomDataType(const int cdtype) { return cdtype >= 0 && cdtype < CD_NUMTYPES; diff --git a/code/AssetLib/Blender/BlenderDNA.cpp b/code/AssetLib/Blender/BlenderDNA.cpp index d22c4bfd79..9a7ad27f8b 100644 --- a/code/AssetLib/Blender/BlenderDNA.cpp +++ b/code/AssetLib/Blender/BlenderDNA.cpp @@ -2,8 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team - +Copyright (c) 2006-2026, assimp team All rights reserved. diff --git a/code/AssetLib/Blender/BlenderDNA.h b/code/AssetLib/Blender/BlenderDNA.h index 494dc4b348..a1b95889a4 100644 --- a/code/AssetLib/Blender/BlenderDNA.h +++ b/code/AssetLib/Blender/BlenderDNA.h @@ -2,8 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team - +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -56,14 +55,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // enable verbose log output. really verbose, so be careful. #ifdef ASSIMP_BUILD_DEBUG -#define ASSIMP_BUILD_BLENDER_DEBUG +# define ASSIMP_BUILD_BLENDER_DEBUG #endif // set this to non-zero to dump BlenderDNA stuff to dna.txt. // you could set it on the assimp build command line too without touching it here. // !!! please make sure this is set to 0 in the repo !!! #ifndef ASSIMP_BUILD_BLENDER_DEBUG_DNA -#define ASSIMP_BUILD_BLENDER_DEBUG_DNA 0 +# define ASSIMP_BUILD_BLENDER_DEBUG_DNA 0 #endif // #define ASSIMP_BUILD_BLENDER_NO_STATS @@ -125,22 +124,14 @@ struct ElemBase { * they used to point to.*/ // ------------------------------------------------------------------------------- struct Pointer { - Pointer() : - val() { - // empty - } - uint64_t val; + uint64_t val{0}; }; // ------------------------------------------------------------------------------- /** Represents a generic offset within a BLEND file */ // ------------------------------------------------------------------------------- struct FileOffset { - FileOffset() : - val() { - // empty - } - uint64_t val; + uint64_t val{0}; }; // ------------------------------------------------------------------------------- @@ -205,7 +196,7 @@ enum ErrorPolicy { }; #ifdef ASSIMP_BUILD_BLENDER_DEBUG -#define ErrorPolicy_Igno ErrorPolicy_Warn +# define ErrorPolicy_Igno ErrorPolicy_Warn #endif // ------------------------------------------------------------------------------- @@ -397,10 +388,9 @@ class Structure { mutable size_t cache_idx; }; -// -------------------------------------------------------- -template <> +// ------------------------------------------------------------------------------------------------------- +template<> struct Structure::_defaultInitializer { - template void operator()(T &out, const char *reason = "") { ASSIMP_LOG_WARN(reason); @@ -410,9 +400,9 @@ struct Structure::_defaultInitializer { } }; -template <> +// ------------------------------------------------------------------------------------------------------- +template<> struct Structure::_defaultInitializer { - template void operator()(T & /*out*/, const char *message = "") { // obviously, it is crucial that _DefaultInitializer is used @@ -620,31 +610,23 @@ class SectionParser { /** Import statistics, i.e. number of file blocks read*/ // ------------------------------------------------------------------------------- class Statistics { - public: - Statistics() : - fields_read(), pointers_resolved(), cache_hits() - // , blocks_read () - , - cached_objects() {} + Statistics() = default; + ~Statistics() = default; -public: - /** total number of fields we read */ + /// total number of fields we read unsigned int fields_read; - /** total number of resolved pointers */ + /// total number of resolved pointers unsigned int pointers_resolved; - /** number of pointers resolved from the cache */ + /// number of pointers resolved from the cache unsigned int cache_hits; - /** number of blocks (from FileDatabase::entries) - we did actually read from. */ - // unsigned int blocks_read; - - /** objects in FileData::cache */ + /// objects in FileData::cache unsigned int cached_objects; }; + #endif // ------------------------------------------------------------------------------- @@ -657,15 +639,13 @@ class ObjectCache { typedef std::map> StructureCache; public: - ObjectCache(const FileDatabase &db) : - db(db) { + explicit ObjectCache(const FileDatabase &db) : db(db) { // currently there are only ~400 structure records per blend file. // we read only a small part of them and don't cache objects // which we don't need, so this should suffice. caches.reserve(64); } -public: // -------------------------------------------------------- /** Check whether a specific item is in the cache. * @param s Data type of the item @@ -673,10 +653,7 @@ class ObjectCache { * cache doesn't know the item yet. * @param ptr Item address to look for. */ template - void get( - const Structure &s, - TOUT &out, - const Pointer &ptr) const; + void get( const Structure &s,TOUT &out, const Pointer &ptr) const; // -------------------------------------------------------- /** Add an item to the cache after the item has @@ -701,7 +678,7 @@ class ObjectCache { template <> class ObjectCache { public: - ObjectCache(const FileDatabase &) {} + explicit ObjectCache(const FileDatabase &) {} template void get(const Structure &, vector &, const Pointer &) {} @@ -710,7 +687,7 @@ class ObjectCache { }; #ifdef _MSC_VER -#pragma warning(disable : 4355) +# pragma warning(disable : 4355) #endif // ------------------------------------------------------------------------------- @@ -725,16 +702,6 @@ class FileDatabase { FileDatabase() : _cacheArrays(*this), _cache(*this), next_cache_idx() {} -public: - // publicly accessible fields - bool i64bit; - bool little; - - DNA dna; - std::shared_ptr reader; - vector entries; - -public: Statistics &stats() const { return _stats; } @@ -753,6 +720,15 @@ class FileDatabase { return _cacheArrays; } +public: + // publicly accessible fields + bool i64bit; + bool little; + + DNA dna; + std::shared_ptr reader; + vector entries; + private: #ifndef ASSIMP_BUILD_BLENDER_NO_STATS mutable Statistics _stats; @@ -765,20 +741,19 @@ class FileDatabase { }; #ifdef _MSC_VER -#pragma warning(default : 4355) +# pragma warning(default : 4355) #endif // ------------------------------------------------------------------------------- /** Factory to extract a #DNA from the DNA1 file block in a BLEND file. */ // ------------------------------------------------------------------------------- class DNAParser { - public: /** Bind the parser to a empty DNA and an input stream */ - DNAParser(FileDatabase &db) : - db(db) {} + explicit DNAParser(FileDatabase &db) : db(db) { + // empty + } -public: // -------------------------------------------------------- /** Locate the DNA in the file and parse it. The input * stream is expected to point to the beginning of the DN1 @@ -789,7 +764,6 @@ class DNAParser { * afterwards.*/ void Parse(); -public: /** Obtain a reference to the extracted DNA information */ const Blender::DNA &GetDNA() const { return db.dna; diff --git a/code/AssetLib/Blender/BlenderDNA.inl b/code/AssetLib/Blender/BlenderDNA.inl index 4f64987a52..87563e0769 100644 --- a/code/AssetLib/Blender/BlenderDNA.inl +++ b/code/AssetLib/Blender/BlenderDNA.inl @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2022, assimp team +Copyright (c) 2006-2026, assimp team All rights reserved. @@ -841,5 +841,7 @@ template