Commit Graph

38 Commits

Author SHA1 Message Date
Kim Kulling
de1ec4ee5d Merge branch 'master' into gltf2-mesh-export-fix 2017-11-10 19:07:46 +01:00
Daniel Hritzkiv
9ec117d0bc Fix export of deleted meshes; Add LazyDict::Remove method
When I was merging a node’s multiple meshes into that node’s first mesh’s primitives, I was deleting the merged meshes from the node.

However, I wasn’t deleting the merged meshes from the mAsset->meshes Dict, causing the gltf2 export to contain extra unreferenced meshes and duplicate primitives.

This new code adds a new method to LazyDict, which removes the object from it, taking care to update indexes of the subsequent objects. This change also requires that `Ref`s of `Mesh`es (stored in node->meshes) have their indexes updated.
2017-11-08 18:31:32 -05:00
Thomas Lemaire
5b76a31485 fix trivial warnings
mainly unused parameter and unused function
some parameters are indeed used in a debug built, I used the
(void)(param) trick
warnings reported by clang 4
2017-11-02 11:13:52 +01:00
Jared Mulconry
326158633b Fixed warnings on MSVC caused by implicit conversions from double to float. 2017-10-06 18:23:28 +03:00
Kim Kulling
c1f93a69ae Revert "WIP: Enable Travis clang build" 2017-10-06 15:42:05 +02:00
Jared Mulconry
3803a5181c Fixed warnings on MSVC caused by implicit conversions from double to float. 2017-10-06 20:32:33 +11:00
Jared Mulconry
5804667dbb Addressed some mismatched news/deletes caused by the new glTF2 sources. 2017-10-02 11:04:15 +03:00
Turo Lamminen
1095ec454b Fix delete / delete[] mismatches in glTF2 importer 2017-10-02 10:55:26 +03:00
Josh Faust
febd611d48 Fix glTF2::Asset::FindUniqueID() when the input string is >= 256 chars 2017-09-27 18:41:35 -07:00
Daniel Hritzkiv
814e8b3f8e Formatting 2017-09-18 11:16:05 -04:00
Daniel Hritzkiv
5147acfe65 Revert "store node mesh vs. meshes"
This reverts commit a0d97505e5.
2017-09-18 11:16:04 -04:00
Daniel Hritzkiv
816e6909ca Remove KHR_binary_glTF code
Binary glTF is now part of the glTF2 spec. However, it’s implemented incorrectly, so will be temporarily removed
2017-09-11 11:02:16 -04:00
Daniel Hritzkiv
5cb13aa4b3 Load gltf .bin files from correct directory 2017-09-11 11:02:15 -04:00
Daniel Hritzkiv
a438ece655 Remove premultipliedAlpha from gltf2 2017-09-11 11:02:15 -04:00
John Senneker
140b903d7a Fix parsing of glTF version
Handle version as int in gltf
Fix format specifiers in glTF version parser
2017-09-11 11:02:15 -04:00
Daniel Hritzkiv
44757af34a Implement pbrSpecularGlossiness property as Nullable 2017-09-11 11:02:13 -04:00
Daniel Hritzkiv
03cfa04ee4 Define default material values as static constants
for reuse
2017-09-11 11:02:13 -04:00
Daniel Hritzkiv
1a5823700f Remove need for Has by returning an empty Ref in Get 2017-09-11 11:02:13 -04:00
Daniel Hritzkiv
21259e0835 Use different form of index accessor 2017-09-11 11:02:13 -04:00
Daniel Hritzkiv
a9c4fa84b5 Sampler improvements; Add new LazyDict method
Samplers are now imported into assimp internal format from textures;
Samplers have defaults as per spec;
Sampler enums are strongly typed with UNSET values;
Samplers are exported properly;
Sampler filters are exported as well;
Samplers are re-used across textures on export
Default sampler values are not written
2017-09-11 11:02:12 -04:00
Daniel Hritzkiv
a0d97505e5 store node mesh vs. meshes
glTF nodes can only hold one mesh. this simply assigns to and check’s a Node’s Mesh
2017-09-11 10:55:50 -04:00
Daniel Hritzkiv
ab08a7c3cb reenable animation and skins exports
Currently incorrect, however. May need to be removed
2017-09-11 10:55:50 -04:00
Daniel Hritzkiv
2d54019b8f Remove OPEN3DGC and compression references 2017-09-11 10:50:39 -04:00
Daniel Hritzkiv
562920fbb8 Changes to GLTF2 materials
pbrMetallicRoughness and pbrSpecularGlossiness as structs; persist textureinfo properties from start to finish; persist pbrSpecularGlossiness (via extensionsUsed) usage from start to finish
2017-09-11 10:50:39 -04:00
Daniel Hritzkiv
7532d6aac1 Remove Light, Technique references 2017-09-11 10:50:38 -04:00
Daniel Hritzkiv
863458cd4a Start removing materials common, and adding pbrSpecularGlossiness 2017-09-11 10:50:38 -04:00
Daniel Hritzkiv
11cb9ac139 Working read, import, export, and write of gltf2 (pbr) material 2017-09-11 10:50:38 -04:00
Daniel Hritzkiv
b42d785afe Start managing and importing gltf2 pbr materials 2017-09-11 10:50:38 -04:00
Daniel Hritzkiv
39172feb3e Start reading pbr materials 2017-09-11 10:50:37 -04:00
Daniel Hritzkiv
4d59dee5ea Cache retrieved items via an original index map 2017-09-11 10:50:37 -04:00
Daniel Hritzkiv
47c7c3cf50 Disambiguate Get methods 2017-09-11 10:50:37 -04:00
Daniel Hritzkiv
f814acf33a Update glTF2 Asset to use indexes 2017-09-11 10:50:37 -04:00
Jared Mulconry
698cd5826d Fixed warnings when compiling for x64 on MSVC through VS 2017 v15.3.3. 2017-09-11 00:16:26 +10:00
Daniel Hritzkiv
5b3b80cbc2 Formatting 2017-08-09 11:41:12 -04:00
Daniel Hritzkiv
7a4a32625c Ensure gltf asset version is printed as \d.0 2017-08-09 10:47:34 -04:00
jamesgk
bb55246c18 Export glTF 2 2017-07-25 18:05:18 -07:00
jamesgk
d7cbbaf23e Compile with glTF2 export option (currently same as glTF1 output) 2017-07-25 17:34:03 -07:00
jamesgk
38626d4260 glTF: start fork of files used in export, for glTF2 2017-07-25 17:34:03 -07:00