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 meant to inspect. Cameras have their own NSL attribute space, so you can target camera nodes explicitly and then narrow the query by name or selection state.
Start with the camera prefix
The camera attribute space uses ca. It matches only camera nodes, which makes it a useful starting point when you want a query to concern cameras rather than nodes generally. For example, the documentation shows ca.n "A" and ca.n "L*" as name expressions. The attribute name is name; its short form is n, and values are written as quoted strings.
This explicit prefix can make a query easier to read later: the intent is visible at the beginning of the expression. If you are building or reviewing a selection, keeping the camera scope in view can help distinguish it from a query written for another node type.
Keep “selected” and “selection flag” distinct
Two camera attributes relate to selection, but they are not written with the same short-name rules. selected is inherited from the node attribute space, and on cameras it has no short name s. Use ca.selected to refer to it, or not ca.selected for the opposite condition.
selectionFlag is also inherited from nodes, but it does have the short name sf. The documented examples are ca.sf and ca.sf false. In other words, do not assume that every inherited attribute accepts the same abbreviation: the camera reference specifically notes that selected does not use s, while selectionFlag uses sf.
A small query checklist
- Need to scope the query to cameras? Begin with the
caattribute space. - Need to refer to a camera by name? Use
ca.nameor its short form,ca.n, followed by a quoted string, as inca.n "A". - Need to test selection state? Write
ca.selectedornot ca.selected. Do not substituteca.s. - Need the selection flag? Use
ca.selectionFlagor the documented short formca.sf.
These distinctions are especially handy when returning to an expression after a break: the prefix tells you which node type is targeted, while the attribute spelling tells you which property is being tested. If a query does not behave as expected, check those two pieces first, then confirm that the value is written in the form shown in the reference. The examples above describe the documented attribute syntax; they do not prescribe a particular scene setup or workflow.
For the complete camera attribute reference, see Camera attributes in the SAMSON documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
