View Single Post
Old 02-03-12, 11:02 PM   #512
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Ekmek View Post
WIll it work with any Gr2s? or generic gr2s?
Currently I have it locked to accept only certain GR2 files (it's based on what it reads from fileheader)

The writer is complete and works like a champ . One problem though: when comparing the files written to their original there were some differences. These differences were in the extendeddata regions, namely the ArtToolInfo's extendeddata region. Upon investigation I know why there are differences but the solution to the why is more complex and haven't figured it out yet.
Open up NSS_Undine.GR2 in Granny Viewer. Click on ArtToolInfo. Click on ExtendedData. Click on SelectionSets. Now what we see are 4 entries: Name, Objects, Name, Objects. This is the problem - the duplication of entry names. When the writer goes to write extendeddata it asks the extendeddata class to find the value for the entry it needs to write. So the first Name and Objects are written correctly but the next Name and Objects are written incorrectly - because the extendeddata class returns the first one it finds of each .
One would probably ask why are these needed? The answer is because they are type granny char * (pointer to a string) and thus I have to write those string values to the new file at the correct place in the file.
I'll have to think this one over more...I don't want to screw up my extendeddata class because it works perfectly besides this one little error...
TheDarkWraith is offline   Reply With Quote