When a molecular scene contains several camera nodes, it helps to be able to describe the one you want rather than rely on memory or a long scroll through a structure. SAMSON’s Node Specification Language (NSL) provides a small set of camera-specific expressions for identifying camera nodes by name and checking their selection state.
The key detail is the attribute-space prefix: ca stands for camera. A query that begins with ca matches camera nodes, so camera attributes can be read as a focused vocabulary for working with those nodes—not as general attributes for every object in the molecular scene.
Start with the name
Camera nodes inherit the name attribute from the general node attribute space. In camera queries, its short form is n. The documentation gives these examples:
ca.n "A"ca.n "L*"
The first is a useful pattern when you know the camera’s name. The second shows that a name expression can also include an asterisk. If you are building a query from a camera’s label, keep the name in quotation marks, as in the examples. This makes the intended value clear and avoids confusing the name with an attribute or keyword.
A practical habit is to settle on recognizable camera names as you work, then use the name attribute when you need to refer to a particular camera node. The NSL reference establishes the syntax; it does not prescribe a naming convention, so choose names that make sense for your own project.
Check selection state explicitly
Camera nodes also inherit selected and selectionFlag from the node attribute space. These are separate attributes, and the camera reference lists both as boolean values: true or false.
For the selected attribute, the documented forms are ca.selected and not ca.selected. These let you express the two sides of a selection-state check: a camera that is selected, or one that is not selected. One small syntax difference is worth remembering: although the inherited node attribute has the short name s, the camera attribute reference specifies selected without that short name. Use the full form ca.selected for camera queries.
For selectionFlag, the short name is sf. The reference shows ca.sf and ca.sf false. The first is the concise form; the second explicitly supplies a boolean value. If you are reading or writing a query and need to recognize what the abbreviated term means, sf expands to selectionFlag.
A compact reference for camera queries
- Camera scope:
ca - Name:
ca.n "A"orca.n "L*" - Selected:
ca.selectedornot ca.selected - Selection flag:
ca.sforca.sf false
The main benefit of keeping these distinctions straight is clarity. The prefix identifies the node type, the attribute identifies what you are checking, and the value—when supplied—states what to match. When a camera query does not behave as expected, checking those three parts in order is a simple way to catch a typo or an incorrect assumption about which attribute you meant.
For the complete camera attribute reference and related NSL resources, see the camera attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
