When working on molecular modeling with SAMSON, handling light nodes can be central for tasks like visualization and simulation accuracy. But how do you efficiently manage and query these light nodes? Enter the light attribute space in SAMSON’s Node Specification Language (NSL).
The light attribute space (short name: li) helps you define attributes exclusively related to light nodes. Here, we’ll explain how you can leverage these attributes to simplify your workflows.
The Common Pain
In molecular modeling, identifying, filtering, or customizing specific nodes like light nodes in complex systems can quickly become overwhelming. For example:
- How do you list or hide lights that are selected?
- How do you ensure a particular light remains properly visible?
Using NSL’s light attributes, you can easily resolve these concerns.
A Closer Look at Light Node Attributes
Here is a breakdown of the key attributes under the light attribute space:
| Attribute Name | Short Name | Possible Values | Examples |
|---|---|---|---|
| hidden | h |
true, false |
li.h, not li.h |
| name | n |
Strings in quotes | li.n "A", li.n "L*" |
| selected | N/A | true, false |
li.selected, not li.selected |
| selectionFlag | sf |
true, false |
li.sf false, li.sf |
| visibilityFlag | vf |
true, false |
li.vf false, li.vf |
| visible | v |
true, false |
li.v, not li.v |
Practical Examples
Here are some quick use cases:
- Check if a light node is not visible: Use
not li.vto select hidden light nodes for further processing. - Filter lights by name: Want to select lights that start with ‘L’? Use
li.n "L*". - Ensure visibility: Use
li.vf trueto set the visibility flag for all light nodes.
Streamlining Your Workflows
By integrating these light attributes into your NSL queries, you gain unparalleled control over light nodes in SAMSON. This is particularly helpful when working on complex molecular scenes, as it allows you to keep track of key elements and customize your designs more effectively.
For a full reference to all light-related attributes, visit the official documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at www.samson-connect.net.
