LWS file format comment

ernpchan

Active member
I'm not sure you can as Layout will read those lines and try to process them. You could get around this by making a Master plugin/script that lets you save text to itself that then saves to the scene. The text is then saved within the plugin/script entry in the lws file.
 

dulo

Old Hog
I am parsing the lws file to create some passes I need for rendering. For one special task, I would like to mark a section in the scene file with a comment to easier find it while parsing . .
 

ernpchan

Active member
Not sure that's possible. Layout would have to know what to ignore when loading it. The render pass managers I've seen people make are done within Layout, not from parsing the file in a text editor.
 

darkChief

Member
You could try inserting your own block (using braces and an identifying tag), I think the file resembles xml, Lightwave ignores tags/sections it's not told to explicitly load (by a plugin for example). May work.
 
Last edited:

jeric_synergy

Axes grinder- Dongle #99
That would be a 1) a very good thing to know (if #6 works), and 2) a very good Feature Request.

The OP might be able to delineate a section by using two CONSPICUOUSLY named nulls, depending on what he/she is trying to highlight. Legit comments would be better fer shure, but you do what you can.
 

darkChief

Member
Also if you look at file io section of the c SDK documentation, at the bottom there's an example of inserting a custom section in text mode, to a LWS file,(can be anything), they use timezones as an example.
 

dulo

Old Hog
Also if you look at file io section of the c SDK documentation, at the bottom there's an example of inserting a custom section in text mode, to a LWS file,(can be anything), they use timezones as an example.

Thanks for the tip. will take a look into the SDK documentation.
 

dulo

Old Hog
I tried to use object comments ( eg displaycomment plugin ) but he always moves the comments to the top of the object definition or at the head of the scene file after saving.
// comment
 

jwiede

Electron wrangler
I tried to use object comments ( eg displaycomment plugin ) but he always moves the comments to the top of the object definition or at the head of the scene file after saving.
// comment

I believe the short answer is: Even if you could add comments, Layout's continual re-ordering and modification of LWS sections would effectively randomize their position and order.

LW Layout "owns" the overall structure/ordering of the LWS file, and rewrites it as scene changes occur. Plugins cannot rely on ANY placement/ordering to be maintained outside of sections they explicitly own. They only own the ordering/structure within their sections, that's it. They don't even own the relative ordering of their sections within the greater LWS file "whole".
 
Last edited:
Top Bottom