When a molecular scene contains many kinds of nodes, a query that is too broad can make it harder to focus on the object you actually need. If the task is to identify camera nodes, SAMSON’s Node Specification Language (NSL) provides a dedicated attribute space: camera, abbreviated ca. That distinction gives you a clear starting point before you inspect a camera’s name or state.
Start with the camera attribute space
Camera attributes match only camera nodes. In other words, the ca prefix expresses the kind of node you’re querying, rather than just an attribute you happen to be checking. For example, ca.n "A" refers to the camera’s name attribute, using the short name n.
The reference also shows ca.n "L*" as an example. The important practical detail is that name values are written as quoted strings. If you are unsure how a particular name expression is interpreted, start with a simple expression that reflects a known camera name and consult the NSL reference for the exact syntax.
Use the right attribute for the question
Camera nodes inherit several attributes from the general node attribute space. The camera reference lists three useful ones:
name(n): identify a camera by its name. Example:ca.n "A".selected: check whether the camera is selected. The documented examples areca.selectedandnot ca.selected. Unlike some inherited node attributes,selecteddoes not have the short namesin the camera attribute space.selectionFlag(sf): check the selection flag, with examplesca.sfandca.sf false.
It is useful to keep selected and selectionFlag distinct when reading or writing an expression. The documentation lists them as separate attributes, with separate examples; it does not define them as interchangeable. Choose the one that matches the question you mean to ask, rather than relying on the names to imply identical behavior.
A small, reliable query routine
- Confirm the object type. Begin with the
canamespace so the expression is restricted to camera nodes. - Choose one property. Use
ca.nfor a name,ca.selectedfor selection state, orca.sffor the selection flag. - Check the expression form. Put name values in quotes and use the documented Boolean forms for selection attributes.
- Keep queries easy to diagnose. When troubleshooting, test a single attribute expression at a time before building a more complex query. This makes it clearer whether the node type, property, or value needs attention.
For example, if you need to distinguish a named camera from other scene content, ca.n "A" makes both parts of the intent visible: ca specifies camera nodes, and n specifies the name attribute. If your question is about selection instead, use the selection expression directly rather than assuming the camera’s name tells you anything about its current state.
This focused approach is especially helpful when reviewing expressions later or sharing them with a teammate: the attribute prefix communicates the intended node type, and the chosen property communicates what is being checked. For the complete attribute list and syntax details, see the camera attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
