When a molecular scene becomes crowded, it can be surprisingly easy to lose track of its lights. A light may be hidden, invisible, selected, or simply difficult to identify by name. Rather than relying on a visual search through the scene, you can use SAMSON’s Node Specification Language (NSL) to describe which light nodes you want to find.
The useful starting point is the light attribute space, abbreviated li. It matches only light nodes, so a query such as li.h focuses on lights whose hidden attribute is true, while not li.h expresses the opposite condition. This light-specific prefix helps keep a search focused when your document contains many kinds of nodes.
Start with the state you need to inspect
Light attributes include several inherited from the general node attribute space. For visibility-related checks, the documented expressions include:
li.h— lights with thehiddenattribute.not li.h— lights that do not match that hidden condition.li.v— lights with thevisibleattribute.not li.v— lights that do not match that visible condition.
hidden and visible are separate attributes in the reference, as are visibilityFlag and selectionFlag. Avoid assuming that these names are interchangeable: choose the attribute that matches what you are trying to inspect. For example, the short name for visibilityFlag is vf, so the documented expression li.vf false checks that attribute for a false value. The page does not define further behavior for these flags, so treat them as distinct filters rather than inferring additional meaning from their names.
Use names to narrow the search
If the lights in your document have useful names, the name attribute can make a broad search more manageable. Names are written in quotes: the reference gives li.n "A" and li.n "L*" as examples. The second example is a useful pattern to recognize, but the light reference alone does not explain the matching rules for special characters. If you need to rely on a particular pattern-matching behavior, check the broader NSL documentation.
Combining the light attribute space with a name or state gives you a compact way to express what you are looking for. For instance, li.n "L*" narrows the search to light nodes using that name expression, while li.v is a direct visibility-oriented check. These examples are useful starting points when you need to inspect a scene without mentally scanning every node.
Keep selection and visibility distinct
NSL also provides selected and selectionFlag. For lights, the reference lists li.selected and not li.selected, and gives li.sf or li.sf false for the selection flag. One detail that can prevent a syntax stumble: selected has no short name in the light attribute list. Use li.selected, not an assumed abbreviated form. By contrast, selectionFlag does have the short name sf.
A simple troubleshooting habit is to ask one question at a time: am I looking for a light by name, checking its hidden or visible attribute, or checking selection? Using the matching attribute makes the query easier to read and reduces confusion between similar-looking properties.
For the full list of light attributes and examples, see the SAMSON light attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
