Commit Graph

2913 Commits (5b76a31485bcb28363132f2bce8c8acc4506b0e0)

Author SHA1 Message Date
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
Kim Kulling bfa33b50ad Merge branch 'master' into gltf2-materials 2017-10-24 10:40:20 +02:00
Alexandre Avenel cc8374dd80 Return exception when obj file contains invalid face indice 2017-10-21 20:58:00 +02:00
ndotl 8cf61c3c89 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 2017-10-20 15:22:49 +02:00
Daniel Hritzkiv 6e88838602
powf -> pow
Fix build errors on linux
2017-10-19 16:21:29 -04:00
Daniel Hritzkiv 40147d253d
Prefer “BLEND” over “MASK” as an alphaMode default
“BLEND” is a much nicer alphaMode value (if the hardware supports it – not a steep requirement) than “MASK” as mask is either fully opaque or fully transparent, depending on the alphaCutoff. This matches many other converters’ alphaMode default.
2017-10-19 16:21:29 -04:00
Daniel Hritzkiv 89358458f0
Approximate specularity / glossiness in metallicRoughness materials
Before, models (of traditional lighting models) with specularity/glossiness would be completely flat when exported to metallicRoughness. These changes approximate glossiness (as an inverse of roughness, with specular intensity as a multiplier) both reading from gltf2 and writing to gltf2.
2017-10-19 16:21:29 -04:00
Daniel Hritzkiv a898c1f2d1
SpecularFactor import and export improvements
The changes here (which only apply to reading from or writing to pbrSpecularGlossiness) will:

- store and read specular color on `AI_MATKEY_COLOR_SPECULAR ` rather than `AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_SPECULAR_FACTOR`
- store and read specular texture from `aiTextureType_SPECULAR` rather than `AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_SPECULARGLOSSINESS_TEXTURE`. Even though pbrSG’s specularGlossiness texture uses the alpha channel for glossiness, it will still work well enough with just the RGB channels of the image
2017-10-19 16:21:29 -04:00
Daniel Hritzkiv c71790c78d
Diffuse color and diffuse texture import and export improvements
These changes do a better of importing and exporting baseColor colors and textures, as well as diffuse colors and textures (in the case of pbrSpecularGlossiness)

- baseColorFactor will be stored on both `$clr.diffuse` and `$mat.gltf.pbrMetallicRoughness.baseColorFactor`, and will be extracted from `$mat.gltf.pbrMetallicRoughness.baseColorFactor` first, and falling back to `$clr.diffuse`. The behaviour for baseColorTexture is similar
- pbrSG’s diffuseFactor will now only be store on `$clr.diffuse` (overwriting any previous assignments to `$clr.diffuse`, e.g. from metallicRoughness’ baseColorFactor, as diffuseFactor is more analogous to diffuse color than baseColor), and will only extract from `$clr.diffuse`
2017-10-19 16:21:16 -04:00
Daniel Hritzkiv 5eaf083fbd
Fix output of glTF 1 version string
Was writing out “\u0001” instead of “1.0” as the data types were incorrect
2017-10-19 12:43:52 -04:00
Kim Kulling b2eb599176 Update ColladaExporter.cpp
Retrigger travis.
2017-10-16 18:51:25 +02:00
Kim Kulling 44ad80201c Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 2017-10-14 21:47:21 +02:00
Jared Mulconry f8c4002294 Fixed a divide by zero error in IFCBoolean that was latent, but nevertheless a bug 2017-10-14 18:46:19 +03:00
Turo Lamminen 9a6b141568 FBX: Replace bad pointer casting with memcpy 2017-10-14 18:46:19 +03:00
Turo Lamminen 7cbb5f4d3b B3DImporter: Replace bad pointer casting with memcpy 2017-10-14 18:46:19 +03:00
Kim Kulling e662f2dc6f Blender: fix short overflow. 2017-10-13 22:41:38 +02:00
Kim Kulling e79848ff79 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 2017-10-11 13:49:47 +02:00
Jared Mulconry 3e7dbb5dfb Merge branch 'master' of github.com:assimp/assimp into appveyor 2017-10-11 19:06:29 +11:00
Kim Kulling a1b79e23e6 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 2017-10-10 19:33:07 +02:00
Kim Kulling c128e7e56c Merge branch 'master' into issue_1453 2017-10-10 18:20:22 +02:00
Jared Mulconry fa91a0f64c Another minor source change, this time even more minor than the last. Let's see what the cache can do with this. 2017-10-10 22:45:45 +11:00
Jared Mulconry 1497cc27b2 Cleaned up the whitespace again. Let's see how the cache does. 2017-10-10 22:08:13 +11:00
Jared Mulconry b8ad03baa1 Because I have to change a file somewhere to properly test the cache on AppVeyor, I've made some whitespace a bit better. 2017-10-10 19:45:57 +11:00
ndotl 7c8e8e04fa Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 2017-10-09 16:00:46 +02:00
Haik Lorenz 7353d25c13 Prevent failing stringstream to crash the export process
Text exporters are using string streams to hold the file content first and then write them to the file in a single pass. If for whatever reason the stream has the fail bit set, tellp() will return pos_type(-1), which in turn makes the subsequent write crash - at least on Windows systems. One reason for the stream being in fail state is when its size exceeds 2^31 bytes, even on 64-bit systems (i.e., when very large scenes get exported).

The fix is checking the fail() before even opening the file.
2017-10-09 15:47:17 +02:00
Kim Kulling d60fe38253 Merge branch 'master' into master 2017-10-09 00:07:43 +02:00
Turo Lamminen cd64eae590 GenericProperty: Remove useless const qualifier from return value 2017-10-08 12:45:48 +03:00
Turo Lamminen 7e033c6cef FBX: Remove useless const qualifier from return value
const qualifier on primitive return type does nothing.
2017-10-08 12:45:02 +03:00
Kim Kulling b57011552b Merge branch 'master' into issue_1453 2017-10-07 19:08:52 +02:00
Kim Kulling f925e2cf4e Reproduce issue and remove assertion when a nullptr makes more sence 2017-10-07 19:08:20 +02:00
Marco Di Benedetto 9a79d243f9 added additional displacement texture token. 2017-10-07 12:36:02 +02:00
Jared Mulconry 326158633b Fixed warnings on MSVC caused by implicit conversions from double to float. 2017-10-06 18:23:28 +03:00
Turo Lamminen 50b43f76e1 OpenGEXImporter: Copy materials to scene 2017-10-06 18:23:28 +03:00
Turo Lamminen b841ed194b OpenGEXImporter: Store RefInfo in unique_ptr so they get automatically cleaned up 2017-10-06 18:23:28 +03:00
Turo Lamminen 775f984d99 OpenGEXImporter: Fix IOStream leak 2017-10-06 18:23:28 +03:00
Turo Lamminen 22b55d01a2 OpenGEXImporter: Store ChildInfo in unique_ptr so they get automatically cleaned up 2017-10-06 18:23:28 +03:00
Turo Lamminen 61278aa408 AMFImporter: Fix memory leak 2017-10-06 18:23:28 +03:00
Turo Lamminen 1f16ed9fd0 UnrealLoader: Fix IOStream leak 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
Kim Kulling c9b9dab1ff Merge pull request #1475 from jaredmulconry/master
Fixed warning on clang 3.9 caused by static data member in class template
2017-10-06 15:37:33 +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 341222697a Address warnings on Clang 3.9 caused by having a static data member in a class template. 2017-10-05 23:55:10 +11:00
Turo Lamminen 3f0bb9c634 OpenGEXImporter: Copy materials to scene 2017-10-05 12:51:08 +03:00
Turo Lamminen 568003a0d3 OpenGEXImporter: Store RefInfo in unique_ptr so they get automatically cleaned up 2017-10-05 12:43:49 +03:00
Turo Lamminen e7ff7b167f OpenGEXImporter: Fix IOStream leak 2017-10-05 12:38:44 +03:00
Turo Lamminen b6d2b91799 OpenGEXImporter: Store ChildInfo in unique_ptr so they get automatically cleaned up 2017-10-05 12:35:17 +03:00
Turo Lamminen 316046f748 AMFImporter: Fix memory leak 2017-10-05 12:15:28 +03:00
Turo Lamminen 34acf47acd UnrealLoader: Fix IOStream leak 2017-10-05 12:15:28 +03:00
Turo Lamminen afce984228 FBXImporter: Add explicit instantiation of log_prefix so other FBX source files can see it 2017-10-05 12:15:25 +03:00
Turo Lamminen bf1aaf98f9 IFCImporter: Add explicit instantiation of log_prefix so IFCMaterial.cpp can see it 2017-10-05 12:15:11 +03:00