Hi guys, please excuse my poor english.
My problem: I want to load a mesh in any format (.b3d, .3ds, .obj, whatever) and i do not know the filename of it's texture. Is there any option to load a model and then find out the texture(s) filename(s) ?
[solved] what's the texture?
[solved] what's the texture?
Last edited by bruZard on Thu Jun 09, 2016 7:13 am, edited 1 time in total.
Re: what's the texture?
Check the log-window - if it tries to load a texture there might be a message in there.
If you need to get all textures used in a mesh from code you need to use Irrlicht svn trunk.
The meshloaders there have a new interface IMeshLoader::setMeshTextureLoader that allows to set a custom texture loader which is then used by that meshloader. That way you can write your own texture-loader which for example logs all texture used in a mesh. Note that it's not supported yet for all meshloaders.
If you need to get all textures used in a mesh from code you need to use Irrlicht svn trunk.
The meshloaders there have a new interface IMeshLoader::setMeshTextureLoader that allows to set a custom texture loader which is then used by that meshloader. That way you can write your own texture-loader which for example logs all texture used in a mesh. Note that it's not supported yet for all meshloaders.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: what's the texture?
My current Project is a Wrapper for Irrlicht (Blitz3D Style) and there is a function called "LoadMesh". These function have to load the mesh and have to figured out which textures the mesh have.
Re: [solved] what's the texture?
solution:
Code: Select all
meshNode->getMaterial(0).getTexture(0)->getName();
Re: [solved] what's the texture?
*sigh* sometimes I forget the simple answers :-)
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm