In a molecular scene, several mesh objects can sit together in the same view. When you need to narrow down which ones to inspect, a filter that matches the intended node type and property can be more dependable than relying on appearance alone. SAMSON’s Node Specification Language (NSL) provides a mesh attribute space for this purpose.
Start with the mesh attribute space
The mesh attribute space, abbreviated me, matches only mesh nodes. That gives you a useful starting point when a broader node query might include other kinds of objects. For example, me.n "A" looks for a mesh whose name matches the specified string. The documentation also shows me.n "L*" as a name-expression example.
Names are often the quickest way to distinguish meshes, but they are not always enough. Objects may share naming conventions, or a scene may contain meshes that are easy to confuse visually. The mesh attributes also let you filter on properties such as visibility, selection, and material association.
Make visibility and selection explicit
To express a visibility condition, the examples include me.v and not me.v. For selection, they include me.selected and not me.selected. These can help make a query’s intent readable: for instance, you can describe a search for meshes that are not currently visible or that are not selected.
There is a small syntax detail worth remembering: in the mesh attribute space, selected has no short name. Use me.selected, not a shortened form such as me.s. Other listed attributes do have short names: visible is v, hidden is h, and name is n.
The reference lists hidden and visible as separate attributes, and likewise lists selectionFlag and selected separately. Treat them as distinct queryable attributes rather than assuming that one is simply another spelling for the other. The documented examples include me.h, me.sf false, and me.vf false; the short names for the flags are sf and vf.
Check material-related properties
If material association matters to your task, the mesh attribute space includes hasMaterial (hm) and ownsMaterial (om). The reference gives me.hm and me.om as examples, with boolean values available for both. These attributes offer a way to make material-related criteria explicit instead of relying on how an object happens to look in the viewport.
A practical way to build a query
- Limit the node type: begin with the
meattribute space so the query targets mesh nodes. - Add a distinguishing property: use a name expression such as
me.n "A", or check a boolean attribute such asme.v. - Be precise about the attribute: use
selectedwhen querying selection state, and remember it has no mesh short name. - Keep the expression readable: prefer a clear attribute name when a short form could make the query harder for a collaborator to interpret.
This approach is especially helpful when revisiting a crowded scene: the query itself records what you meant to match, whether that is a named mesh, a visibility state, or a material-related property. The examples here reflect the attributes documented for mesh nodes; they do not define additional behavior for those properties.
For the full attribute table and inherited-attribute details, learn more in the SAMSON mesh attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
