diff options
author | Max Schlecht <Bobbe> | 2022-03-29 10:56:43 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-03-29 10:56:43 +0300 |
commit | ff99cb3cf86ff2824262541b1e6d981be76ea2ac (patch) | |
tree | bd6121a1d3fef460d879e7e4e10b1a2204b571fa /io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py | |
parent | 1d45d7e10631bc57f563f3e6702592c7a8565416 (diff) |
Fix .X3D/.WRL importer crashing with empty IndexedFaceSets
When importing a .x3d file containing an empty IndexedFaceSet, like this for example:
```
Shape {
geometry IndexedFaceSet {
coord Coordinate {
point [
]
}
coordIndex [
]
}
}
```
`import_x3d.py` throws an exception, because `x_min`, `x_max`, ... are not initialized/still set to `None`.
This fixes the issue by initializing the mentioned variables to `inf`/`-inf` respectively and also further simplifies the code by utlizing the `min` and `max` builtins.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D14470
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py')
0 files changed, 0 insertions, 0 deletions