Commit Graph

142 Commits (04997ccbf3db5e1fa5f54478980896d74c3d08db)

Author SHA1 Message Date
Aaron Gokaslan 8e3a159141
Merge branch 'master' into clang-tidy-perf-fixes 2021-06-23 10:10:28 -04:00
Pankaj Tyagi 6170c49155 Fixed:
1. FBX import is unable to read the texture UV rotation angle.
2. FBX export is unable to write the texture UV rotation angle.
2021-06-23 16:49:09 +05:30
Kim Kulling 36815b014b
Update FBXExporter.h 2021-06-22 20:05:16 +02:00
Aaron Gokaslan 94c3abd841 Apply various performance fixes from clang-tidy 2021-06-22 12:27:15 -04:00
Kim Kulling 391d3195df
Merge branch 'master' into fbx-lights-export 2021-06-10 12:27:14 +02:00
Kim Kulling c8510a1a82
Merge branch 'master' into fix-fbx-exporter2 2021-06-03 11:05:07 +02:00
Kim Kulling b59db55b8c
Merge branch 'master' into less-string-bloat 2021-05-26 12:14:08 +02:00
Jean-François Verdon f13515a391 Adding basic support for lights in FBX exporter 2021-05-23 19:12:21 +02:00
Kim Kulling aeaa22cbbd
Merge branch 'master' into UVStreamNames 2021-05-23 14:37:28 +02:00
Kim Kulling ac54fe41e2
Merge branch 'master' into PBRsupport 2021-05-23 13:23:06 +02:00
Jagoon f96e3cde2d Fix transform chain is applied twice 2021-05-23 00:06:05 +09:00
Jagoon 28e34878cb Fix fbx exporter bug if root node contains meshes. 2021-05-22 23:20:34 +09:00
Malcolm Tyrrell 4ec01cfdcd Improve use of logging 2021-05-13 12:05:31 +01:00
Malcolm Tyrrell ad6f300b1d Other LogAux functions 2021-05-13 10:43:28 +01:00
Malcolm Tyrrell 7abfd134b6 LogAux warn 2021-05-13 10:33:16 +01:00
Malcolm Tyrrell 5cd3bdd5c2 No need to distinguish formatting log functions. 2021-05-13 10:25:27 +01:00
Krishty b79b84d34e Merge branch 'master' into new-file-detection 2021-05-05 00:09:42 +02:00
Krishty 0f3e6e2941 replaced std::size() with AI_COUNT_OF for pre-C++20 compilers 2021-05-05 00:08:54 +02:00
Jason C 2925592c64 [assimp] Make sure ctype calls use unsigned char.
Cast to unsigned char as required by C++ (see C++ **[cctype.cyn]** -> ISO C99 section 7.4, [see also](https://en.cppreference.com/w/cpp/string/byte/isspace)).

Addresses https://github.com/assimp/assimp/issues/3867 and then some.
2021-05-04 17:31:13 -04:00
Krishty b57ce004f8 reduced FBX string bloat
The FBX importer used two std::strings where string literals would have been sufficient.
2021-05-04 22:01:01 +02:00
Tom spot Callaway f91b439f79 preserve UV Stream names in FBX files 2021-05-03 13:40:31 -04:00
Tom spot Callaway e7211790fb PBR material support 2021-05-03 13:27:52 -04:00
vfxgordon 9ae3e88f6c
Merge branch 'master' into fbxBlendshapes 2021-05-03 07:40:25 -07:00
Gordon Chapman 64da2a4315 Merge remote-tracking branch 'upstream/master' into fbxBlendshapes 2021-04-26 13:51:22 -07:00
Gordon Chapman a5d0e99548 Fixed error in blendShapeChannel Weighting 2021-04-26 12:19:20 -07:00
Krishty b00de10eb3 Simplified importer search and fixed a few bugs
The search for a matching importer had a few issues, see #3791. There were two different mechanisms to determine whether an importer accepts a specific file extension:
1. `aiImporterDesc::mFileExtensions`, which was forwarded to the UI via `BaseImporter::GetExtensionList()`.
2. `BaseImporter::CanRead()` when called with `checkSig == false`, which determines whether to actually use that importer.
Both were redundant and got out of sync repeatedly. I removed 2. completely and replaced it with 1., thereby syncing UI/import and shortening all `BaseImporter::CanRead()` implementations.

Further bugfixes:
- fixed glTF2 importer throwing exceptions when checking whether it can load a file
- removed `BaseImporter::SimpleExtensionCheck()` because it is no longer used and had a bug with case sensitivity

Since the `checkSig` parameter in `BaseImporter::CanRead()` is now useless, it can be removed completely. I’m not sure if this would break ABI compatiblity, so I’ll submit it with a later pull request.
2021-04-24 00:17:50 +02:00
Krishty f761dc72f4 style fix - initializing and assigning empty std::string properly
std::string s(""); s = ""; calls the copy constructor, which in turn calls strlen(), … assigning a default-constructed string generates fewer instructions and is therefore preferred.

With C++11 uniform initialization, you’d simply write s = { } instead.
2021-04-16 23:43:56 +02:00
Hill Ma 4aa52b3af8 Flip the check on _MSC_VER for using TR1 containers. 2021-04-13 11:15:52 -07:00
Kim Kulling cf4ef04a80
Merge branch 'master' into master 2021-04-07 20:58:40 +02:00
Gordon Chapman 3fd865b4bf Added Blendshape Support to FBX Export 2021-03-24 18:10:03 -07:00
Urs Hanselmann c0c7e6a0de trim uvIndices to fix import of Cheetah3D generated fbx files 2021-03-12 14:48:38 +01:00
Urs Hanselmann cc7e229c3c disable size check 2021-03-12 08:55:11 +01:00
Kim Kulling 6c89631581 closes https://github.com/assimp/assimp/issues/3678: ensure lowercase 2021-03-09 21:08:28 +01:00
Kim Kulling 9e8dbd0ca5 Update copyrights to 2021. 2021-02-28 12:17:54 +01:00
Kim Kulling 1e38f84c3a
fix typo 2021-01-27 09:40:19 +01:00
Kim Kulling ac0f1f2cab
Update FBXMaterial.cpp 2021-01-27 09:37:35 +01:00
Kim Kulling c02ad323a5
Fix VS compiler warning: convertig int to char 2021-01-27 09:22:59 +01:00
Kim Kulling 4471c36c08
Fix compiler bug for VS2019
- Check https://developercommunity.visualstudio.com/content/problem/1223143/visual-studio-2019-c-program-crash-with-stdstring.html for more details
- closes https://github.com/assimp/assimp/issues/3572
2021-01-26 20:59:21 +01:00
Kim Kulling 77f9c2854a
Merge branch 'master' into fbx_tokenizer_fix 2020-12-25 21:44:26 +01:00
Inho Lee b8bf1eac04 FBXConverter : Fix timescales of FBX animations
FBX animations were recorded by framenumber, not by time.
This patch will change it as a base of milliseconds.
2020-12-16 15:02:46 +01:00
Max Vollmer 9d3c0081eb Throw if property length is out of bounds 2020-12-14 16:49:04 +00:00
Kim Kulling 7dd0596010
Merge branch 'master' into 3dsMax2021PbrMaterials 2020-12-11 14:31:00 +01:00
Malcolm Tyrrell 471d2acc92 Improvements & style 2020-12-03 11:17:45 +00:00
Malcolm Tyrrell 19af3f0d31 Swap the meaning using the out_mat property. 2020-12-02 16:59:29 +00:00
Malcolm Tyrrell f7be3048de New 3ds Max PBR Materials in FBX 2020-12-01 12:05:42 +00:00
Kim Kulling 88be8ec698
Merge branch 'master' into fbxExceptionSafety 2020-11-27 21:49:58 +01:00
Malcolm Tyrrell 149b8d1fd1 Don't need operator< either. 2020-11-27 14:26:51 +00:00
Malcolm Tyrrell 14f79caf41 textures_converted keys can just be pointers 2020-11-26 16:29:37 +00:00
Malcolm Tyrrell 885a196c74 Unsigned 2020-11-19 16:30:44 +00:00
Neil Clifford 7b59cc297e FBXParser.cpp - handle buffer over-read cases correctly 2020-11-19 12:20:06 +00:00
Malcolm Tyrrell c00153089a Neater construction 2020-11-17 10:45:10 +00:00
Malcolm Tyrrell 213a9f9d55 First pass at PotentialNode 2020-11-17 10:39:03 +00:00
Malcolm Tyrrell 3221522f95 Prevent crash with malformed texture reference 2020-11-16 17:29:19 +00:00
Kim Kulling 8c135f779e
Merge branch 'master' into readFbxWeightsInConfig 2020-10-28 20:38:29 +01:00
Kim Kulling aee2e9a87d
Merge branch 'master' into patch-1 2020-10-25 20:35:06 +01:00
#Momo b168d8f441
replaced data with taking address of first element
oops, seems like `data()` returns `char*` only since C++17. Replaced with taking address of first string element
2020-10-21 23:41:33 +03:00
#Momo 7781fe5781
MSVC crash workaround
I do not know why, but the following line causes crash if assimp was compiled using MSVC with RelWithDebInfo configuration:
`std::transform(shading.begin(), shading.end(), shading.begin(), Assimp::ToLower<char>);`
replacing `shading.begin()` with `shading.data()` fixes this issue.
2020-10-21 23:21:50 +03:00
Malcolm Tyrrell a2cd5619b4
Merge branch 'master' into readFbxWeightsInConfig 2020-10-19 10:16:02 +01:00
Malcolm Tyrrell 0363c18f1f Read weights 2020-10-15 10:07:24 +01:00
Kim Kulling 636f28965f
Merge branch 'master' into fbxReportAssetIssuesProperly 2020-10-11 18:13:43 +02:00
Sahin Serdar Kocdemir eb9928e029
fix for fbx files using stringray materials; 2020-10-09 07:28:15 +01:00
Malcolm Tyrrell 4bdaf20b70 Add comment. 2020-10-05 14:23:42 +01:00
Malcolm Tyrrell 585fb89154 Make an assert a DeadlyImportError. 2020-10-02 15:25:16 +01:00
Kim Kulling 23defc275a
Merge branch 'master' into makeInternalErrorsAccessible 2020-09-14 08:36:13 +02:00
Joshua Hyatt 638499a278 Replace unique_ptr and add custom deleter 2020-09-01 10:30:31 -06:00
Joshua Hyatt dcf9a7b2d8 Conform variable names to code standards 2020-08-29 23:58:31 -06:00
Joshua Hyatt 953e976de6 Close stream when finished 2020-08-29 23:56:50 -06:00
Joshua Hyatt cc2613f264 Replace unique_ptr with raw pointer 2020-08-29 23:06:33 -06:00
Malcolm Tyrrell 6c2ceb55f8 Simplify some FBX error code. 2020-08-19 17:20:57 +01:00
Malcolm Tyrrell b7c789da67 Stop concatenating std::strings. Use formatter. 2020-08-18 17:35:08 +01:00
Kim Kulling 008e551f8e
Merge branch 'master' into fbxVersionCheck 2020-07-31 14:33:21 +02:00
Malcolm Tyrrell 0282f358a4 Remove unneeded check. 2020-07-31 12:40:17 +01:00
Malcolm Tyrrell 301bae3967 Improve message 2020-07-30 16:37:41 +01:00
Malcolm Tyrrell eaf0587dd8 FBX Version/Size Check 2020-07-30 14:56:01 +01:00
Ryan Styrczula 3170c3d15c FBXExport: Fix crash if scene->mMetaData is null 2020-07-30 09:21:43 -04:00
Ryan Styrczula 0c2f7a119c FBXExporter: Forgot WritePropColor defaultValue 2020-07-13 13:56:06 -04:00
Ryan Styrczula 6619ec8253 FBXExporter: Use scene metadata for global settings
Models with non-standard axes and scale are not imported and exported
correctly if the input metadata is ignored.
2020-07-13 13:56:06 -04:00
Kim Kulling 78d0b81b6c
Merge branch 'master' into patch-1 2020-07-12 18:54:34 +02:00
Kim Kulling b7b38c2282
Merge branch 'master' into patch-2 2020-06-25 16:52:40 +02:00
Kim Kulling 6205af4efb replace NULL and avoid ai_assert with more than 2 tests. 2020-06-23 21:05:42 +02:00
Filip Lundgren 2006286528
Fix Maya PBR & stingray texture detection 2020-06-22 23:14:16 +02:00
Filip Lundgren ba09e1ef94
Fix Blender .fbx metalness detection 2020-06-21 23:56:11 +02:00
Yingying Wang 26421aebc9 support channel name in blendshape name 2020-06-08 13:33:16 -07:00
Malcolm Tyrrell 14692368d5 Same for LogDebug -> LogVerboseDebug 2020-05-18 11:55:14 +01:00
Malcolm Tyrrell d70685d37f Fix typo 2020-05-15 17:50:48 +01:00
Malcolm Tyrrell 90cdbd9d9a Fix ups 2020-05-15 17:46:50 +01:00
Malcolm Tyrrell 434c5e3d37 More verbose logging 2020-05-15 17:29:49 +01:00
Malcolm Tyrrell 2ffd1cb8db nits 2020-05-15 17:22:15 +01:00
Malcolm Tyrrell bcca3a0d79 No need for bespoke macros 2020-05-15 17:22:02 +01:00
Malcolm Tyrrell 6be0ce1ec9 Initial pass at adding logging 2020-05-15 17:21:45 +01:00
hoshiryu 3fdcd0861f Fix fbx rotation ; 2020-05-11 10:28:05 +02:00
Kim Kulling f8e6512a63 Move format importer and exporter into its won folder. 2020-05-02 15:14:38 +02:00