Effortlessly Manage Light Nodes with NSL Attributes

When working on molecular modeling, managing and visualizing light nodes efficiently can be a source of frustration. If you’ve ever struggled to effectively filter or manipulate these nodes, especially when navigating complex scenes in SAMSON, this guide will introduce you to a clear way of handling them using Node Specification Language (NSL) light attributes.

The ‘light’ attribute space (short name: li) in the Node Specification Language is specifically designed to interact with light nodes in SAMSON. You can use these attributes not only to control visibility but also to streamline workflow processes with logical expressions. Let’s break this down.

Light Attributes at a Glance

The light attribute space includes several highly practical attributes you can use to identify and manipulate your light nodes:

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 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

Why Are These Attributes Useful?

As modeling environments grow increasingly complex, filtering and controlling node visibility can significantly accelerate workflows. For instance:

  • Quick identification: Use li.n to filter nodes by name, even with wildcard characters (e.g., li.n "L*" to match nodes starting with L).
  • Focus on active elements: Target only selected nodes using the li.selected attribute in logical queries.
  • Control visibility: Attributes like li.h (hidden) or li.v (visible) can help declutter your visual workspace.

Example in Action

Suppose you want to isolate light nodes that are both visible and not hidden. You could use the following logical expression:

This will ensure your selections are relevant to what needs to remain on screen, without unnecessary visual distractions.

Inherited from Node Attributes

Some of the light-specific attributes are inherited from the node attribute space. For example, both light.hidden and light.name originate here, though they are naturally scoped to light nodes when prefixed correctly.

Full documentation exists to guide you through the complete range of uses for these attributes. Explore how they can drastically simplify light node management in your next SAMSON project.

Want to dive deeper into light attributes in SAMSON? Visit the full documentation here: https://documentation.samson-connect.net/users/latest/nsl/light/

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON and start exploring your molecular models today at https://www.samson-connect.net.

Comments are closed.