Commit Graph

5517 Commits (kimkulling-tech_debt_template)

Author SHA1 Message Date
Jason C 859b32c045
[Logger] Log a notification instead of silently dropping long log messages.
Logs a notification instead of silently dropping long log messages, which can complicate debugging.

This way, if you don't see a message you expect to see, you'll immediately know why.

The *correct* approach would be to eliminate length filtering here entirely and use `snprintf` appropriately (also there's a tiny -- probably negligible -- performance hit here in calling `strlen` regardless of whether or not the verbosity level matches). Failing that, the second best option is to copy and truncate messages here. However, for now, this should be OK.
2021-05-07 22:32:32 -04:00
ywang a19b708144 support both ktx and ktx2 2021-05-07 16:27:23 -07:00
Jason C 9a2a0384f4 Merge branch 'master' into patch-3 2021-05-07 17:53:18 -04:00
Jason C 279e9a186f
Merge branch 'master' into jc3-dnase 2021-05-07 14:49:22 -04:00
Jason C 6eb15080ec
Merge branch 'master' into jc3-importer-open-error-handling 2021-05-07 14:49:00 -04:00
Jason C 2fd6102573
Merge branch 'master' into jc3-spam-killa 2021-05-07 14:48:24 -04:00
Jason C 7b404788a6
Merge branch 'master' into jc3-cctype-fixes 2021-05-07 14:48:01 -04:00
Carsten Rudolph 8ff52c0f89 Pass base name from export properties to the IO system. 2021-05-07 17:31:30 +02:00
Kim Kulling 25a0eb0d67
Merge branch 'master' into mdcOrient 2021-05-07 13:03:08 +02:00
ywang 2b9d88c943 support basis universal 2021-05-06 15:10:06 -07:00
Kim Kulling 25cf5dd487
Merge branch 'master' into mRootNode_mTransformation 2021-05-06 21:40:03 +02:00
Kim Kulling e120544978
Merge branch 'master' into fixGenNormals 2021-05-06 17:28:37 +02:00
Kim Kulling bc7551b778
Merge branch 'master' into add-step-extension 2021-05-06 14:19:53 +02:00
Jason C 7da9c42c81 [blender] Disable creation of "dna.txt"
Developers who want to enable it can either:

- *Temporarily* set ASSIMP_BUILD_BLENDER_DEBUG_DNA=1 in BlenderDNA.h, or
- *Temporarily* define ASSIMP_BUILD_BLENDER_DEBUG_DNA=1 on the build command line.

Addresses #3886.
2021-05-05 19:30:29 -04:00
Jason C c08ad2e5c2
Merge branch 'master' into jc3-cctype-fixes 2021-05-05 19:04:47 -04:00
Jason C de5c8ece6f [xgl] Fail if file could not be parsed.
Fail instead of returning empty scene.

Partially addresses #3888.

TODO: Propagate XML error detail through exception (depends on #3881).
2021-05-05 17:49:10 -04:00
Jason C 98f586c8d4 [irr] Fail if file could not be parsed.
Fail instead of returning empty scene.

Partially addresses #3888.

TODO: Propagate XML error detail through exception (depends on #3881).
2021-05-05 17:48:44 -04:00
Jason C 470913bf27 [assbin] Fail if file could not be opened
Fail instead of returning empty scene.

Partially addresses #3888.
2021-05-05 17:46:24 -04:00
Jason C 0d3e8b52be [sib] Fix assertion failure when file could not be opened.
Check result of IOSystem::Open before constructing stream.

Partially addresses #3888.
2021-05-05 17:32:10 -04:00
Jason C a80b3b25eb [quick3d] Fix assertion failure when file could not be opened.
Check result of IOSystem::Open before constructing stream.

Partially addresses #3888.
2021-05-05 17:31:50 -04:00
Jason C e52c297284 [nendo] Fix assertion failure when file could not be opened.
Check result of IOSystem::Open before constructing stream.

Partially addresses #3888.
2021-05-05 17:31:24 -04:00
Jason C 1cd3752ec6 [ms3d] Fix assertion failure when file could not be opened.
Check result of IOSystem::Open before constructing stream.

Partially addresses #3888.
2021-05-05 17:31:06 -04:00
Jason C 7f13387487 [cob] Fix assertion failure when file could not be opened.
Check result of IOSystem::Open before constructing stream.

Partially addresses #3888.
2021-05-05 17:30:29 -04:00
Jason C 116ebf6e10 [3ds] Fix assertion failure when file could not be opened
Check result of IOSystem::Open before constructing stream.

Partially addresses #3888.
2021-05-05 17:30:05 -04:00
Jason C 785cca1bb4 [amf] Fix crash when file could not be parsed.
Fix double free of mXmlParser (deleted but not reset in ParseFile, then deleted again in ~AMFImporter).

Should probably use a smart pointer instead, though.

Partially addresses https://github.com/assimp/assimp/issues/3888.
2021-05-05 17:13:10 -04:00
Jason C f5a31b70f5
Merge branch 'master' into patch-3 2021-05-05 16:24:46 -04:00
Kim Kulling 992f10e7bf
Merge branch 'master' into remove-useless-scaling-prototype 2021-05-05 21:54:31 +02:00
Jason C 7ae8a52d9f
Merge branch 'master' into jc3-spam-killa 2021-05-05 10:33:29 -04:00
Kim Kulling 5325b327c3
Merge branch 'master' into optimize_3mf_strings 2021-05-05 15:12:06 +02:00
Max Vollmer (Microsoft Havok) 153b890b02 Prevent accessing nullpointers 2021-05-05 14:09:43 +01:00
kkulling f15dcfa981 - Fix model parsing 2021-05-05 13:10:52 +02:00
kkulling cbce6d3dad Merge branch 'optimize_3mf_strings' of https://github.com/assimp/assimp into optimize_3mf_strings 2021-05-05 10:46:54 +02:00
Jason C ccd1a4455e [ply] Fix minor typo in error message. 2021-05-04 21:57:00 -04:00
Jason C a03dc4edaa [amf] Fix minor typo in error message.
Added missing space to detail string on parse failure.
2021-05-04 21:56:49 -04:00
Jason C f8609c2c2d [opengex] Direct OpenDDLParser log messages to assimp logger
Also filter unprintable characters. Addresses second part of #3862.
2021-05-04 21:54:14 -04:00
Jason C 9a04f5d4b0 Fix garbage messages in SIB, MD2, and MDC loaders. 2021-05-04 21:53:16 -04:00
Jason C a9fb1e56ae Add ai_str_toprintable; fixed garbage messages in HMP, MDL, Q3D loaders.
- ai_str_toprintable: See docs in StringUtils.h.
- HMP, MDL, Q3D: In particular, newlines in binary data were complicating logging.
2021-05-04 20:33:16 -04:00
Jason C c8ad8c6017 [mmd] Remove stderr spam.
Removed stderr spam and cleaned up exception text.

Addresses #3865.
2021-05-04 20:33:16 -04: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
Kim Kulling 072aee7cbe
Merge branch 'master' into add-step-extension 2021-05-04 22:35:21 +02: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
Krishty f3c18556d1 reduced OpenGEX string bloat
The OpenGEX importer defined a few global std::string constants, only to convert them back to C strings on use. This commit defines them as C strings from the beginning.

strncmp() was used to compare these strings to other strings, but the length limit was set to string length, which made it equivalent to strcmp(), just slower. Fixed that as well.
2021-05-04 22:01:01 +02:00
Krishty 7b6dab5e20 reduced DXF string bloat
The DXF importer defined a global std::string constant, only to convert it back to a C string on use.

This commit defines the constant as a C string right away, thus saving 340 B of code and data.
2021-05-04 22:01:00 +02:00
Krishty 2a126f9f62 reduced Ogre string bloat
The Ogre importer used std::string where a string literal would have been sufficient. Saves another 600 B of code and data.
2021-05-04 22:01:00 +02:00
Kim Kulling 875acc5166
Merge branch 'master' into patch-4 2021-05-04 20:59:06 +02:00
Kim Kulling e85a69a960
Update D3MFImporter.cpp 2021-05-04 15:31:07 +02:00
vfxgordon 4231a86ad8
Merge branch 'master' into fbxBlendshapes 2021-05-04 06:22:22 -07:00
kimkulling 7690f92c81 Fix version of strnlen 2021-05-04 14:48:39 +02:00
kimkulling ee5170c18a - fix security issue 2021-05-04 14:40:25 +02:00
Kim Kulling 9c44c0ab2b
Merge branch 'master' into remove-useless-scaling-prototype 2021-05-04 13:02:00 +02:00
kimkulling 0e17939e8d Use const char* const 2021-05-04 12:09:38 +02:00
Kim Kulling 33a85e280f
Merge branch 'master' into optimize_3mf_strings 2021-05-04 11:47:11 +02:00
kkulling 55fd820ed7 use const chars 2021-05-04 10:57:30 +02:00
Kim Kulling 39522178aa
Merge branch 'master' into fix-scale-msg 2021-05-04 08:13:12 +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
Krishty fe5a23e110 fixed bloat in SIB importer
The SIB importer, upon needing an empty aiString, did not create a new one but rather copied a predefined global empty string.
Since aiStrings contain large buffers, Assimp copied 1028 B of zeros instead of setting five bytes (at least when compiled with Visual C++). Since aiString is a user-defined type without a constexpr constructor, Visual C++ had to generate a thread-safe run-time initializer as well.
Now it’s just two instructions.
2021-05-03 17:01:59 +02:00
vfxgordon 9ae3e88f6c
Merge branch 'master' into fbxBlendshapes 2021-05-03 07:40:25 -07:00
Kim Kulling f29828f657
Merge branch 'master' into fix-file-detection 2021-05-02 19:41:33 +02:00
Kim Kulling e278673fe7
Merge branch 'master' into 3ds-namespace 2021-05-02 15:08:11 +02:00
Krishty e73a2ed5e0 style fix: namespace instead of class with public static members 2021-05-01 23:20:37 +02:00
Krishty 65a2b98b86 updated C4D importer to use the Cineware SDK
Maxon’s Melange SDK has been renamed Cineware SDK as of 21.004, and with it all namespaces and types. This commit
- makes CMake use contrib/Cineware instead of contrib/Melange;
- renames Assimp’s namespace melange to namespace cineware;
- removes useless functions and formatter references from class C4DImporter;
- removes duplicate conversion of cineware::String to aiString in the importer;
- updates comments accordingly;
- updates copyright info.
2021-05-01 18:46:23 +02:00
Jason C c2d3d22271
Fix crash in CanRead when file can not be opened.
Addresses #3849
2021-05-01 10:58:29 -04:00
Kim Kulling 78132d666f
Merge branch 'master' into fix-3ds-matrix 2021-05-01 11:34:33 +02:00
Kim Kulling 7843b24e03
Merge branch 'master' into SceneCombiner_Memory_Leaks 2021-05-01 09:16:06 +02:00
Garux eab1c9c3c0 add `AI_CONFIG_IMPORT_MD3_LOAD_SHADERS` bool option
the purpose is use of this loader with idtech3 FS
this requires full original material name, which euqals to Q3 shader path
result of deduction is not usable inside Q3 FS at all
option in general is "do not tinker with the path"
2021-05-01 08:14:44 +03:00
contriteobserver 813b64ef52 corrected M3D_EXP_NOFACE test 2021-04-30 21:51:02 -07:00
contriteobserver e51bb1e77e fixed signed/unsigned mismatch warning 2021-04-30 21:26:57 -07:00
contriteobserver 694f4c2e34 Merge branch 'master' into M3DasciiByDefault 2021-04-30 21:12:48 -07:00
contriteobserver af0aca796e now compiling M3D ASCII support by default
addresses issue  #3777
2021-04-30 21:07:01 -07:00
Jason C 07257f4c66
Merge branch 'master' into patch-4 2021-04-30 22:23:23 -04:00
Garux 55abc49d6d improve md3::Q3 shader::cull keyword support
only use nonstandard winding order with `cull back`; might be excess too, since engine doesn't support this
2021-04-30 22:59:05 +03:00
Garux 0b7ebef497 fix path separator in md3 shader loading 2021-04-30 22:51:21 +03:00
Kim Kulling 2feda5b4b2
Merge branch 'master' into md2-mdc-const 2021-04-30 20:10:45 +02:00
Garux 149224091f support missing closing brace in material list after Ascii Scene Exporter v2.51 2021-04-30 10:37:06 +03:00
Kim Kulling 57091d761e
Merge branch 'master' into md2-mdc-const 2021-04-30 00:56:50 +02:00
Kim Kulling 0b92abe9b4
Merge branch 'master' into empty-string-style 2021-04-30 00:54:57 +02:00
vfxgordon 5298ed8f9e
Merge branch 'master' into fbxBlendshapes 2021-04-29 15:21:16 -07:00
Kim Kulling 73e05ab6d3
Merge branch 'master' into add-step-extension 2021-04-30 00:13:32 +02:00
Garux edf12bd357 fix md2 orientation 2021-04-30 00:02:37 +03:00
Krishty 666b5eff76 added .step extension to IFC loader
The extension .step is at least as common as .stp, so both should be supported.
2021-04-29 21:29:10 +02:00
Garux 3717e66fae consider aiProcess_FlipWindingOrder in aiProcess_GenNormals & aiProcess_GenSmoothNormals 2021-04-29 20:52:06 +03:00
Garux 4798ff3882 fix hl1 mdl orientation, tex coords, face windings order 2021-04-29 20:50:50 +03:00
Garux ebf5ef9a4b consider pScene->mRootNode->mTransformation set by some importers while using AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION 2021-04-29 20:43:37 +03:00
Garux db142da571 orient mdc correctly 2021-04-29 20:41:10 +03:00
Scott Baldric f523b1e0d7
Merge branch 'master' into SceneCombiner_Memory_Leaks 2021-04-29 08:52:51 -05:00
Jason C 975de81ab6
Merge branch 'master' into patch-4 2021-04-28 22:23:17 -04:00
Kim Kulling 41e5acf060
Merge branch 'master' into ms-maxvollmer/importer_fixes 2021-04-28 20:26:38 +02:00
Kim Kulling 9a0b703db1
Merge branch 'master' into ms-maxvollmer/importer_fixes 2021-04-28 20:25:10 +02:00
Jason C cf498c979a
ASSIMP_ENABLE_DEV_IMPORTERS env var to control registration of wip importers; applied to X3D
- GetImporterInstanceList reads ASSIMP_ENABLE_DEV_IMPORTERS env var. Development importers are enabled if the env var is set and is not equal to the literal string "0".
- X3D importer will not be registered unless ASSIMP_ENABLE_DEV_IMPORTERS is set; addresses #3647.

TODO: If this change is incorporated, it should be documented.
NOTE: Effective git branch structure is a better solution. This is an alternate for #3825.
2021-04-28 11:16:49 -04:00
Kim Kulling 6abdd0cd3e
Fix crash when reading 0 bytes
- This is a valid option so crash shall not happen
2021-04-28 16:38:22 +02:00
Scott Baldric 8e3fe6b30b
Merge branch 'master' into SceneCombiner_Memory_Leaks 2021-04-28 09:16:02 -05:00
Krishty 260cc6bd26 reverted regression in 3DS transformation (issue #3802)
The regression was introduced to align 3DS export and import, but in fact it broke the transformation matrices on import. This commit reverts the relevant lines. Furthermore, matrix layout was double-checked with two other 3DS importers. Export was not considered.
2021-04-28 01:02:24 +02:00
Jason C 3acd42c22e
Remove newline from name of Blender importer.
Addresses #3797.

Re-submitting this as a quick fix to the immediate issue while I think about the website field.
2021-04-26 20:27:28 -04: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
Max Vollmer (Microsoft Havok) e1d6e1f377
Merge branch 'master' into ms-maxvollmer/importer_fixes 2021-04-26 14:53:32 +01:00
Krishty e6a47d93c2 removed dead code from 0d29203e24 2021-04-24 13:29:15 +02:00
Krishty afe947d5db fixed malformatted message 2021-04-24 12:38:31 +02:00
Krishty 9dc66b0003 removed dead code
BaseImporter::GetExtensionList() is not a virtual function; overriding it is useless. This probably stemmed from a misunderstanding.
2021-04-23 15:15:21 +02:00