When a molecular scene contains many kinds of nodes, a search that is too broad can make it hard to focus on the item you actually want to inspect. Render presets have their own Node Specification Language (NSL) attribute space, which gives you a way to write queries specifically for render preset nodes.
The attribute space is renderPreset, and its short name is rp. That distinction is useful: starting a query with rp makes its scope explicit, so you can describe render presets rather than relying on a general node query. The render preset attribute space matches only render preset nodes.
Start with a name
If you know a preset’s name, use the inherited name attribute. Its short name is n, and values are written in quotation marks:
|
1 |
rp.n "A" |
The reference also gives rp.n "L*" as an example. This is a useful pattern to keep in mind when you are expressing a name-based query. If a name query does not identify what you expect, first check that you have included the rp scope and that the value is quoted as a string.
Check selection state deliberately
Render presets also inherit the boolean attribute selected. It can be queried directly or negated:
|
1 2 |
rp.selected not rp.selected |
In this attribute space, selected does not have the short name s. Writing the full attribute name avoids assuming that a shorthand from another context is available here.
A separate inherited boolean attribute is selectionFlag, abbreviated sf. The documented forms include:
|
1 2 |
rp.sf rp.sf false |
Although both attributes are boolean, keep their names distinct in your query. Use selected when your expression is about the node’s selected state, and selectionFlag when you specifically want to query that attribute. The reference lists them separately; it does not describe them as interchangeable.
A small query checklist
- Scope: Begin with
rpwhen the target is a render preset. - Names: Use
rp.nfollowed by a quoted string. - Booleans: Use
rp.selectedorrp.sf, and addnotorfalsewhere appropriate. - Shorthand: Remember that
nandsfare documented short names, whileselectedhas no short name in this attribute space.
These checks help make expressions easier to read and reduce ambiguity when you are constructing a query. The key is to be precise about both the node type you are targeting and the particular attribute you want to test.
For the complete attribute reference and its examples, see the render preset NSL documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
