Commit Graph

10378 Commits (291c0a4faa37581e056b43d882e92556cbdc98f1)

Author SHA1 Message Date
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 dc6fa58814
Merge branch 'master' into patch-4 2021-05-04 21:08:56 +02:00
Kim Kulling be85eac703
Merge pull request #3877 from olsoneric/olsoneric-issue_2339_py_cant_load_obj
Use POINTER(char) for binary data. For pyassimp issue #2339: Can't load OBJ
2021-05-04 21:08:35 +02:00
Kim Kulling 875acc5166
Merge branch 'master' into patch-4 2021-05-04 20:59:06 +02:00
Eric Olson f17d58cadd Use POINTER(c_char) for binary data with pyassimp
"For a general character pointer that may also point to binary data,
POINTER(c_char) must be used." c_char_p is for a zero-terminated string.

Reference: https://docs.python.org/3/library/ctypes.html#ctypes.c_char_p

Applying this change to the 4.1.4 released python module fixes #2339 for
me in Ubuntu.
2021-05-04 13:38:38 -05:00
Krishty 8ad9c937f1 enabled debug information in MSVC release build
No effect on runtime speed/size. Slightly slower link time, but debugging experience improves by a million times.

- /Zi – Store debug information in a .pdb file, not directly in the DLL/EXE
- /DEBUG:FULL – generate debug information during link
- /PDBALTPATH:%_PDB% – do not store the file system path of the .pdb, just the filename and hash (no disclose paths on distribution)
- /OPT:REF /OPT:ICF – remove unreferenced functions and fold identical functions (this was enabled before, but requires explicit enabling if /DEBUG:FULL is specified)
2021-05-04 19:10:24 +02:00
Kim Kulling cd0fd30821
Merge pull request #3819 from vfxgordon/fbxBlendshapes
Fixed weighting issue with blendShapeChannels
2021-05-04 17:44:32 +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
Kim Kulling 47cacf8aa6
Merge branch 'master' into optimize_3mf_strings 2021-05-04 14:42:16 +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
Kim Kulling ff18354997
Merge pull request #3869 from assimp/optimize_3mf_strings
use const chars
2021-05-04 12:46:38 +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 70ba2e9e74
Merge pull request #3805 from krishty/fix-scale-msg
fixed malformatted message
2021-05-04 09:18:12 +02:00
Kim Kulling 39522178aa
Merge branch 'master' into fix-scale-msg 2021-05-04 08:13:12 +02:00
Kim Kulling 79802ad836
Merge pull request #3796 from krishty/fix-file-detection
small cleanup in file format detection
2021-05-04 07:54:09 +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 71c48581f3
Merge pull request #3852 from krishty/3ds-namespace
style fix: namespace instead of class with public static members
2021-05-02 19:41:04 +02:00
Kim Kulling 9e27afe353
Merge branch 'master' into 3ds-namespace 2021-05-02 17:38:29 +02:00
Kim Kulling afdec791a6
Merge pull request #3795 from assimp/kimkulling-patch-3
Fix formatter.
2021-05-02 17:38:16 +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
Kim Kulling 6c429a9d82
Merge branch 'master' into kimkulling-patch-3 2021-05-01 19:29: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 b516d940b6
Merge pull request #3826 from krishty/fix-3ds-matrix
reverted regression in 3DS transformation (issue #3802)
2021-05-01 12:02:24 +02:00
Kim Kulling 78132d666f
Merge branch 'master' into fix-3ds-matrix 2021-05-01 11:34:33 +02:00
Kim Kulling f538b96e82
Merge pull request #3788 from BaldricS/SceneCombiner_Memory_Leaks
Fix: Removing double delete of texture items after MergeScene.
2021-05-01 11:07:34 +02:00
Kim Kulling 7843b24e03
Merge branch 'master' into SceneCombiner_Memory_Leaks 2021-05-01 09:16:06 +02:00
Kim Kulling d28e2e0a39
Merge pull request #3775 from diiigle/patch-1
Add PBRT to exportable file formats list
2021-05-01 09:15:34 +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 bf653b4bd6 Merge branch 'M3DasciiByDefault' of https://github.com/contriteobserver/assimp into M3DasciiByDefault 2021-04-30 21:28:54 -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 302e47efc1
Merge branch 'master' into M3DasciiByDefault 2021-04-30 21:11:23 -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