When a molecular scene contains several cameras, it can be easy to lose track of which one a query refers to. A name-based search may be more practical than inspecting nodes one by one—but only if the query is written for the right kind of node and the attributes are not confused.
SAMSON’s Node Specification Language (NSL) provides a compact way to describe nodes by their attributes. For camera-specific queries, use the camera attribute space, abbreviated ca. This space matches only camera nodes, which helps keep a camera search separate from similarly named nodes of other types.
Start with the camera’s name
The name attribute is inherited from the general node attribute space. In the camera space, its short name is n, and values are written as strings in quotes. For example:
ca.n "A"describes a camera whose name isA.ca.n "L*"is another documented name expression.
Using the camera prefix matters: ca.n says both which attribute to test and which type of node to match. If your goal is to locate a camera by its label, begin with this expression pattern and substitute the name you are looking for. Keeping the name in quotes also makes the intended string value clear.
Keep the two Boolean attributes distinct
Camera nodes also inherit two Boolean attributes: selected and selectionFlag. Both can be expressed with true or false, but they are separate attributes in the reference. Do not assume that one is simply another spelling of the other.
To query the selected attribute, the camera-space examples are ca.selected and not ca.selected. This attribute is inherited from node.selected, but the camera reference specifically notes that it does not use the short name s. When writing a camera query, use the full form rather than carrying over a short form you may have seen in another context.
For selectionFlag, the short name is sf. The documented forms include ca.sf false and ca.sf. This is also inherited from the node attribute space. The names and examples are useful when a query needs to distinguish the two attributes: write the one you intend to test explicitly, instead of treating “selected” and “selection flag” as interchangeable labels.
A small checklist for a less frustrating search
- Confirm the node type. Use the
caprefix when the target is a camera. - Choose the attribute that answers your question. Use
ca.nfor a name,ca.selectedfor the selected attribute, orca.sffor the selection flag. - Use the documented value format. Put names in quotes; use
trueorfalsefor Boolean values. - Check the spelling before broadening the query. In particular, remember that
selectedhas no camera-space short name, whileselectionFlagcan be written assf.
These conventions make camera expressions easier to read later, too. A query such as ca.n "A" communicates its target and attribute at a glance, while explicitly naming the Boolean attribute reduces ambiguity when revisiting a scene or sharing a query with a collaborator.
For the complete attribute table and reference details, see the SAMSON camera attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
