For molecular modelers working with visualization and scene adjustments, organizing and controlling light nodes can be a daunting task. However, SAMSON’s Node Specification Language (NSL) simplifies this process with its light attribute space, offering a structured way to define and manipulate these elements.
What Are Light Attributes?
The light attribute space (short name: li) in NSL is specifically designed for light nodes in your molecular design projects. These attributes provide a powerful way to control the properties and visibility of light nodes that play a crucial role in rendering and visualization. By leveraging these attributes, modelers can adjust their scenes efficiently without manually toggling settings for individual lights.
Key Attributes and Their Functionality
The light attribute space comes with several attributes, each offering unique capabilities. Below, we break down some of the most impactful ones:
- Hidden (
h): Determines if the light node is hidden. Values aretrueorfalse. Example:li.hhides the light node, whilenot li.hmakes it visible. - Name (
n): Allows assigning or querying names to light nodes. Use strings in quotes for value. Example:li.n "A"selects light nodes named “A”, whileli.n "L*"targets nodes with names starting with “L”. - Selected: Specifies whether the node is selected. Although it has no short name, you can use it like
li.selected(for selected nodes) ornot li.selected. - SelectionFlag (
sf): Defines whether the selection flag is active. Useli.sf trueto activate it orli.sf falseto deactivate. - VisibilityFlag (
vf): Indicates whether the node’s visibility flag is set. Similar tosf, you can toggle it withli.vf trueorli.vf false. - Visible (
v): Controls whether the light node is visible in the scene. Examples: Useli.vto filter for visible lights andnot li.vfor invisible ones.
When to Use These Attributes
The light attribute space can be especially useful in scenarios where complexity increases within a scene. For example, when rendering molecular systems with multiple light sources interacting with different structural elements, querying and adjusting light attributes becomes crucial. Whether hiding/deactivating unused lights, naming nodes for better organization, or toggling selection/visibility flags, NSL empowers modelers to streamline their work.
Why This Matters
Without such tailored solutions, managing light nodes can quickly become tedious, requiring manual intervention for individual components. With NSL’s light attribute space, time-consuming operations are reduced to simple expressions, enabling you to focus on the science behind the visualization rather than administrative tasks.
For a detailed explanation of these attributes and more examples, you can visit the documentation page.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
