For molecular modelers involved in animations within SAMSON, understanding and utilizing animation attributes effectively can streamline workflows and improve precision. Animation attributes, defined in SAMSON’s Node Specification Language (NSL), allow users to control specific attributes of animation nodes with clarity and ease.
In this blog post, we’ll delve into the animation attribute space, its short name an, and the types of attributes it includes. By the end, you’ll gain insights into using these attributes to better manage animation nodes in your projects.
What Are Animation Attributes?
Animation attributes in SAMSON’s NSL primarily deal with nodes associated with animations. These attributes are defined under the animation attribute space (an) and allow users to specify, query, and manipulate animation-related parameters.
Here’s a quick summary of the animation-related attributes:
| Attribute name | Short name | Possible values | Examples |
|---|---|---|---|
| hidden | h |
true, false |
an.hnot an.h |
| name | n |
strings in quotes | an.n "AnimationName"an.n "Anim*" |
| selected | – | true, false |
an.selectednot an.selected |
| selectionFlag | sf |
true, false |
an.sfan.sf false |
| visibilityFlag | vf |
true, false |
an.vfan.vf false |
| visible | v |
true, false |
an.vnot an.v |
Practical Use Cases
Each attribute can be used in specific scenarios to control or query the animation nodes:
hidden: Use this attribute to check or modify whether an animation node is hidden. For example,an.hwill returntrueif the animation node is hidden.name: Thenattribute makes it possible to search for or assign names to a node. For instance,an.n "IntroAnimation"will match any animation node with this specific name.selected: Determine if an animation node is selected in the interface. This is handy when focusing on specific nodes, e.g.,not an.selected.selectionFlagandvisibilityFlag: These flags allow enabling or disabling selection and visibility behaviors programmatically.visible: Use this to check if an animation node is currently visible. Example:an.v(true if visible).
Inherited Attributes
Some of these attributes are inherited from broader attribute spaces:
hidden,name,selectionFlag,visibilityFlag, andvisibleare inherited from the node attribute space.selectedcomes from thenodespace but functions without the short name (s).
Conclusion
Animation attributes in SAMSON provide a structured and efficient way to manage animation nodes. Whether you’re naming nodes, toggling visibility, or working with selection flags, knowing these attributes can help you work efficiently.
For a comprehensive reference and examples, visit the official documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON at https://www.samson-connect.net.
