When a molecular scene contains several cameras, it can be easy to lose track of which one you mean. A camera may have a useful name, or it may be relevant because of its selection state. Node Specification Language (NSL) lets you describe camera nodes using their attributes, so you can express what you are looking for instead of relying on a visual search.
Camera attributes live in the camera attribute space, abbreviated ca. This space matches only camera nodes. That scope matters: a query such as ca.n "A" is about a camera’s name, rather than the name of an arbitrary node elsewhere in the scene.
Start with a camera’s name
The name attribute is inherited from the general node attribute space. Its short name is n, and values are written as quoted strings. For example:
ca.n "A"ca.n "L*"
The first is the documented example for a camera named “A.” The second shows a name expression using L*. If you are trying to find a particular camera, begin with the name you recognize and use the documented form. Keeping camera names distinctive can also make later searches easier, especially in scenes where several views serve different purposes.
Check selection state
Camera nodes also inherit selected. It accepts true or false, and the examples show both a positive check and its negation:
ca.selectednot ca.selected
Notice that selected has no short name in the camera attribute reference. In particular, do not assume that the short name s is available for this camera attribute. Writing the full name makes the intent clear and follows the documented syntax.
Use the selection flag explicitly
A related inherited attribute is selectionFlag, abbreviated sf. Its documented examples are:
ca.sf falseca.sf
Both selected and selectionFlag are listed as Boolean attributes, but they are separate attribute names. If you need to filter by one of them, use that attribute explicitly rather than treating the two labels as interchangeable. The camera reference points to the general node attribute documentation for their inherited definitions.
A small, reliable lookup routine
When you are unsure which expression to use, work through the attributes in this order:
- Use the
caprefix to keep the search focused on camera nodes. - Try the camera name with
ca.nand a quoted string. - If selection state is relevant, choose either
ca.selectedorca.sfdeliberately. - Use
not ca.selectedwhen you want the documented negated selected-state expression.
This is a compact way to turn a vague task—“which camera am I looking for?”—into a checkable expression. It is especially useful when you are revisiting a scene and need to identify a camera by its name or by one of the documented Boolean attributes, rather than relying on memory.
For the complete camera attribute reference, see the SAMSON camera NSL documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
