SDK cannot recognise mesh.xml extension

Merry Christmas folks!

The problem I am experiencing now is definitely my fault, as everything used to be alright until I changed some settings about viewing mesh.xml as xml in order to be able view xml contents directly in the SDK.

Now the mesh.xml (OgreXML) extension is pretty much tongues to the jMonkeyEngine SDK: it just treats it as an xml file. Right-clicking the file and navigating to Properties confirms this, and I just cannot get it to recognise it as an OgreXML file.

Right-clicking an OgreXML used to give an option to convert to j3o, and merely double clicking it created a corresponding j3o file. This functionality is now impossible, as can be seen from the right-click options show below:

How do I set the SDK to re-recognise the mesh.xml file extension?

Merry Christmas folks!

I can’t tell you how to do this unfortunately, maybe you find something by googleing “Netbeans reassign file extension / mime type”.

In case it doesn’t work, backup things in .jmonkeyplatform in C:\Users\Shiksa or maybe also C:\Users\Shiksa\AppData\Local\

Either way you can delete this folder to restore the SDK to Factory Settings, maybe you also find some config there which caused that problem as well.

Good Luck and please share your solution with us :slight_smile:

Edit: Oh and ultimatively you can switch to xbuf/gltf to import models as it supports a few more advanced features of blender, but wait with that until you really need it

Thanks a bunch for the super quick reply! :slight_smile:

Researching Netbeans file-extension assignments lead to a dead end, as I was schooled that “The NetBeans MIME resolver only recognizes the extension following the last dot.”

Crawled back to the SDK in shame, but then searching for “mime” in Tools->Options took me to a Miscellaneous->Files tab where I discovered a meshxml extension associated with OgreXML:

I changed Oto.mesh.xml to Oto.meshxml and everything went back to normal (of course had to retrieve material file to get j3o, and had to change extension of loaded model in java code):

Just put “xbuf/gltf research” into my calendar, hope it would help make my 2019 more awesome.

Happy 2019 Chaos, I hope there will be Order soon!! :smiley:

1 Like

Are you saying that now you cant have the period after mesh anymore as shows in the image?

You can try to look for a .mesh.xml extension anyway maybe, or resetting the settings of the SDK, probably it’s only what Java Files you had open and the Window Arrangement

Unfortunately yes. Seems that I can create a new extension (by clicking New button next to the File Extension drop-down menu) with any sequence of characters as long as there is no dot (and the extension name does not already exist):

Appending a dot disables the OK button:

I was able to get what I initially wanted, which was to view and edit Oto.mesh.xml and Oto.skeleton.xml in the SDK instead of using Notepad++ because I did not want to keep alt-tabbing. That led to this issue, and looking back I think I was silly to expect the SDK to recognise and treat a file as both an OgreXML model and an XML document, as the SDK is only one application. This was because I was blinded by being able to treat a file differently using different applications (e.g. a html file is treated as a text file when opened with Notepad, but as a web page when opened with Firefox).

Looking at the wiki, I learned that both .mesh.xml and .meshxml are officially treated as an OgreXML extension:

That made me much less confused!

I will not lose too much personal settings if I reset settings of the SDK, so will do so by deleting the .jmonkeyplatform in AppData/Roaming like you suggested. I will try to reproduce the problem from scratch to help fully understand what happened and perhaps reveal how to rid the issue without resetting SDK settings, in case someone else in the future realises they hate alt-tabbing lol

Technically the SDK does support/can do MultiViewEditors, just check the Material Window, there you have a Text Editor and other Editors, but here this doesn’t make sense because
A) The Editor is the same, no matter what kind of Model you load and you don’t want to edit .blend
B) In most cases you don’t even edit .mesh.xml, apart from maybe educational purposes

Reproduced the problem as illustrated here:

Fiddling with file extensions allowed to view and edit e.g. Oto.skeleton.xml in SDK:

Still have no idea how to reverse this.

It is for educational purposes, and the ultimate goal is to manipulate 2D images to create a 3D model purely by coding (e.g. using Java and XML in this case), rather than by using a 3D creation suite like Blender where you mostly just click, select, drag and drop etc. (similar to Scene Builder for JavaFX apps).

It is for a computer science final year project, so I have to make sure the focus is mainly on the coding (of course I could cheat by using Blender and simply making sure I understand every line of code in the generated xml document, shh) to differentiate it from e.g. an art final year project.

I understand you saying it doesn’t make sense here, because of course in real life efficiency is respected more than “unnecessary” studying to simply understand how something works, rather than using that thing to achieve what you want if it works without worrying about who made it or how it was made. I agree, trying to make something like a .blend from scratch purely by writing code lines cannot make any sense outside of school.

If someone fiddles with the extensions and figures how to get the SDK to re-recognise .mesh.xml as an OgreXML please let us know.