Commit Graph

1298 Commits (0166518132d66b48450dbc5265bc3e155967302f)

Author SHA1 Message Date
Alexander Gessler 0166518132 Extend StreamWriter to write to a buffer and to allow re-positioning of the write cursor within the buffer. 2014-07-22 20:36:16 +02:00
Alexander Gessler 3419fedb3c Add StreamWriter utility (mostly symmetric to StreamReader). 2014-07-22 17:55:37 +02:00
Alexander Gessler 2edccb7f34 fast_atof: If a literal ends with a trailing dot (.), only parse further if the next character is a digit. In cases where the dot ends the literal (i.e. "1.") this would cause strtoul10_64 to throw an exception. To preserve as much of the old behaviour, we still consume trailing dots though. This "regression" was introduced (exposed) by #261, which added the extra check to strtoul10_64 that triggered here. This commit now fixes #304 (IFC file reading broken due to IFC files containing "(1.,1.,1.)" lists. 2014-07-13 15:08:28 +02:00
Alexander Gessler 7e48c1cce9 FBX: fix memory leak, parsed TokenList never released. See #307. 2014-07-13 14:11:58 +02:00
Alexander Gessler 5ae010028b FBX: fix memory leak. Connection objects in Document never freed. See #307 2014-07-13 14:07:19 +02:00
Andrew Short a30ea8e92c Fix overflow in STL header colour reading.
When reading the STL header for a "COLOR=rgb" part, the bytes were treated as signed chars, when in fact they can range from 0-255. This meant that any value greater than 127 would overflow, leading to an incorrect colour.

This change fixes the issue by treating the header as unsigned chars.
2014-07-13 00:34:08 +10:00
Robin ce37d3bcad Fixed possible bug with map_emmissive keyword and removed second check for ambient texture keyword 2014-07-11 08:11:54 +02:00
Robin afa2d3da94 Improved texture map data in mtl exporter (in most cases an upper first character is used) 2014-07-10 08:26:32 +02:00
Robin 47e7667071 Added alpha texture map (map_d) 2014-07-09 15:51:09 +02:00
Kim Kulling 231e4e0cd0 update: commit not saved changes.
Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
2014-07-04 00:23:02 +02:00
Kim Kulling c6b516b68b bugfix: handling possible nullptr access.
update: replace clear be resize( 0 ) at some places to avoid double allocations ( only a micro optimization ).

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
2014-07-04 00:22:13 +02:00
Kim Kulling b3b732c12b update: some micro improvements, replace post-increment operator with pre-increment operator.
Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
2014-07-03 20:33:52 +02:00
Kim Kulling 0856ff9659 update: replace some clear / push-back by resize( 0 ) / push_back to avoid redundat allocations.
Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
2014-06-29 21:16:37 +02:00
Alexander Gessler 7abfcd1a4d Merge pull request #300 from eyethereal/fix-obj-exporter-vertex-references
Fixed vertex reference output format in face element for OBJ exporter
2014-06-21 18:55:51 +02:00
Alexander Gessler 1207f84f7b Merge pull request #298 from Madrich/master
Collada fixes, adding XFile Exporter
2014-06-21 18:54:11 +02:00
Madrich 2c34f24497 Fix XFile define 2014-06-21 17:23:30 +02:00
Kim Kulling 9fbc9c4fb7 Merge pull request #301 from eyethereal/obj-exporter-no-name-no-group
OBJ Exporter: No "g" lines with empty names
2014-06-21 15:21:27 +02:00
Nathan Morse 77faf04aa3 OBJ Exporter: No "g" lines with empty names
In the OBJ spec ( http://www.martinreddy.net/gfx/3d/OBJ.spec ), in the section labeled "Grouping" -> "Syntax", the structure of the "g" group statement is defined. Though this statement allows multiple names on a single line, it is unclear whether there must be at least one name on the line. However, the examples don't show any "g" group statements with no names. So, let's be conservative and not write out a "g" group statement that doesn't have a name. These empty "g" statements were prompting an error message from the three.js OBJ loader code.
2014-06-20 16:06:04 -07:00
Nathan Morse d10d20f62f Update ObjExporter.cpp
In the OBJ spec ( http://www.martinreddy.net/gfx/3d/OBJ.spec ), in the section labeled "Referencing groups of vertices", there is no support for allowing a trailing slash with no valid vertex normal reference at the end. This commit modifies the vertex reference output code to prevent this behavior, as it has been causing compatibility issues with other software that parse OBJ files.
2014-06-20 15:08:29 -07:00
Madrich 1cb01c54a3 Fix IOSFixed
Fix Author/AuthoringTool in Collada by MetaData
2014-06-20 00:08:11 +02:00
Alexander Gessler be5fc42e16 Fix memory corruption in the aiGetExportFormatDescription() API. Clarify Exporter doc. 2014-06-17 16:10:55 +02:00
Alexander Gessler 75fd29ac19 SceneCombiner: implement proper copying of meta data. This entire module will need to be revamped in future as it is highly likely to cause further regressions as assimp data structures are modified. 2014-06-17 15:18:10 +02:00
Alexander Gessler d044ce7a62 FBXConverter: avoid creating an empty metadata slot (UDP3DSMAX was erased from list _after_ its size was taken)/ 2014-06-17 14:31:14 +02:00
Alexander Gessler 244f981f6a ObjExporter: cleanup code. Fix bug writing normal: normals would not be transformed by world transform. 2014-06-17 14:15:48 +02:00
Gregory Jaegy 5efc0207f3 Merge branch 'master' of https://github.com/assimp/assimp 2014-06-13 10:59:16 +02:00
Gregory Jaegy 16ae05eeeb obj loader: added multiline support
collada loaded: bug fixed when importing several files, whith one containing animation
2014-06-13 10:56:10 +02:00
Madrich edc7a950c4 ReFix the stuff before
Fix XFileExporter Normal
Fix Collada (Triangle->Poly)
2014-06-11 00:41:18 +02:00
EdgarsT 8549e4b1b1 fixed OgreImporter compilation error with boost scoped_ptr 2014-06-10 19:58:02 +03:00
Madrich 272a59cd36 Fix convertToLH for uv coordinates
Fix Collada export
Fix XFile export
2014-06-10 13:14:41 +02:00
Madrich c4021fbaaf Fix Collada export validated by Schema 2014-06-09 15:17:45 +02:00
Madrich 77cec96d74 Fix collada 2014-06-07 21:17:31 +02:00
Madrich ec2ce90654 Add Scene Author + AuthorTool
Add XFileExporter
Add Collada Triangle+Line export
Fix Obj Comment
2014-06-06 01:56:54 +02:00
Alexander Gessler 1403cabb71 FBXParser: fix compiler warning on double -> float. 2014-06-01 17:34:11 +02:00
Madrich 9ddd459fe8 Extend Collada Exporter using lines and triangles 2014-05-31 12:50:11 +02:00
Jonne Nauha fe87b09246 Move pstdint.h for <= VC9 under include. Apps that include the Assimp headers need to have this available, as its pulled in by metadata.h. Fixes #290. 2014-05-30 01:57:21 +03:00
arkeon b2ac7b878f Correction on FBX material texture UV index
(keep the previous method for "allMaterials" option, this should be change too since the materials indexes used are not the good ones, or just remove the object / material test
2014-05-27 09:11:27 +02:00
Alexander Gessler 62554a055d Merge pull request #285 from jdduke/blend_fix_mirror_winding
Properly orient mirrored blend mesh faces
2014-05-25 01:34:52 +02:00
Jared Duke d9b65f9bd8 Properly orient mirrored blend mesh faces
If the mirrored axis count is odd, the face orientation has logically
been inverted.  In such cases, the winding order should be inverted as
well, easing the burden on applications sensitive to index ordering
(e.g., one-sided renderers) to detect and fix such issues after import.
Add this functionality for .blend meshes.
2014-05-24 08:49:33 -07:00
Alexander Gessler 1b6b238f09 FBX: fix handling of string metadata. Before, we would accidentially confuse aiString and std::string and trigger a debug assertion. 2014-05-22 16:22:38 +02:00
Alexander Gessler becd298e77 FBX: use memcpy() instead of reinterpret_cast or union to populate a float from a blob, causing SIGBUS errors on Android due to memory alignment of the source blob not being a multiple of 4/8. This fixes #24. 2014-05-22 16:17:42 +02:00
Jonne Nauha 8a5041ea11 Merge remote-tracking branch 'upstream/master' into ogre-binary 2014-05-21 04:55:09 +03:00
Jonne Nauha 43e620e04a OgreImporter: Fix UV flip for binary meshes. Fix exception XML parsing when positions are declared in a previous vertex buffer than the currentl parsed one (that has eg. UVs). Remove debug prints from material parser. 2014-05-21 04:37:45 +03:00
Jonne Nauha f8e1dcb102 OgreImporter: Mirror bool return for XmlSerializer as it is in BinarySerializer. Document its meaning. 2014-05-21 04:06:22 +03:00
Jonne Nauha 1129ae5a6e OgreImporter: Implement binary skeleton serialization. Fix bone/animation matrix stuff to be simpler (aka read as Quats to internal structures). Cleanup code for pull request. 2014-05-21 04:00:11 +03:00
Jonne Nauha cf9b705829 OgreImporter: Move skeleton functions to the end of file (after mesh functions). Put all constant to same place in the file. Implement support for 'animationlinks' (skipped) and bone 'scale' (read to Bone but not utilized atm). 2014-05-21 00:09:30 +03:00
Jonne Nauha 0b937c5a4b OgreImporter: Proper rewrite of the XML parser to OgreXmlSerializer. Now more robust for XML sources, previously had hardcoded expectations on the child node ordering. Implement common Skeleton class for both binary and xml serialization. Implement shared IVertexData with proper bone assignment to Assimp bone weights functionality. 2014-05-20 04:52:53 +03:00
Léo Terziman 311f5b47ca Fixed bug during compilation with mingw & improved git revision support for automatic up to date revision number. 2014-05-19 14:36:24 +02:00
Jonne Nauha 75598f69b7 OgreImporter: Format code and move commented verbose debug logging behind internal OGRE_BINARY_SERIALIZER_DEBUG. Thow deadly importer error on clear invlid mesh file errors. 2014-05-18 12:30:16 +03:00
Jonne Nauha 4b16b182be OgreImporter: Implement Ogre binary mesh support (.mesh). All Ogre3D SDK media samples tested to work. Assimp repo does not yet have binary versions of Ogre meshes. 2014-05-18 11:57:44 +03:00
Alexander Gessler d531945888 Merge branch 'master' of github.com:assimp/assimp 2014-05-16 14:58:01 +02:00