When a molecular scene contains several render presets, the frustrating part is often not choosing a representation—it is finding the preset node you meant to inspect. A small Node Specification Language (NSL) query can make that search more deliberate, especially when you need to distinguish presets by name or by their selection state.
SAMSON’s render-preset attribute space is written renderPreset, with the short name rp. This attribute space matches only render preset nodes, so it provides a useful starting point when you want your expression to focus on presets rather than other kinds of nodes.
Start with the preset name
The inherited name attribute has the short form n. Its values are written as quoted strings. For example:
|
1 2 |
rp.n "A" |
The documentation also gives rp.n "L*" as an example. Because the name value is quoted, keep the quotation marks when writing a name expression. If you are unsure which name to use, first identify the exact preset name in your scene, then use that value in the expression.
Check selection state explicitly
Render presets inherit the node attribute selected, but this attribute does not have the short name s in the render-preset attribute space. Write the full attribute name instead:
|
1 2 3 |
rp.selected not rp.selected |
The first expression tests for a selected render preset; the second uses not to test the opposite state. This distinction is useful when you are checking whether the preset you expect to work with is currently selected, or when you want to inspect presets that are not selected.
Use the selection flag when that is what you need
selectionFlag is another inherited node attribute. Unlike selected, it has the short form sf. The documented examples show both ways to test it:
|
1 2 3 |
rp.sf false rp.sf |
These attributes are separate names in the language, so do not substitute one for the other just because both relate to selection. When troubleshooting a query, check that you have used the attribute you actually intend to inspect—and that you have not accidentally typed s for selected in this attribute space.
A quick query checklist
- Begin with
rpto specify render preset nodes. - Use
rp.n "…"to write a name value in quotes. - Use
rp.selectedornot rp.selectedto express the selected state. - Use
rp.sforrp.sf falsefor the selection flag. - Remember that
selectedhas no short name here, whileselectionFlagusessf.
These small distinctions make preset queries easier to read and reduce avoidable syntax errors. For the complete attribute reference and related NSL examples, see the render preset documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
