*.irr file loading question

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
rayn
Posts: 4
Joined: Mon Apr 07, 2008 6:44 pm

*.irr file loading question

Post by rayn »

Hi!
I was searching forum for a while, but didn't find exact answer.

So: I need to be able to recursively load one irr file from another.
For example - we read 1.irr and then find a node sending us to 2.irr.
We create empty scene node (x) and load 2.irr, making everything we find there, children of x.

I didn't find any node type like "irr_scene" or something like that.
Should I write such a scene node myself, or there's another way to do it?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

You could do that. You'd need to implement the scene node and then create a factory for them. If you use irrEdit to setup your scenes then you have to do the whole plugin thing.

I think you will need to write some code so that you can load scene nodes into the scene as a parent of some arbitrary node. You can actually do this without modifying the engine. You just need to move children of the root node to some detached node, load the scene, move the loaded nodes to be children of the correct node, and then reparent the children of the detached not back to the root.

If you don't need to use irrEdit to join the scenes, then you could just write a bit of code to solve your problem. You could use empty scene nodes with a specific id to identify them, and you could set the node name to be the name of the .irr scene that it should contain.

Travis
rayn
Posts: 4
Joined: Mon Apr 07, 2008 6:44 pm

Post by rayn »

Thank you, that's answer I needed:)

No, I'm not using irrEdit for this project, instead I'm writing simple editor for my purposes.
Post Reply