When a molecular scene contains many kinds of nodes, a broad search can return more than you meant to inspect. Property models have their own Node Specification Language (NSL) attribute space, which gives you a way to keep queries focused: start with pm. That prefix matches only property model nodes, helping you avoid mixing them up with other node types while you troubleshoot or organize a scene.
Once you have the right node type in view, inherited node attributes let you narrow the match by name, visibility, selection state, or material-related properties. The useful habit is to think in two steps: first identify the property-model category with pm, then specify the property you care about.
Start with the property you need
For a name-based match, use pm.n (the short form of name) followed by a quoted string. The reference gives these examples:
pm.n "A"matches by the nameA.pm.n "L*"shows a pattern-style example for names beginning withL.
Quoting matters: the documented values for name are strings in quotes. If you are trying to isolate one named property model, begin with its exact name. If you are gathering a family of similarly named items, the L* example illustrates how a broader pattern can be written.
Check visibility without losing the type filter
Visibility-related attributes can help when a property model is present in the scene but not currently shown as expected. Use pm.v to match visible property models, or not pm.v for those that are not visible. The longer attribute name is visible; its short name is v.
The page also lists hidden (short name h) and visibilityFlag (short name vf). These are separate attributes, so do not assume they are interchangeable with visible. For example, the documented forms include pm.h and pm.vf false. If you are diagnosing why something does not appear, checking the specific attribute you intend to query is clearer than treating every visibility-related term as the same thing.
Selection has one small naming detail
To match selected property models, write pm.selected; to match those that are not selected, write not pm.selected. Unlike some inherited node attributes, selected has no short name in the property-model attribute space. In particular, the node-level short name s is not available here. Using the full name avoids an easy-to-miss query mistake.
There is also selectionFlag, with the short name sf. Its examples include pm.sf false and pm.sf. Since selected and selectionFlag are listed separately, choose the one that corresponds to the state you actually want to inspect.
A practical debugging routine
- Begin with the property-model namespace: use
pmrather than a generic node attribute when your target is specifically a property model. - Add one clear condition, such as
pm.n "A",pm.v, orpm.selected. - If the result is unexpected, check whether you meant
visible,hidden, or a flag attribute, and whether you used the correct short name.
This keeps a troubleshooting query readable and makes it easier to tell which property is being tested. The property-model attribute page documents the complete set covered here, including material attributes such as hasMaterial (hm) and ownsMaterial (om).
For the full attribute reference, see the SAMSON property model attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
