If you’re a molecular modeler working with complex systems, you know the importance of precisely controlling and selecting nodes to streamline your workflows. Light attributes in SAMSON’s Node Specification Language (NSL) are specifically designed to give you control over light nodes in your scenes. Learning to efficiently work with these attributes can save you time and reduce errors when dealing with intricate molecular designs.
What Are Light Attributes in NSL?
In SAMSON, light nodes (such as those used for illumination) can be managed through a dedicated light attribute space. This space has the short name li and includes several attributes inherited from the general node attribute space. Let’s dive into each attribute and explore how to leverage them for your molecular modeling needs.
1. hidden
The hidden attribute allows you to specify whether a light node is hidden or not. You can toggle this by using true or false values. For example:
li.h: Selects light nodes that are hidden.not li.h: Selects nodes that are not hidden.
This can be helpful for identifying or deliberately excluding obscured nodes when refining your scene.
2. name
The name attribute filters nodes by their name. These names must be strings enclosed in quotes. For instance:
li.n "A": Selects light nodes named “A”.li.n "L*": Selects light nodes with names beginning with “L” (wildcard supported).
Use this attribute to organize and manipulate nodes based on descriptive or systematic naming conventions in your design projects.
3. selected
The selected attribute filters light nodes based on their selection status. For example:
li.selected: Finds nodes that are selected.not li.selected: Finds nodes that are not selected.
Working with the selection status simplifies operations that require isolating specific nodes in your system.
4. selectionFlag (Short Name: sf)
This attribute indicates whether light nodes have a selection flag activated. Examples:
li.sf false: Matches nodes where the flag isfalse.li.sf: Matches nodes with the flag set totrue.
Using sf helps when flags are used in your workflows to mark nodes for certain tasks.
5. visibilityFlag (Short Name: vf)
Like sf, but specific to visibility, this flag states whether nodes are marked as visible. Examples:
li.vf false: Matches nodes that are not marked as visible.li.vf: Matches nodes marked as visible.
Manipulating visibility flags is particularly useful for scenes with a mix of light nodes and other objects.
6. visible (Short Name: v)
The visible attribute identifies nodes based on their current visibility status. Examples:
li.v: Filters for nodes that are visible in the scene.not li.v: Filters for nodes that are not currently visible.
This is excellent for determining the presence or absence of specific lights without modifying the node structure.
Final Thoughts
Understanding and applying light attributes in SAMSON’s NSL can significantly enhance your control over light nodes in molecular modeling projects. Whether it’s filtering by name, toggling visibility, or determining selection status, these tools empower you to work with precision.
For detailed documentation on light attributes, visit the official page at SAMSON NSL Light Attributes.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at samson-connect.net.
