Then I could call something like ...
Code: Select all
for (const auto& submesh : mesh.getSubMeshes()) {
if (submesh.getName().compare("string_identifier") == 0) {
// this is the one i want, do something with it
}
}
I know there's a setMaterialName() and I've made it work with that, but that also requires setting up a material script, throws a warning, and doesn't work with dynamic submesh creation.
Or maybe name isn't the correct way to do it, but someway to iterate and find a submesh. I also can iterate with getNumSubItems(), but again, it seems there is nothing to look for that I can identify each mesh with. I could wipe out dozens of lines of code with something like this.
Or maybe something like what Ogre::Mesh has with getParameters(), setParameters()?