#FTK:Reading XDATA Chunks
3 messages in this thread
The 3DS file toolkit API does not contain any calls to read
application-specific XDATA chunks from a 3DS file. Actually, the file format
tables at the end of the manual do not mention anything about the APPDATA
chunks. This data should normally appear in the mesh3ds structure.
I am using Release 3 of the file toolkit and was told this is the latest
version. Is there a more recent version or is this simply a 'hole' in the API?
I know I can get to this data by iterating through the chunks, but I am looking
for a documented entry-point.
Thanks for any help.
Philippe Lourier
Hi Phillip,
The lack of XDATA chunk reading facilities is a definite "hole" in the API. I
think the intent was to add this functionality at a later date, but it has
still gone undone. To futhur compound the issue, there is a "bug" regarding
XDATA chunks in the released version of the toolkit. Appearently, if an
ill-behaved IPAS routine (the first release of the IK module did this) forgets
to terminate its appname string with a NULL character, the toolkit will fail
during the ReadDatabase3ds function. There is a patch to the toolkit, which is
provided on request, that essentially disables all XDATA parsing.
My question is, what application do you have for XDATA? Do you wish to read
data from an IPAS routine, or add your own application specific information.
– Grant
Hello Grant –
Thanks for you reply.
I have a pxp that writes app-specific data to the XDATA chunk. This data is
supplied by the user (through a dialog box in the pxp) and is stored on a
per-object basis. The information is later used by an external utility (a
Win32 app) -this utility uses the file toolkit to retrieve information it needs
from a 3DS file.
At this point, I am able to store the data in the XDATA chunk through my pxp.
I know the data is stored properly because I can also read it from the pxp.
However, I am unable to access it from the external utility because of the
missing entry points in the file API. How can I get to this data? Although
the APP_DATA chunk is not exposed through the mesh3ds structure, I guess I
should be able to get to it taking the mesh3ds object as starting point, but I
need more info on how the data is stored in the database. I could then iterate
through the APP_DATA chunk until I locate the XDATA chunk I am looking for.
Thanks for your suggestions.
Philippe.