When a Scene Light Disappears: A Practical NSL Checklist

A light that seems to have vanished from a molecular scene can be surprisingly hard to track down. Is it hidden? Is it invisible? Is it simply not selected? In SAMSON, the Node Specification Language (NSL) gives you a concise way to inspect light nodes by these attributes—without confusing them with other kinds of nodes.

The starting point is the light attribute space, whose short name is li. It matches only light nodes. That qualifier is useful when a scene contains many node types: a query such as li.v is specifically about lights, not every visible node in the model.

Check visibility and hidden state separately

For a quick visibility check, the documented forms are li.v and not li.v. The long attribute name is visible; its short name is v. To check the separate hidden attribute, use li.h or not li.h.

These are two different attributes in the reference, so it is worth checking the one that matches the question you are asking. “Find lights that are not visible” maps directly to not li.v. “Find lights that are not hidden” maps to not li.h. Avoid assuming that these expressions are interchangeable: the documentation lists visible and hidden separately.

Use names to narrow the search

If you have named lights, the name attribute can help identify one. Its short form is n, and the value is written as a quoted string. The documented examples are li.n "A" and li.n "L*". This gives you a practical way to look for a light by its name instead of relying only on its current display state.

Keep selection state distinct

Selection is another property that can be easy to confuse with visibility when inspecting a scene. For light nodes, the documented expression is li.selected, or not li.selected for lights that are not selected. Unlike the general node attribute, the light attribute does not have the short name s; use the full word selected.

The page also lists selectionFlag (sf) and visibilityFlag (vf). For example, the reference shows li.sf false, li.sf, and li.vf false. These flags are distinct named attributes in the reference. If you are diagnosing a light, use the attribute name that corresponds to the state you intend to inspect rather than substituting one for another.

A small checklist for troubleshooting

  • Start with the light-only prefix: li.
  • Check visibility with li.v or not li.v.
  • Check hidden state with li.h or not li.h.
  • Use li.n "A" when you need to identify a named light.
  • Check selection independently with li.selected or not li.selected.

This simple distinction—light node first, then the specific attribute you want to inspect—can make scene checks more deliberate and easier to repeat. 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.

Comments are closed.