Find the Meshes That Disappeared: A Practical NSL Checklist

A molecular scene can get crowded quickly. Meshes may be hidden among other objects, left unselected, or difficult to identify by name. When you need to inspect mesh nodes without manually clicking through the scene, SAMSON’s Node Specification Language (NSL) gives you a compact way to describe what you’re looking for.

This checklist focuses on mesh visibility and selection—the attributes most useful when you’re trying to answer questions like “Which meshes are visible?” or “Which ones are already selected?” It uses the mesh attribute space, whose short name is me. Expressions in this space match mesh nodes, so they are suited to mesh-focused checks.

Start with visible and hidden

To find visible meshes, use:

me.v

To find meshes that are not visible, use:

not me.v

The short name v stands for the visible attribute. The page also lists hidden, with the short name h, so you can query that attribute directly:

me.h

These are useful as separate checks when a mesh seems to be missing from your view. First look for meshes that match the visible or hidden condition you care about; then inspect their names or selection state to narrow down the result. The documentation lists visible and hidden as distinct attributes, so it’s better to query the one that matches the question you’re asking rather than assume they are interchangeable.

Check selection without guessing

To query selected mesh nodes, use me.selected. To query meshes that are not selected, use not me.selected.

A small but useful detail: unlike some inherited node attributes, selected has no short name in the mesh attribute space. Write the full attribute name. The selectionFlag attribute does have the short name sf, and the documentation gives examples such as me.sf and me.sf false. These are separate attributes in the reference, so use the one that fits your query instead of substituting one for the other.

Use names to make the search more specific

If the scene contains many meshes, a name query can help you focus the check. For example, the reference shows:

me.n "A"

and:

me.n "L*"

Here, n is the short name for name, and the value is written in quotes. This can be handy when your meshes follow a naming pattern: you can use a name expression to identify the group you want to inspect, then check visibility or selection with the corresponding mesh attributes.

A quick troubleshooting routine

  1. Start with not me.v when you suspect the mesh is not visible.

  2. Check me.h if you want to query the documented hidden attribute directly.

  3. Use me.selected or not me.selected to check selection state.

  4. Add a name query such as me.n "L*" when you need to focus on a naming pattern.

Mesh attributes also include hasMaterial (hm) and ownsMaterial (om). They can help you ask material-related questions, but they are not visibility attributes. Keeping each query tied to the property you actually want to inspect makes scene checks easier to read and repeat.

For the complete list of mesh attributes and their examples, see the SAMSON mesh attributes reference.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.