 brainsaw Registered User |
Quote
|
| 2009-04-21 08:40:24 |
|
Hello,
yesterday I released a first version of my "IrrODE" Irrlicht-ODE wrapper including a plugin for IrrEdit (see http://irrlicht.sourceforge.net/...). Creating the plugin was not that difficult, but I have one problem left: the scenenodes created by the plugin won't display anything later on, they are just needed to store information about the physics entities they represent, but for the plugin I let them display something: every node loads a cube with different texture to show what scenenode it is. My problem: I have put the necessary files into the "IrrEdit/resources" directory, but when I change the working directory the files are loaded from "<newWorkingDirectory>/resources". So (finally) my question: is there a way to retrieve the IrrEdit installation directory, or can the resources be loaded earlier? Accoding to the log the working directory changes before the plugins are loaded. Thanks for your help.
|
 niko Moderator |
Quote
|
| 2009-04-21 16:38:54 |
|
hm, no, that's not possible, sorry. But you could easily get the directory of your plugin (windows has a function for retrieving the directory of the current module, or alternatively, I guess you could use a similar one to get the directory of the running irredit.exe) and you could use this.
|
 brainsaw Registered User |
Quote
|
| 2009-04-22 17:11:30 |
|
Thanks for the tip. Just implemented it using the Windows API call "GetModuleFileName", works fine (at least on my XP computer .. have to try it on some other systems though ;) ).
|