When a molecular scene gets busy, the hard part is often not making another model—it is finding the visual model you want to inspect. A scene may contain several visual models, and small differences in their names, visibility, or selection state can make a broad search less useful. SAMSON’s Node Specification Language (NSL) offers a way to express those distinctions as searchable attributes.
The key starting point is the visualModel attribute space, abbreviated vm. It matches only visual model nodes. That gives you a focused scope: instead of thinking about every kind of node in the document, you can build a query around properties that apply to visual models.
Start with the state you want to check
If your immediate question is whether a visual model is visible, use the short attribute name v or the full name visible. The documented examples are vm.v and not vm.v. The first checks for visual models matching the visible condition; the second checks for those matching its opposite.
For the hidden state, the corresponding examples are vm.h and not vm.h. Visibility and hidden are separate attributes in the reference, so it is useful to state which one you mean rather than relying on a vague description such as “the models I can’t see.” The page lists both as Boolean attributes, with true and false as possible values.
Use the full name when an abbreviation may confuse you
Most listed attributes have short names: visible is v, hidden is h, hasMaterial is hm, and ownsMaterial is om. Short names are handy for compact expressions. Full names can be easier to read later, especially when you are returning to a query after a break or sharing it with a colleague.
One useful exception to remember is selected. For visual models, the attribute is written vm.selected; the short name s is not available in this attribute space. The reference also gives not vm.selected for the opposite condition. If a query using a familiar abbreviation does not match what you expect, check whether that attribute has a short name here.
Make names part of the search
When visual models have meaningful names, the name attribute can help narrow your search. Its short name is n, and values are written as quoted strings. The documented examples are vm.n "A" and vm.n "L*". These examples show the quoted-string form; consult the NSL reference for the exact matching rules you need rather than assuming what a particular pattern means.
A small checklist before you search
- Scope: begin with
vmwhen your target is a visual model. - Property: choose the specific attribute—such as
visible,hidden, orselected—that describes what you want to check. - Form: use a short name when convenient, but use the full name if it makes the expression clearer.
- Names: put string values in quotes, as in the documented name examples.
The same attribute space also includes hasMaterial, ownsMaterial, selectionFlag, and visibilityFlag. These are inherited from the node attribute space, as are the other attributes listed on the page. Their presence is a reminder to query the property you actually care about—not simply the one whose name sounds closest. For details about their meaning and examples, see the visual model attributes reference.
To learn more about SAMSON’s Node Specification Language, visit the NSL documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
