• Advertisement
Sign in to follow this  

How to get .x file info

This topic is 1549 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an x file with several subsets in the mesh object. I would like to reference each subset by its name, but I can't find a reliable way to do that. I thought when I loaded it, there would be some kind of information saved that would include the string name.... Maybe I'm smok'n something.

 

Does anyone know what I mean and how to do it?

Share this post


Link to post
Share on other sites
Advertisement

D3DXFRAME frame;

frame.name;

 

If you don't mean frames then subsets are usually ID'ed by a DWORD.

Edited by EddieV223

Share this post


Link to post
Share on other sites

Hello.

 

Its the frame name in the .x file its like this here.

 

Frame Wheel05 {

 

FrameTransformMatrix {

-0.000001,0.000000,-2.116935,0.000000,-2.116935,0.000000,0.000000,0.000000,0.000000,2.116935,0.000000,0.000000,7.810452,-18.614912,387.071350,1.000000;;

}

Mesh {//here is your mesh for this frame name

4416;//number of vertices .

28.135689;0.000000;0.000000;,

26.438898;18.357489;9.622972;,

26.438898;0.000000;9.622972;,

26.438898;18.357489;9.622972;,

28.135689;0.000000;0.000000;,

28.135689;18.357489;0.000000;,

Share this post


Link to post
Share on other sites

Is there no way to get that without going through the file as text?

 

I have tried to read the file like a text file, but I keep getting EOF before the end; resulting in an incomplete list.....

Share this post


Link to post
Share on other sites

If the number is 10 or 13, you are at the end and start of a new line. I believe the order is 13 then 10 for Windows, 13 for Linux, and 10 for Mac*, depending on if it is using an actual newline (read: Enter style keypress) or if the program is just writing out a newline (which could vary).

 

* I may have Linux and Mac flipped.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement