It would be nice to have an option when calling
Geometry.setIndices(...) that would prevent the calls to
_createGlobalSubMesh, that will create a single subMesh for each of the mesh linked to the Geometry.
My use case is that I modify the indices to remove / add some new faces for a mesh that have several sub meshes. I also update the
indexCount properties of each sub mesh to account for those changes.
However, when calling
setIndices(), my sub meshes are replaced by a single new sub mesh.
What I’m currently doing is copying the
mesh.subMeshes array before calling
setIndices() and set it again to
mesh.subMeshes after the call, but maybe an option like
dontRecreateSubMesh would be nice?