I have a problem. I want to save my scene with my mapeditor. Therefore I am using saveScene. But when loading it via loadScene on a different PC it cannot load any textures. I checked the xml file and I just found absolute filepaths. So I changed a few things and loaded the meshes with setWorkingDirectory and relative filepaths. That way I got half of a solution, because the xml now looks like this:
So I tried to correct it manually by adjusting all the texture paths, but I did not get far, because the ITexture's path is protected and I cannot set it. Is there a way to tell Irrlicht to only use relative paths?
No, there was a time irrlicht only used the given paths but this made some misuses and bugs possible. So now every relative path is made absolute and there is no real solution for it.
One proposal is to give a "workingpath" to the save and load method which is used to made the absolute paths relative but nobody really concerned with this problem.
So I would have to programm my own workaround.
But if it is not possible to set Irrlicht to relative paths, what point is there in saveScene/loadScene if you want to really use it in games?
Is there a way to access an ITexture's name attribute (one that I might overlooked)?
ok I used a different approach
I just wrote a custom writeSceneNode method and created my own ITexture class, which has only the purpose to allow a "setPath"
Still, could you tell me, where exactly is that piece of code that is responsible for making all paths absolute?