XML loading/saving interface

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Kelson
Posts: 2
Joined: Sat Jan 07, 2012 3:37 am

XML loading/saving interface

Post by Kelson »

I wrote up a quick patch for 1.7.2 exposing an XML interface on ISceneManager to load/save scenes and posted it on the tracker https://sourceforge.net/tracker/?func=d ... tid=540679 (seems I'm not allowed to use [url]). The latest version appears to be using an increasingly file-centric design though.

Would there be interest in revectoring to XML for parsing structures w/o file information?
Any thoughts on a generic interface like getMesh to load ISceneNode[s]?
Are there plans to add an ISceneSaver to match ISceneLoader?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: XML loading/saving interface

Post by CuteAlien »

Welcome to the forum. You just can't post links in your first post (has to do with spam-bots), in your next posts you can do so.
Can you give the motivation for that interface? I think xml readers and writer can only work with files anyway (as the xml has to come from somewhere - those files can for example also be memoryfiles), so I'm not sure right now when this would be needed.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: XML loading/saving interface

Post by hybrid »

I was also wondering about the necessity for this patch. You can use the new saveScene interface to save .irr files starting from a certain scene node already. Everything beyond this node, i.e. children, will be saved to an own scene file. Loading results in a subscene, which simply means a sub scene graph starting with one or more scene nodes and the hierarchy beyond.
Please have a look at the new API in Irrlicht's SVN/trunk repository. New functions need tom be implemented for that developer version anyway. If there's still some improvement with your patch, please explain where and how.
Kelson
Posts: 2
Joined: Sat Jan 07, 2012 3:37 am

Re: XML loading/saving interface

Post by Kelson »

Thanks for the response!

From a certain perspective, I was basically reinventing FileSystem::createMemory[Read|Write]File, so I don't see this providing much beyond that capability. I was essentially working run-time serialization to/from XML for in-game editing.

I'd agree it isn't necessary given the MemoryFile abstraction.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: XML loading/saving interface

Post by CuteAlien »

You mean you wrote your own xmlreader/writer as well and need it for that?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply