OpenDroneMap / ODM

A command line toolkit to generate maps, point clouds, 3D models and DEMs from drone, balloon or kite images. 📷
https://opendronemap.org
GNU Affero General Public License v3.0
4.91k stars 1.11k forks source link

GLTF - obj2glb - Set extensionsUsed in all cases to be consistent with the GLTF standard #1746

Closed kielnino closed 9 months ago

kielnino commented 9 months ago

As the GLTF Definition states

All extensions used in a model are listed as strings in the top-level extensionsUsed array.

So extensionsUsed should be set in all cases. With this change extensionsUsed is set even if rtc is (None, None) (which is the default).

In our use case we didn't had georeferences so rtc was not set and the created glb file couldn't be loaded with the three.js GLTFLoader because extensionsUsed was not set.

pierotofy commented 9 months ago

Looks great, thanks @kielnino !