When a molecular scene has several render presets, it can be hard to identify the one you mean—especially when you want to narrow a search by name or check whether a preset is selected. The render-preset attributes in SAMSON’s Node Specification Language (NSL) offer a compact way to describe those criteria in a query.
This guide focuses on three attributes documented for render preset nodes: name, selected, and selectionFlag. The practical benefit is not a new rendering effect; it is being able to state which preset nodes you are looking for, using a consistent syntax.
Start in the render-preset attribute space
The attribute space is called renderPreset, and its short name is rp. It matches only render preset nodes. That scope is useful when your query is about presets specifically: the prefix makes clear that the attributes following it are being applied in the render-preset context.
For example, the documented form rp.n "A" uses the short name n for name. The page also gives rp.n "L*" as an example. These examples show how a name criterion is written; consult the NSL reference for the precise matching behavior you need rather than assuming how a particular pattern is interpreted.
Use the full name when clarity matters
Short names can make expressions compact, but compact syntax is not always the easiest syntax to revisit later. The full attribute name can be useful when sharing a query with a teammate or returning to it after some time. For instance, the documentation shows the boolean attribute written as rp.selected. Its negated form is not rp.selected.
One detail worth remembering: selected is inherited from the general node attribute space, but it does not use the node attribute’s short name s in the render-preset space. In other words, for this attribute, use rp.selected, not a guessed abbreviation. This small distinction can save time when adapting a query you already use for other node types.
Know what selectionFlag means in the syntax
The third documented attribute is selectionFlag, with the short name sf. Its examples are rp.sf false and rp.sf. The first explicitly supplies a boolean value; the second is the concise form shown for the attribute. The page identifies this attribute as inherited from node.selectionFlag.
It is helpful to keep selected and selectionFlag distinct when reading or writing expressions: they are separate attribute names in the reference, even though both relate to selection. If a query does not behave as you expect, check that you used the intended attribute and that any explicit boolean value is written as true or false.
A small checklist for readable queries
- Use the
rpprefix when targeting render preset nodes. - Use
rp.norrp.namefor the name attribute, with a string in quotes. - Write
rp.selectedfor the selected attribute; do not substitute the inherited short names. - Use
rp.sforrp.selectionFlagfor the selectionFlag attribute, and includetrueorfalsewhen specifying a value.
These conventions help make preset queries easier to read, check, and share. For the complete attribute reference and related NSL material, see the render preset attributes page, the NSL overview, and the NSL examples.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at samson-connect.net.
