A molecular scene can become difficult to inspect when visual models are hidden, not visible, or simply mixed in with many other nodes. The first useful step is to make sure your search targets the right kind of node. In SAMSON, the visualModel attribute space—short name vm—matches only visual model nodes. That gives you a focused way to check visual-model attributes without searching across every node type.
Start with the question you are trying to answer
NSL lets you express simple checks using an attribute name or its short name. For example, vm.v checks the visible attribute, while not vm.v checks its opposite. If you prefer the full attribute name, the documentation also shows vm.visible and not vm.visible. These are useful starting points when you want to inspect visual models according to their visibility state.
The reference lists three separate visibility-related attributes: visible (v), hidden (h), and visibilityFlag (vf). They are distinct attributes in the language, so avoid treating their names as interchangeable. If a visual model is not appearing as expected, checking each attribute separately can help you narrow down what your query is actually selecting. For example, compare vm.v, vm.h, and vm.vf rather than assuming one is a synonym for another.
Check selection without confusing it with visibility
Selection has its own attributes. You can query vm.selected or not vm.selected. The visual-model reference specifically notes that selected does not have the short name s in this attribute space. By contrast, selectionFlag has the short name sf, and examples include both vm.sf and vm.sf false.
Keeping these checks separate is practical when you are troubleshooting a crowded scene: visibility-related queries ask about visibility attributes, while selection-related queries ask about selection attributes. A visual model being selected is not, by itself, the same check as asking whether it is visible. Use the attribute that matches the question you need to answer.
Use names and material attributes to narrow your inspection
Visual models also inherit the node name attribute. The reference gives examples such as vm.n "A" and vm.n "L*", where n is the short name for name. If you already know a model’s name, this can help you focus your search. The page also lists hasMaterial (hm) and ownsMaterial (om), with examples such as vm.hm and vm.om. These attributes provide additional checks when material-related properties matter to your inspection.
A small, reliable troubleshooting routine
-
Target visual models with the
vmattribute space. -
Choose one attribute that corresponds to your question, such as
vm.vforvisibleorvm.selectedfor selection. -
Use
notwhen you need the opposite Boolean check, as innot vm.h. -
If the result is unexpected, check a related attribute separately instead of assuming it means the same thing.
-
Use a name or a material attribute for another focused check when relevant.
This approach keeps troubleshooting concrete: each expression tests an attribute documented for visual model nodes. For the complete attribute list and examples, see the Visual model attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
