A molecular scene can become hard to read when visual models overlap, disappear behind other objects, or carry materials you do not need to inspect. Before changing the structure or removing anything, it helps to narrow your attention to the visual-model nodes that match a specific condition.
SAMSON’s Node Specification Language (NSL) provides a compact way to describe those conditions. For visual models, the attribute-space prefix is vm. A query such as vm.h therefore checks the hidden attribute on visual-model nodes, rather than asking about every node in the document.
Start with a focused filter
The attribute reference gives short forms as well as full names. For example, vm.v is the short form of vm.visible, and vm.h is the short form of vm.hidden. If you are still learning the language, the full forms can make a query easier to scan; once familiar, the shorter forms can be more convenient.
vm.vmatches visual models whosevisibleattribute is true.not vm.vmatches visual models whosevisibleattribute is false.vm.hchecks whether a visual model is marked hidden.not vm.hchecks whether it is not marked hidden.
These are useful distinctions to keep in mind: visible and hidden are separate attributes in the reference. If you are investigating an object that is not appearing as expected, search each condition separately rather than assuming that one is simply the inverse of the other.
Find the models you meant to inspect
Names can narrow a search when a scene contains several visual models. The name attribute takes a string in quotes, so the documented examples include vm.n "A" and vm.n "L*". Using a name-based filter can help you check a particular model without relying only on its appearance in a busy viewport. The reference shows the expression forms; consult the NSL examples for broader guidance on writing specifications.
Selection is another useful inspection condition. Use vm.selected to match selected visual models, or not vm.selected for those that are not selected. One small detail can prevent a confusing query: in this attribute space, selected has no short name. Use the full form rather than assuming the node-level short name applies.
Check material-related attributes separately
When the issue concerns appearance or material assignment, two boolean attributes are available: vm.hm (hasMaterial) and vm.om (ownsMaterial). For example, vm.hm checks whether a visual model has a material, while vm.om checks the ownership attribute. These names describe different properties, so choose the one that matches the question you are asking instead of treating them as interchangeable.
Other useful checks include vm.sf for selectionFlag and vm.vf for visibilityFlag. Each accepts true or false; the reference illustrates explicit false checks as vm.sf false and vm.vf false. Flags and the more direct selected and visible attributes are listed separately, so a targeted query can help you distinguish which state you are examining.
A simple troubleshooting routine
- Confirm that your query targets visual models by using the
vmprefix. - Check
vm.vandvm.hindividually when a model is not showing as expected. - Use
vm.nwith a quoted name to focus on a particular model. - Check material, selection, or flag attributes only when they relate to the problem you are investigating.
This approach keeps a visual investigation specific: identify the node type, choose the attribute that describes the state in question, and inspect the matching models. For the complete attribute list and inherited-attribute notes, see the visual model attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
