A crowded molecular scene can make a simple task surprisingly slow: find the mesh you want, work out whether it is hidden or visible, and avoid confusing it with other kinds of nodes. SAMSON’s Node Specification Language (NSL) offers a practical way to narrow that search by querying mesh attributes.
The key is the mesh attribute space. Its short name is me, and it matches mesh nodes only. That gives you a useful starting point when a document contains many different node types: mesh queries keep the search focused on meshes.
Start with the problem you can describe
If you remember part of a mesh’s name, try a name query. For example, me.n "A" searches by the name A, while me.n "L*" is a documented example using a pattern. This can be more dependable than scanning a long scene tree by eye, especially when several meshes are present.
If the name is not helpful, use a state you can recognize. These expressions query visibility and selection-related attributes:
me.vandnot me.vquery meshes by theirvisibleattribute.me.handnot me.hquery meshes by theirhiddenattribute.me.selectedandnot me.selectedquery whether meshes are selected.me.sf falseandme.sfquery theselectionFlagattribute.me.vf falseandme.vfquery thevisibilityFlagattribute.
These attributes have similar-sounding names, but the reference lists them separately. In particular, visible and visibilityFlag are distinct attributes, as are selected and selectionFlag. If you are unsure which one describes the state you need, query them separately rather than treating them as interchangeable.
Check material-related attributes separately
Meshes also inherit hasMaterial and ownsMaterial from the node attribute space. Their short forms are hm and om, so you can query them with me.hm and me.om. The reference lists both as true-or-false attributes. Since they are separate fields, it is useful to check the one that matches the question you are asking instead of assuming that one stands in for the other.
A small, repeatable troubleshooting routine
- Restrict the search to meshes: use the
meprefix. - Try an identifier: search by name with
me.nand a quoted string. - Check the relevant state: use
me.vfor visibility,me.selectedfor selection, or the corresponding flag attribute when that is what you need to inspect. - Verify material properties independently: test
me.hmorme.omrather than inferring one from the other.
This approach turns “Where did that mesh go?” into a more specific question you can test. It is especially handy when you are inspecting a complex scene and want to narrow your attention without accidentally broadening the search to other node types.
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.
