When a molecular scene becomes busy, it can be surprisingly easy to lose track of its cameras. If you need to identify camera nodes without confusing them with atoms or other parts of the model, SAMSON’s Node Specification Language (NSL) provides a small, focused set of camera attributes.
The key is the camera attribute space, abbreviated ca. It matches only camera nodes. That makes ca a useful starting point when your search is specifically about cameras rather than the molecular structure itself.
Start with a camera’s name
Camera nodes inherit the name attribute from nodes. You can refer to it using the short name n, so a name-based expression looks like this:
ca.n "A"
The documentation also gives ca.n "L*" as an example. The important practical detail is that names are written in quotes, while ca keeps the search scoped to camera nodes. If you are checking a scene with several cameras, using their names can make your query easier to read and help you focus on the camera you intend to inspect.
Check selection state explicitly
Camera nodes also inherit the selected attribute. The camera-specific spelling is ca.selected; unlike some inherited node attributes, selected has no short name in this attribute space. You can express either side of the selection check:
ca.selectedmatches the selected state.not ca.selectedexpresses the opposite condition.
This is useful when the question is not “Which camera is named A?” but “Which camera nodes are selected?” or “Which camera nodes are not selected?” Writing the condition out also makes an expression easier for a colleague to interpret later.
Know the difference between the two flags
The camera reference lists another inherited boolean attribute: selectionFlag, with the short name sf. Its documented examples are ca.sf false and ca.sf. The page lists selected and selectionFlag as separate attributes, so keep their names distinct when writing a query. If you need to match a particular state of the selection flag, the explicit form ca.sf false makes the requested value visible in the expression.
A quick way to choose an expression
Before writing a camera search, identify what you actually need to narrow down:
- For a camera name, use
ca.nfollowed by a quoted string. - For selection state, use
ca.selectedornot ca.selected. - For the selection flag, use
ca.sf, optionally followed bytrueorfalse.
These attributes are deliberately focused: the page documents how to identify camera nodes by inherited node properties, not how to change camera position, projection, or viewing behavior. Keeping that scope in mind helps prevent a common source of confusion—treating a camera search as though it were a camera-control command.
For the full attribute reference and additional NSL context, see the SAMSON camera attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
