zeux / meshoptimizer

Mesh optimization library that makes meshes smaller and faster to render
MIT License
5.49k stars 473 forks source link

gltfpack: Keep image names and unused named images #683

Closed zeux closed 4 months ago

zeux commented 4 months ago

Discussed in https://github.com/zeux/meshoptimizer/discussions/682

Originally posted by **enesaltinkaya** April 27, 2024 Hi, Blender has a new features regarding images while exporting GLTF/GLB; - export_unused_images (boolean, (optional)) – Unused images, Export images not assigned to any material When using this feature, one needs to know names to be able to distinguish between images. Similar to **-kn** can we have a **-kin** "keep image names" for example? The second image below named "test_Albedo" is not connected to any materials. Both images are packed in .blend file. This could be useful when one wants to carry over additinonal images with glb, like heightmaps/bump maps. And once again thanks a lot for this awesome library! before after
zeux commented 4 months ago

Fixed by https://github.com/zeux/meshoptimizer/commit/ae4d14ec3031d8ab9a077325d546e417ee856115 (which should be sufficient since unused images are not skipped atm).