Finding the Meshes That Disappear in a Busy Scene

A crowded molecular scene can make a simple question surprisingly hard to answer: which mesh nodes are visible, hidden, selected, or associated with a material? Clicking through objects one by one takes attention away from the modeling task. In SAMSON, the mesh attribute space in the Node Specification Language (NSL) offers a way to query mesh nodes by these properties.

Mesh attributes use the me prefix, which identifies the mesh attribute space and matches only mesh nodes. For example, me.v queries the visible attribute, while not me.v expresses the opposite condition. These short expressions are useful when you want to inspect a particular category of mesh nodes instead of scanning the whole scene manually.

Start with visible and hidden

To look for mesh nodes whose visible attribute is true, use:

To query nodes for which that attribute is false, use:

The page also lists the hidden attribute, with the short name h. Its examples are me.h and not me.h. Because the documentation lists visible and hidden as separate attributes, query the one that matches the question you are trying to answer rather than assuming one expression is a substitute for the other.

Check selection without guessing the abbreviation

Selection-related attributes can be easy to confuse. The mesh space includes selected and selectionFlag. The examples for selected are me.selected and not me.selected. Although the inherited node attribute has a short name, the mesh reference explicitly says that selected has no short name in this space. Use the full form instead of guessing an abbreviation.

selectionFlag does have the short name sf. The documented examples are me.sf false and me.sf. Keeping the two attributes distinct helps you choose the expression that corresponds to the property you mean to inspect.

Use names and material attributes to narrow the search

If the scene contains several meshes, the inherited name attribute can help you focus on a named node. The reference gives me.n "A" and me.n "L*" as examples. Attribute values for names are strings in quotes. The second example illustrates a name expression containing an asterisk; consult the NSL examples for further guidance on name matching rather than assuming behavior beyond the documented syntax.

Material-related attributes can also help answer practical questions. me.hm checks the inherited hasMaterial attribute, and not me.hm checks its false condition. The ownsMaterial attribute uses the short name om, as in me.om. These are separate attributes, so choose between them according to whether you are asking if a mesh has a material or whether it owns one.

A small, repeatable inspection routine

  1. Begin with the mesh space: use the me prefix so the query is scoped to mesh nodes.
  2. Choose the attribute that matches your question: for example, me.v for visible, me.selected for selected, or me.hm for having a material.
  3. Use the documented negation form, such as not me.v, when you need the false condition.
  4. Use the full attribute name where a short name is not provided, especially for selected.

This approach turns scene inspection into a set of specific questions instead of a visual guessing game. The examples above use only attributes and forms listed for the mesh space; consult the broader NSL reference for additional query syntax and examples.

For the complete attribute table and inheritance details, see the SAMSON mesh attributes documentation.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.