When a molecular scene contains many kinds of objects, a broad search can return more than you intended. If your task concerns cameras, the camera attribute space offers a way to keep a Node Specification Language (NSL) query focused on camera nodes. That can make it easier to inspect camera names and selection-related attributes without mixing them up with other node types.
The camera attribute space uses the short name ca and matches only camera nodes. That is the first useful detail: begin with ca when the objects you care about are cameras. For example, ca.n "A" expresses a query using the camera name attribute, while ca.n "L*" is another documented example. The name attribute is inherited from the general node attribute space, and its short name is n.
Keep the query specific
A common source of friction in scene work is not knowing whether a query is looking at the right kind of node. Using the camera prefix makes that scope explicit. Rather than starting with a general node query and then wondering whether its results include cameras, you can express that intention directly with ca.
For a camera named A, the documented form is:
|
1 |
ca.n "A" |
The documentation also shows ca.n "L*" as an example. In both expressions, n is the short name for name, and the name value is written in quotes. If you prefer the full attribute name, the camera attribute table identifies name as the corresponding attribute.
Check selection state explicitly
Camera nodes also inherit the selected attribute. You can query it as ca.selected, or invert that condition with not ca.selected. These examples are useful when you want to distinguish camera nodes that are selected from camera nodes that are not selected.
One detail is easy to miss: although the general node attribute space has a short name for selected, the camera version does not. For camera queries, write ca.selected, not a shortened form such as ca.s. This is a small syntax distinction, but noticing it can save time when adapting a query from another node type.
Recognize the selection flag
The inherited selectionFlag attribute is available for cameras with the short name sf. The reference gives two forms: ca.sf and ca.sf false. Like selected, it accepts Boolean values: true or false. The documentation lists both attributes separately, so keep their names distinct when writing or reading a query rather than assuming they are interchangeable.
A practical way to build a camera query is to check it in layers: first use ca to limit the node type, then add a name condition such as ca.n "A", and include a selection condition only when it is relevant. This keeps the expression readable and makes it easier to spot a mismatch—especially whether you used the full name selected or the short form sf for selectionFlag.
For the complete attribute reference and more NSL examples, see the camera attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
