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.68k stars 1.07k forks source link

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

Closed kielnino closed 4 months ago

kielnino commented 4 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 4 months ago

Looks great, thanks @kielnino !