Updated the Inner Cone formula such that exponent values of 0 result in no inner cone and large exponent values result in a inner cone being most of the cone angle-wise.
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* fix export fbx wrong Materials index in LayerElementMaterial
* Refix export fbx wrong Materials index in LayerElementMaterial. Materials index should be the order of Materials in connections of the Model node.
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
The outfile was missing an OS separator when a PBRT file was exported in a path that was not the current directory.
Writing to /foo/bar.pbrt was writing to foobar.pbrt instead.
mPath and mFile are now handled like it's described in PbrtExporter.h
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
There were some typos and incorrect offsets in a previous PR. This fixes part of it, correctly exporting the UV.
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* fix: possible Heap-based Buffer Overflow in ConvertToUTF8 function
* Update BaseImporter.cpp
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
- If the mesh supports more than 2 texture coordinates this was not handled correctly. Now the code will be able to deal with 2 or 3 coords and throws an exception if this value gets invalid.
- closes https://github.com/assimp/assimp/issues/3829
* Fix fbx export. Nodes "LayerElementNormal" and "LayerElementColor" should be written only when actual data are exported.
* Update FBXExporter.cpp
- Fix intentions
- use empty instead of size for checking data exists
* refactoring
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Harmonize Importer #includes
Some importers referred to their headers via `#include "AssetLib/[format]/[header.h"`, others via `#include "[header].h"`, others mixed both (e.g. IRR). This is a matter of taste, but it should at least be done the same way everywhere.
Most importers seem to prefer `#include "[header].h"`, so this commit enforces it.
Cross-referencing files from other importers is still done through `AssetLib/[format]`.
Assimp headers are not affected and I would advise against changing them, as this could lead to subtle collisions with user includes.
* went one too far
---------
Co-authored-by: Krishty <krishty@krishty.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fix Whitespace
No functional changes. This commit removes trailing spaces, undesired line breaks, and formatting screwups.
* Remove more useless line breaks in license (500 out of 630 license copies do NOT use double line breaks here)
---------
Co-authored-by: Krishty <krishty@krishty.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* feat: created the aiGetStringC_Str() function.
The C++ Interface's function C_Str() from the aiString struct was missing an equivalent function for the C Interface.
* changed the first parameter of the aiGetStringC_Str function to be const.
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
- Ensure that code scanner will identify pointer as already released.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>