When a Model Seems Missing: A Practical Guide to Visual-Model Filters

A visual model that seems to have disappeared can be frustrating to troubleshoot. Is it hidden? Is it simply not visible? Is it selected, or does it have a material? In SAMSON, Node Specification Language (NSL) gives you a way to inspect visual model nodes by these attributes. The useful first step is to treat each question separately rather than assume one attribute explains them all.

The visual-model attribute space is visualModel, shortened to vm. It matches visual model nodes. This prefix makes your intent explicit: for example, vm.v asks about the visible attribute of visual models.

Start with visibility

To find visual models whose visible attribute is true, use:

vm.v

To find those for which it is false, use:

not vm.v

The longer form is vm.visible. Both forms refer to the same attribute; the short name is convenient when writing expressions, while the full name can be easier to read later.

The page also lists hidden, with short name h. You can inspect it with vm.h or not vm.h. Keep hidden and visible as separate checks while diagnosing a model: the documentation lists them as distinct attributes, so checking one does not tell you the value of the other. If a visual model is not appearing as expected, testing both can help narrow down what you need to investigate.

Check flags without confusing them for the attributes

Visual models also inherit visibilityFlag, abbreviated to vf. Its documented examples are vm.vf and vm.vf false. This gives you a way to query the flag itself. It is a different attribute from visible, so use the name that matches the question you are asking.

The same distinction applies to selection. The selected attribute can be queried as vm.selected or not vm.selected. Visual models also have a selectionFlag, abbreviated to sf, with examples vm.sf and vm.sf false. One small detail worth remembering: selected has no short name in this attribute space. Use the full form rather than assuming the node-level short name s applies here.

Use names and materials to narrow the search

If visibility is not the issue, the inherited name attribute can help you identify a particular visual model. For example, vm.n "A" checks for the name “A,” while vm.n "L*" is another documented name expression. The short name n keeps these expressions compact.

Material-related attributes offer two more checks: hasMaterial (hm) and ownsMaterial (om). The documented examples include vm.hm, not vm.hm, and vm.om. These let you inspect whether a visual model has a material or owns one, rather than relying on appearance alone.

A simple diagnostic routine

  1. Begin with vm.v and not vm.v to check the visible attribute.

  2. Check vm.h and not vm.h separately for the hidden attribute.

  3. If flags matter to your investigation, inspect vm.vf or vm.vf false, and use vm.sf or vm.sf false for the selection flag.

  4. Narrow the result by name or material attributes when useful.

This attribute-by-attribute approach makes the query easier to interpret and helps avoid treating similar-sounding properties as interchangeable. For the complete list of visual-model attributes and examples, see the Visual model attributes documentation.

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

Comments are closed.