get Dinamic Skin File Name

Posted By: NeoNeper

get Dinamic Skin File Name - 05/10/13 03:03

Hello Brothers.
that way I can get the file name from SKIN of the Model?
Posted By: Dveyee

Re: Get Dynamic Skin File Name - 05/10/13 04:54

Try ent_getskin.
Posted By: sivan

Re: Get Dynamic Skin File Name - 05/10/13 06:41

I think you cannot get the texture file name by ent_getskin only a BMAP*, but c_trace has a flag SCAN_TEXTURE to get texture name that you can read from the resulting hit struct:

hit.texname : char* pointer : name of the hit texture (skin1 or skin2) for models, blocks, or sprites. Terrain has no texture names.
Posted By: NeoNeper

Re: Get Dynamic Skin File Name - 05/10/13 13:16

Quote:

Try ent_getskin.

really the ent_getskin returns a bmap*. I Need FileName of the Bmap. Sample: "texture.tga"

Quote:

I think you cannot get the texture file name by ent_getskin only a BMAP*, but c_trace has a flag SCAN_TEXTURE to get texture name that you can read from the resulting hit struct:

hit.texname : char* pointer : name of the hit texture (skin1 or skin2) for models, blocks, or sprites. Terrain has no texture names.


I need for TERRAIN and Models, But I need a different method of the SCAN_TEXTURE.

I use multiple Terrains on the scene and for save the information from each of them I use the following method
Code:
for(you = ent_next(NULL); you; you = ent_next(you))
  { 
     if(ent_type(you) == 4) 
          {

           //Thi is terrain
           //....
          }
  }



this way I can get all the information i need of the all terrains and models in the scene, only do not know a way to get the name of the textures that are in the skins
Posted By: sivan

Re: Get Dynamic Skin File Name - 05/10/13 14:03

understood, it would be important for me too this, I'm planning to export graphic assets from my editor folders when a level is finally compiled as wmb, and then everything should be the same folder, but it is currently a real problem. probably the SDK provides a solution where external skin names can be got.
Posted By: oliver2s

Re: Get Dynamic Skin File Name - 05/10/13 15:57

Originally Posted By: sivan
understood, it would be important for me too this, I'm planning to export graphic assets from my editor folders when a level is finally compiled as wmb, and then everything should be the same folder, but it is currently a real problem. probably the SDK provides a solution where external skin names can be got.


I'm planning the same thing. I also think the only solution is the SDK (where you can do this for sure).

Another (very bad) approach would be, to scan the model file for common image file strings (tga, bmp, dds, ...) via file_... instructions.
Posted By: NeoNeper

Re: Get Dynamic Skin File Name - 05/12/13 21:08

I can create plugins using the SDK, but I know of no manual or some reference functions and variables that I can use!

If you have this knowledge and if they want to help me, I can create functions that will help us a lot in our future developments!
Posted By: oliver2s

Re: Get Dynamic Skin File Name - 05/12/13 21:41

I've never seen a manual of the SDK, but it comes with some examples of I/O functions.
© 2024 lite-C Forums