When a molecular scene contains several light nodes, it can be surprisingly easy to lose track of the one you want to inspect. A light may have an unhelpful name, be hidden, or simply not be the light you currently need. SAMSON’s Node Specification Language (NSL) gives you a compact way to identify light nodes by attributes, so you can make searches more deliberate instead of relying only on visual inspection.
Light-specific queries use the light attribute space, abbreviated li. This matters because the prefix narrows the search to light nodes. For example, li.h refers to lights with the inherited hidden attribute, while li.v refers to lights with the inherited visible attribute.
Start with the question you are trying to answer
Rather than memorizing every attribute, begin with a practical question. Are you looking for a light by name? Checking whether a light is hidden? Or trying to distinguish lights marked visible from those that are not? The attribute table gives each attribute’s full name, short name, accepted values, and examples.
- Check hidden status:
li.hmatches lights withhiddenset to true;not li.hexpresses the opposite. - Check visible status:
li.vmatches lights withvisibleset to true;not li.vexpresses the opposite. - Look for a name:
li.n "A"uses the short namenforname. The documentation also showsli.n "L*"as an example. - Check selection state:
li.selectedandnot li.selectedtest whether a light is selected or not.
Don’t confuse similar-looking attributes
One useful habit is to choose the attribute that matches the exact property you want to query. The light reference lists both hidden and visible, as well as visibilityFlag. It also lists selected and selectionFlag. These are separate attributes in the reference, so avoid substituting one for another just because their names sound related. If your question is specifically about visibility, use the documented visible or visibilityFlag attribute as appropriate; if it is about selection, use selected or selectionFlag.
The short names can make repeated queries quicker: h means hidden, n means name, sf means selectionFlag, vf means visibilityFlag, and v means visible. There is one notable exception: selected has no short name in the light attribute space. Use li.selected, not an assumed abbreviation.
A small workflow for more reliable searches
First, decide whether you need to search only lights; if so, use the li prefix. Next, choose one attribute that directly describes what you are checking. Try a simple expression such as li.h or li.n "A", then adjust it based on the result. Keeping queries focused makes it easier to spot whether the chosen attribute answers your question. When reading or sharing a query, the full attribute name can also make its intent clearer, especially for selected, which is written out in full.
Light attributes are inherited from the general node attribute space. That means familiar node properties such as name, hidden state, selection, and visibility are available for lights too. The light reference is therefore a useful quick lookup: it shows which node attributes apply and how to express them with the light prefix.
For the complete attribute list and examples, see the SAMSON light attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
