When a molecular project contains several render presets, it can be easy to lose track of which preset you mean. A name may be familiar, but names alone do not tell you whether a preset is selected or whether its selection flag is set. SAMSON’s Node Specification Language (NSL) provides a small set of attributes for identifying render preset nodes and checking those states.
This is useful when you want to make your selection criteria explicit: instead of relying only on a preset’s position in a list or remembering its current state, you can describe what you are looking for. The render preset attribute space is renderPreset, with the short name rp. It matches render preset nodes, so an expression beginning with rp signals that the query concerns presets rather than molecular nodes generally.
Start with the preset’s name
The inherited name attribute identifies a preset by its name. Its short form is n. For example, the documentation shows rp.n "A" and rp.n "L*". Quotation marks are part of the expression: they enclose the name string being specified. This can make a name-based criterion easier to read and recognize later.
If you are building or reviewing a query, a practical first check is to ask whether the name is the right identifier for the task. A descriptive name can help you and your collaborators understand why a preset was targeted. If names are ambiguous, the state attributes below provide another way to distinguish presets. The examples establish that names are strings; consult the NSL examples for broader expression syntax rather than assuming additional matching behavior from the name examples alone.
Keep two selection states distinct
Render presets inherit both selected and selectionFlag from the general node attribute space. They are both Boolean attributes, but they are separate attributes, so it is important not to treat them as interchangeable.
rp.selectedchecks the selected state;not rp.selectedexpresses the opposite condition.rp.sfchecksselectionFlag;rp.sf falseexplicitly specifies its false value.
That distinction can prevent a common source of confusion: a query about whether a node is selected is not automatically a query about its selection flag. When checking a result, read the attribute name in the expression carefully. Use selected when that is the state you intend to test, and selectionFlag when the flag itself is relevant.
Know which shortcuts are available
The short name for name is n, and the short name for selectionFlag is sf. The selected attribute has no short name in the render preset attribute space. In particular, do not substitute a presumed s shortcut for rp.selected: the reference explicitly notes that this inherited attribute is available here without that short name.
A useful way to check an expression before relying on it is to identify three things: the node type prefix (rp), the attribute you mean to test, and the value or Boolean condition attached to it. For instance, rp.n "A" is a name expression, rp.selected is a selected-state expression, and rp.sf false tests the selection flag against false. This simple reading habit makes short queries less cryptic, especially when revisiting them later.
These attributes are intentionally focused: they help you specify a render preset by name or inspect its selection-related state. For the complete reference and context on inherited node attributes, see the render preset NSL documentation. You can also explore the NSL overview and its examples.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at samson-connect.net.
