When a molecular scene gets crowded, a small but frustrating task can slow everything down: locating the visual models that are hidden, visible, selected, or associated with a material. Names alone may not be enough, and searching the entire document can return nodes that are not visual models. SAMSON’s Node Specification Language (NSL) provides a focused way to describe the visual-model nodes you want to inspect.
The key is to use the visualModel attribute space, abbreviated vm. It matches only visual model nodes. That scope makes expressions such as vm.v specific to visual models rather than a search across every kind of node.
Start with the visibility question
If you are trying to identify visual models by visibility, the documented expressions are:
vm.vforvisiblenot vm.vfor visual models whosevisibleattribute is falsevm.hforhiddennot vm.hfor visual models whosehiddenattribute is false
These are useful starting points when the scene does not look the way you expect. Rather than manually checking visual-model nodes one by one, you can express the attribute you want to match. Keep visible and hidden as separate attributes in your reasoning: the reference lists both, with their own short names and examples. It does not define them as interchangeable.
Use the attributes that answer your actual question
Visibility is only one possible source of confusion. The same attribute space also includes material-related attributes:
vm.hmrefers tohasMaterial.vm.omrefers toownsMaterial.
Both attributes accept true or false. Their names are similar, but the documentation presents them as distinct attributes. If your task concerns whether a visual model has a material or owns one, choose the corresponding attribute instead of treating the two terms as synonyms.
You can also use names to narrow your search. The name attribute accepts strings in quotes, and the reference gives vm.n "A" and vm.n "L*" as examples. The latter illustrates a name expression containing an asterisk; consult the NSL examples if you need to confirm the matching behavior for a particular naming pattern.
Don’t confuse selection with selection flags
Visual models inherit both selected and selectionFlag. For selection, the reference shows vm.selected and not vm.selected. Unlike several other attributes in this page, selected has no short name in the visual-model attribute space. In particular, do not assume the node short name s applies here: the page explicitly notes that it is omitted.
selectionFlag, abbreviated sf, is a separate attribute, with examples vm.sf and vm.sf false. Likewise, visibilityFlag has the short name vf, with examples vm.vf and vm.vf false. When building or reading an expression, use the attribute that matches the question—selected state, selection flag, visible state, or visibility flag—rather than relying on similar-sounding labels.
A quick reference
For day-to-day use, these are the visual-model short names listed in the reference: hm for hasMaterial, h for hidden, n for name, om for ownsMaterial, sf for selectionFlag, vf for visibilityFlag, and v for visible. The full name selected is used without a short name in this attribute space.
A reliable habit is to first scope your expression with vm, then choose the specific attribute that describes what you want to find. This keeps the query’s intent clear and helps avoid mixing up visibility, flags, selection, and material properties.
For the full attribute list and reference details, see the SAMSON visual model attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at samson-connect.net.
