About Store Forum Documentation Contact



Post Reply 
Exporting object data - access to original file name
Author Message
Pixel Perfect Offline
Member

Post: #1
Exporting object data - access to original file name
I've been pressing ahead with obtaining and exporting details of objects in my world for use by my external AI engine.

I am able to iterate through a specified series of game level areas and extract the UID, Position, Rotation, Scale etc of embedded objects easily but is it possible to extract the original file name of the embedded objects or is this lost by this stage?

I have a work around of passing the model name as a string param and can extract that but I'd rather extract it directly if possible.

Any advice appreciated smile
06-15-2013 02:25 PM
Find all posts by this user Quote this message in a reply
jagatai Offline
Member

Post: #2
RE: Exporting object data - access to original file name
hi pixel,

Im not sure if this is what your looking for but in Area.h you'll find:
Code:
struct AreaObj : ObjParams
      {
         UID id;

         void save(File &f, CChar *path=NULL)C; // 'path'=path at which resource is located (this is needed so that the sub-resources can be accessed with relative path), false on fail
         Bool load(File &f, CChar *path=NULL) ; // 'path'=path at which resource is located (this is needed so that the sub-resources can be accessed with relative path), false on fail
      };

-J
06-17-2013 04:04 AM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #3
RE: Exporting object data - access to original file name
Thanks JAGATAI, I'm not sure that helps me though, as that's currently where I'm extracting all my data but I've been unable to locate anything relating to the original model file name for any referenced object.

The closest I have got is with the following line:

Code:
CChar* pName = area.data().objs[k].mesh().name();

which returns the following: "k93nykm3r!25o!rrp0f71rrf" which is Esenthel's internal mesh file I presume. I'm not sure there will be any reference to the original file "house1.b3d" at this point but if anyone knows differently then this is really what I'm after.
06-17-2013 02:44 PM
Find all posts by this user Quote this message in a reply
shadow Offline
Member

Post: #4
RE: Exporting object data - access to original file name
Yeah that's the filename for the mesh smile You can also use mesh().id() to get its UID.
There's no way currently to access the original filename from which the mesh was created.
I believe this will be available once Esenthel implements "programmable editor networking API" from his roadmap, where you'll be able to connect to your EE Editor and obtain a list of all your project elements.
(This post was last modified: 06-17-2013 05:25 PM by shadow.)
06-17-2013 05:24 PM
Find all posts by this user Quote this message in a reply
Pixel Perfect Offline
Member

Post: #5
RE: Exporting object data - access to original file name
Thanks for the confirmation shadow.

I'll just go with my work around of passing the model name as a string parameter for now then.
06-17-2013 05:48 PM
Find all posts by this user Quote this message in a reply
Post Reply