When dealing with complex molecular systems, managing visibility can quickly become a headache. Whether you’re inspecting protein motions, visualizing ligand movements, or preparing animations for presentations, knowing exactly which nodes are visible (and why) is essential. Confusingly, SAMSON animation nodes come with not just one but multiple attributes that affect visibility. Let’s untangle these so you can control your scenes with precision.
Understanding Visibility in SAMSON’s Node Specification Language (NSL)
In SAMSON, molecular scenes are built as trees of nodes. When it comes to animations, these nodes inherit general visibility controls, but also come with their own nuanced attributes. The NSL lets you filter, search and manipulate nodes using these attributes.
The Three That Matter
There are three visibility-related attributes relevant to animation nodes in the an (animation) attribute space:
an.v– Is the node visible?an.vf– The visibility flag (a setting that suggests visibility)an.h– Is the node hidden?
At first glance, an.v, an.vf, and an.h might look redundant. In practice, they each control distinct aspects of display logic. Here’s how:
an.v: The Actual Visibility
This attribute tells you whether an animation node is currently visible in the user interface. You can use it in expressions like:
|
1 |
an.v |
|
1 |
not an.v |
However, this actual visibility might be influenced by several factors—it’s not always a direct result of your input.
an.vf: Visibility Flag
Like a preference switch. You can set visibility with:
|
1 |
an.vf false |
or
|
1 |
an.vf |
This doesn’t guarantee immediate invisibility—it indicates that this node is meant to be invisible, unless the visibility is overridden by other settings or dependencies in the scene hierarchy.
an.h: Hidden Property
This attribute confirms whether the node is explicitly hidden. For example:
|
1 |
an.h |
returns only those animation nodes that have been manually hidden through other operations or by the user interface. It’s often used in combination with an.v to understand why something isn’t showing up.
Putting it All Together
If you’re preparing visual materials, want a cleaner viewport, or are debugging why a molecule disappears during playback, try these strategies:
- Use
an.vto find out what’s currently visible - Use
an.vfto adjust what you’d prefer to show or hide - Use
not an.hto show only non-hidden nodes
Combine them for more advanced queries:
|
1 |
an.vf and not an.h |
This shows animation nodes that are visible by default and not explicitly hidden.
Why This Matters
In dense scenes with hundreds of moving parts, managing visibility cleanly avoids rendering unnecessary components and improves both performance and clarity. It also helps communicate your simulation results more effectively.
To explore more about animation node attributes and how the visibility system works, check the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON from https://www.samson-connect.net.
