When a molecular scene has several render presets, finding the one you want can become a small but distracting task. You may remember part of its name, want to check whether a preset is selected, or need to distinguish that state from its selection flag. SAMSON’s Node Specification Language (NSL) provides a compact way to express those checks.
The key is to use the renderPreset attribute space, abbreviated rp. This space matches only render preset nodes, which helps keep a search focused on presets rather than other kinds of nodes.
Start with the preset name
The inherited name attribute accepts strings in quotes. Its short name is n. For example, the documentation shows:
rp.n "A"rp.n "L*"
These examples give you a concise way to specify a preset by name. If you know the label you are looking for, begin with the name attribute rather than scanning a long list manually. The reference lists the values as quoted strings; it does not define additional matching rules here, so treat the examples as the documented syntax rather than assuming how any particular pattern is interpreted.
Check selection state separately
Render presets also expose selected, inherited from the node attribute space. Unlike the general node attribute, it has no short name in this context. The documented expressions are:
rp.selectednot rp.selected
This makes it possible to express the two sides of a simple check: presets that are selected, and presets that are not selected. Keeping the rp prefix in the expression makes clear that the query concerns render preset nodes.
Don’t confuse selected with selectionFlag
The page also lists selectionFlag, with the short name sf. It accepts true or false, and the reference gives these examples:
rp.sf falserp.sf
Although both attributes relate to selection, the documentation lists them as separate attributes. That distinction is useful when reading or writing an expression: rp.selected refers to the selected attribute, while rp.sf refers to selectionFlag. Don’t substitute one for the other based only on their names. If you are unsure which one fits your task, inspect the attribute you intend to query and use its documented form.
A practical way to use the reference
When you need to locate or check a preset, work through the attributes in a deliberate order:
- Use the
rpattribute space so the expression targets render preset nodes. - Use
rp.nwhen the preset’s name is the useful clue. - Use
rp.selectedornot rp.selectedwhen the question is about the selected state. - Use
rp.sforrp.sf falsewhen you specifically meanselectionFlag.
This simple separation can make preset-related queries easier to read later, too. A short expression is most helpful when its attribute communicates exactly what you meant—especially when two available attributes sound related.
For the full attribute table and examples, see the render preset attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
