When a molecular scene contains several animations, it can be surprisingly easy to lose track of which one is visible, hidden, or selected. Searching by a remembered name may not be enough, especially when the scene includes many different kinds of nodes. SAMSON’s Node Specification Language (NSL) provides a way to target animation nodes using attributes such as visible, hidden, and name.
The key detail is scope: the animation attribute space, abbreviated an, matches only animation nodes. That makes it a useful starting point when you want a query to concern animations rather than other objects in the document.
Start with the state you want to inspect
To match animation nodes whose visible attribute is true, use:
|
1 |
an.v |
To match animation nodes whose visible attribute is false, negate the same expression:
|
1 |
not an.v |
These are two useful first checks when an animation seems to be missing from view. Rather than scanning a crowded document manually, you can ask NSL for animation nodes according to their visibility attribute. The expressions are deliberately simple: first identify the attribute, then invert the test when you need the opposite state.
Don’t treat similar attributes as synonyms
The animation attribute space also includes hidden, visibilityFlag, and visible. They are distinct attribute names in the reference, even though they all sound related to display. You can query the first two with an.h and an.vf, respectively; each accepts true or false. For example:
|
1 2 |
an.h an.vf false |
Use the attribute that matches the question you are actually asking. If you are checking the documented visible state, use an.v; if you specifically need to inspect visibilityFlag, use an.vf. The reference lists these as separate attributes and does not say they are interchangeable, so avoid assuming that a query on one automatically answers a question about another.
Use names when state alone isn’t enough
Animations can also be queried by name. The short form for name is n, and name values are written in quotes. For example, the reference gives:
|
1 2 |
an.n "A" an.n "L*" |
This is helpful when you remember a label but not the animation’s current state. Conversely, a visibility query can be useful when you know what state you are looking for but not which animation has it. You can also inspect the other inherited node attributes listed for animations: selected, selectionFlag, and visibilityFlag. The selected attribute is written as an.selected or not an.selected; unlike several neighboring attributes, it has no short name in this attribute space. The short form for selectionFlag is sf.
A small, reliable troubleshooting routine
-
Begin with the animation scope: use the
anprefix so the query targets animation nodes. -
Check the exact state you care about, such as
an.vornot an.v. -
If that does not identify the animation you expected, inspect a different documented attribute rather than assuming the state fields mean the same thing.
-
If you know part of the animation’s name, try the
an.nform with a quoted value.
This approach keeps the investigation focused: identify the node type, choose the relevant attribute, and use its documented spelling. For the complete attribute list and examples, see the animation attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
