Submeshnames ignored?

I have submeshnames set in my x.mesh.xml file, yet when loaded in Scene Viewer or Editor or inside the application all meshes get default name x-geom-0, x-geom-1 etc.

I saw in the code of Ogre XML Loader that it looks for submeshnames and sets them, what causes those names to be lost?

edit: Names set in .j3o file are properly preserved, but those in xml are not (which causes that loss of mesh names during “compiling” xml to j3o.

Geometry != Mesh

In debugger I saw that meshes are named so as well. In other words, what is your hint to preserve those names?

You could recurse through your model after loading and set the geometries names to the names of the mesh they contain. Otherwise the importer would have to be changed to do that, guess that would be @Momoko_Fan’s job.

I guess it might be a good idea. Converted file has single mesh inside each geometry, in such case it should name geometries after the meshes. This could be a checkbox option in advanced properties of mesh.xml to j3o importer.

I guess it would be a better idea to just do it by default, I guess momoko didnt have the names handy in the method where he generates the geometries.

To clarify: on import meshes lose their names, and are named after geometries. So I can’t rename geometries in the code as the name is lost. I hope this could be changed soon. I would do it, I have jmonkeyengine compiling but I don’t know why the names are lost, so I can create proper fix. Also I would need a way to upload changes to svn. I guess such simple thing will be faster done by team member.

Fixed in SVN