When a molecular scene contains many meshes, a small task can become surprisingly fiddly: identify the mesh with the right name, find one that is hidden, or check which meshes have materials. Node Specification Language (NSL) gives you a compact way to describe those criteria. For mesh nodes, the attribute space is mesh, abbreviated me.
The useful shift is to think in terms of a question about a node, then express that question with an attribute. Instead of relying on visual scanning alone, you can use a mesh attribute expression such as me.h to refer to the hidden state, or me.hm to refer to whether a mesh has a material. The expressions are short, but their names make them easier to read when you know what each attribute represents.
Start with the attribute that matches the problem
- Need to identify a mesh by name? Use
me.n. The reference givesme.n "A"andme.n "L*"as example expressions. Names are written as strings in quotes. - Checking material presence? Use
me.hmforhasMaterial, orme.omforownsMaterial. These are separate attributes, so choose the one that corresponds to the question you actually want to ask. - Looking for a visibility state? Use
me.vforvisible, orme.hforhidden. The reference shows both positive and negated forms, such asme.vandnot me.v. - Checking selection? Use
me.selected. Mesh nodes inherit this attribute, but unlike some other node types, it has no short name in the mesh attribute space.
Small distinctions that prevent wrong matches
Some attributes have similar-sounding names but should not be treated as interchangeable. visible and hidden are both available, as are selected and selectionFlag. The reference lists selectionFlag as me.sf, with examples me.sf and me.sf false. Likewise, visibilityFlag is me.vf, with examples me.vf and me.vf false. If your intent is specifically to check a flag, use the flag attribute rather than assuming that the similarly named state attribute is the same thing.
This is especially helpful when you are troubleshooting a scene. If a mesh is not appearing as expected, you can check the visibility-related attributes directly instead of relying only on what is currently on screen. If you are organizing or reviewing materials, me.hm and me.om let you state whether you mean “has a material” or “owns a material.” Clear questions lead to clearer filters.
Use the short names when they help
The mesh attribute space has short forms for many attributes: h for hidden, n for name, hm for hasMaterial, om for ownsMaterial, sf for selectionFlag, vf for visibilityFlag, and v for visible. You can use the full names when readability matters and short names when you prefer compact expressions. Remember that selected is the exception here: it has no mesh-specific short name.
A practical habit is to write down the condition in plain language first: “mesh nodes with this name,” “meshes that are not visible,” or “meshes with a material.” Then select the matching attribute and use its documented expression. This makes it easier to review a query later and to distinguish a mesh-specific search from a broader node-level one. Mesh attributes inherit several properties from the node attribute space, so the mesh reference is also a useful reminder of which names are available for mesh nodes.
For the complete list of mesh attributes and examples, see the SAMSON mesh attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
