When a molecular scene contains many meshes, a familiar problem appears: the object you want is hard to spot, or a query returns more meshes than expected. Instead of clicking through the scene one node at a time, you can use SAMSON’s Node Specification Language (NSL) to describe the mesh you are looking for.
This guide focuses on a small, useful set of mesh attributes: visibility, selection, names, and materials. The examples use the mesh attribute space, whose short name is me. That space matches mesh nodes, so these expressions are intended for finding meshes rather than arbitrary node types.
Start with what you can see
To query meshes marked visible, use me.visible or its short form, me.v. To query meshes marked not visible, use not me.visible or not me.v.
|
1 2 |
me.v not me.v |
This is a practical first check when an object seems to have disappeared from view: the query can help you distinguish meshes that are marked visible from those that are not. The related hidden attribute is also available as me.hidden or me.h. Since the documentation lists both attributes separately, treat them as distinct questions in your searches rather than assuming one is simply a replacement for the other.
Separate selection from selection flags
For selected meshes, the documented expression is me.selected; use not me.selected for meshes that are not selected. One small but important detail: unlike some other node attributes, selected has no short name in the mesh attribute space. Use the full spelling, not me.s.
|
1 2 |
me.selected not me.selected |
There is also selectionFlag, abbreviated as sf. The reference gives both me.sf and me.sf false as examples. Keeping the two attributes straight makes your intent clearer: use selected when your question is about whether a mesh is selected, and consult selectionFlag when that specific flag is what you need to inspect.
Use names to narrow the search
Mesh names are queried with me.name, or the shorter me.n, followed by a quoted string. The reference examples are me.n "A" and me.n "L*". This gives you a direct way to search by a known label or a name pattern, rather than relying only on where an object appears in the viewport.
|
1 2 |
me.n "A" me.n "L*" |
If you are unsure of a mesh’s exact name, begin with a name pattern you recognize, then inspect the resulting candidates. The examples show the accepted form; consult the NSL examples documentation for broader expression syntax before building more complex queries.
Ask the material question you actually mean
The mesh attribute space exposes two material-related attributes: hasMaterial (short name hm) and ownsMaterial (short name om). The documented examples include me.hm and me.om; both accept boolean values, so negation is also shown for hasMaterial as not me.hm.
These are separate attributes, so don’t substitute one for the other just because both mention materials. Choose the one that matches the property you want to check, and use the full attribute name if its meaning is easier to remember than the abbreviation.
A quick troubleshooting routine
-
Use
meattributes to keep the search focused on mesh nodes. -
Check
me.vandme.hwhen visibility is the issue. -
Check
me.selectedwhen you need to locate selected or unselected meshes. -
Use
me.nto narrow candidates by name, orme.hmandme.omto inspect material-related properties.
Short names are convenient for repeated queries, but full names can make saved expressions easier for teammates to read. Either way, the goal is the same: turn a vague scene-navigation problem into a specific, inspectable question.
For the complete mesh attribute reference, visit the SAMSON mesh NSL documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
