When a molecular scene contains many kinds of nodes, a broad search can return more than you intended. If you are trying to identify render presets specifically, the useful first step is to scope the query to the render-preset attribute space. In SAMSON’s Node Specification Language (NSL), that space is renderPreset, with the short name rp. It matches only render preset nodes.
That scope helps keep a query focused: rather than relying on a name alone, begin with an attribute in the rp space. The reference lists three available attributes for render presets: name, selected, and selectionFlag. The first is useful for name-based searches; the other two let you express boolean conditions.
Search by a preset name
To refer to a preset’s name, use rp.n followed by a quoted string. The documented examples are rp.n "A" and rp.n "L*". Quoting makes the value’s boundary clear, especially when it contains punctuation such as the asterisk shown in the second example. If you are adapting an expression, preserve that quoted-string form.
A practical way to troubleshoot a name query is to simplify it: first check the attribute-space prefix, then check that the name value is quoted, and finally compare the expression with the name you intend to find. The examples establish the supported expression forms shown here; consult the NSL reference if you need to determine how a particular value or pattern is interpreted.
Use boolean attributes carefully
The selected attribute accepts true or false. The reference shows rp.selected as a positive test and not rp.selected as its negated form. One detail that can prevent a frustrating syntax mistake: although selected is inherited from the general node attributes, it does not have the short name s in the render-preset attribute space. Use the full form, rp.selected.
selectionFlag is another inherited boolean attribute, and its short name is sf. The documented forms are rp.sf and rp.sf false. These are distinct attributes in the reference, so don’t substitute one for the other just because both relate to selection. When a query does not behave as expected, verify which attribute you meant to test and use the corresponding spelling.
A small checklist for a more reliable query
- Limit the target: use the
rpprefix when you mean render preset nodes. - Quote names: write name values as strings, as in
rp.n "A". - Check the attribute name: use
rp.selected, not the node-level short names. - Keep the boolean fields separate:
selectedandselectionFlagare different attributes. - Start with a documented expression: test a simple form before making a query more elaborate.
This focused approach is useful when the immediate problem is not changing how a preset renders, but locating the relevant preset nodes reliably. The attribute reference describes what can be queried; it does not, by itself, specify every possible search behavior or explain the broader meaning of each selection-related field.
For the complete attribute list and examples, see the render preset NSL reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
