A molecular scene can become harder to read when you need to locate a particular light among other objects—or simply check which lights are hidden, visible, or selected. The Node Specification Language (NSL) offers a direct way to narrow your attention to light nodes using their attributes. That can make a small but useful difference when you are inspecting a complex model.
Start with the light attribute space
In SAMSON, the light attribute space matches only light nodes. Its short name is li, so a light query begins with li followed by an attribute. For example, li.h refers to lights matching the hidden attribute, while li.n "A" uses the name attribute.
This prefix is a useful guardrail: it keeps a query focused on lights rather than applying the same attribute filter across every kind of node. If your immediate problem is “which lights should I inspect?”, start by choosing the light-specific attribute that reflects what you need to find.
Filter by visibility or hidden state
When the scene looks different from what you expect, hidden and visible are natural attributes to check. The documented examples are li.h and not li.h for hidden state, and li.v and not li.v for visibility. In plain terms, these expressions let you ask for lights matching the attribute, or use not to ask for the opposite.
The attribute list also includes visibilityFlag, with the short name vf. Its examples are li.vf and li.vf false. The documentation identifies visible and visibilityFlag as separate attributes, but does not explain their behavioral difference on this page. If you are unsure which is appropriate for a particular task, treat them as distinct filters rather than assuming one is interchangeable with the other.
Find a light by name
If you know a light’s name, use name (short name n) followed by a quoted string. The reference gives li.n "A" and li.n "L*" as examples. Quotation marks are part of the expression, so include them when writing a name filter. The page does not define the matching rules for these strings; consult the broader NSL documentation if you need to know how a particular pattern is interpreted.
Check selection without guessing the shorthand
Lights inherit the selected attribute, which can be queried with li.selected or not li.selected. One detail worth remembering: although selected is inherited from the node attribute space, it does not use the short name s for lights. By contrast, selectionFlag has the short name sf, with examples li.sf and li.sf false.
This distinction can save time when a shorthand query does not behave as expected. Use the full word selected for selection state, or use sf specifically for selectionFlag; they are listed as separate attributes.
A simple inspection routine
- Begin with the light prefix,
li, so the query targets light nodes. - Choose one attribute at a time: for example,
li.n "A"for a name-based filter ornot li.vfor lights that do not match the visible attribute. - If the result is not what you expected, check the exact attribute name and whether it has a short name. In particular,
selectedhas no short name in the light attribute space. - Keep
hidden,visible,visibilityFlag,selected, andselectionFlagdistinct. The reference lists them separately; it does not claim that they mean the same thing.
These filters are most helpful when you need a precise way to identify light nodes while reviewing a scene. They let you express what you are looking for directly, instead of relying only on visual scanning. For the complete attribute reference and additional NSL examples, see the SAMSON light attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
