Parsing

Started by Henry Blewer, February 20, 2010, 09:02:47 AM

Previous topic - Next topic

Henry Blewer

Here's a question I don't think anyone has asked before. If I have a tgd file and want to send it to someone, is there a way to parse the tgd file with comments?

Like in Basic, 'REM This is a comment'. Or '; this is a comment.'
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

FrankB

tgd's are XML, so this might work:

<!-- This is a comment -->

... haven't tried it though.

Henry Blewer

I knew there had to be a way. Thanks Frank!
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

cyphyr

I did try this a while ago, to see if I could embed a copyright notice in a tgd file. You can (you need to edit the file in a text editor) and it does not effect the tgd file however the extra comment code is lost when the file is re-saved.
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

jaf

You can use the "Project Settings ..." button in the lower-left corner.  There's a "comments" option.  I tried around 1500 characters and it saves and loads okay with the tgd file.

The standard xml comment structure doesn't seem to work though, which would really be ideal.  I would think this would be a feature to maybe add in the future (or maybe there's already a different comment structure?)

(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02

jo

Hi,

TGD files are XML, so XML comments will work in the sense that they will be ignored as comments should be. However TGD will not preserve comments or anything else which doesn't form part of what TG2 writes, as you've found. When the files are saved they're basically written anew, from scratch.

Regards,

Jo

Henry Blewer

Thanks Jo. It would be handy to have this. When I have returned to an older tgd file, I have to pull it apart to see what I had in mind building it. Comments would be helpful.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T