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?
*.irr file loading question
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
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