Skip to content
Snippets Groups Projects
Commit ff99cb3c authored by Max Schlecht's avatar Max Schlecht Committed by Bastien Montagne
Browse files

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
parent 1d45d7e1
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment