SoNodeFilter

InventorModule
genre InventorMain
author Christian Schumann
package FMEstable/ReleaseMeVis
dll SoFilter
definition SoFilter.def
see also SoActionFilter
keywords search, filter, node

Purpose

This node filters the input scene graph and adds all found nodes to its self field.

Usage

Connect a scene graph to the sceneGraph field and define the search parameters.

Details

There is no direct connection between sceneGraph and self. Search actions are applied to sceneGraph. They return paths to the defined nodes. These nodes are then directly added to self.

Tips

The tab title of the results tab contains the number of found nodes in brackets.

Automatic updates:

The search is automatically updated on parameter field changes. Setting Update On Scene Graph Change to TRUE also leads to automatic updates on any changes to the scene graph. Use this only during prototyping, since updating on field changes in the scene graph could effectively half the framerate, for example if a node updates output fields during interaction!

If you need an automatic update only when nodes are added or removed from the scene graph, then you should use the module InventorSceneChangeObserver instead and connect InventorSceneChangeObserver.nodeChanged to Update.

You may set Update After Wake Up to TRUE and use a meaningful value for Delay in order to update once after loading a network. This makes sense in example networks, for example.

In an application you should update your SoNodeFilters in a controlled manner using scripting instead!

Windows

Default Panel

../../../Projects/SoFilter/Modules/mhelp/Images/Screenshots/SoNodeFilter._default.png

Input Fields

sceneGraph

name: sceneGraph, type: SoNode

The scene graph to which the searches are applied.

Output Fields

self

name: self, type: SoNode

A group containing all found nodes.

Parameter Fields

Visible Fields

Search Criterion

name: searchCriterion, type: Enum, default: Name

Defines which criterion used to search for nodes

Values:

Title Name Description
Type Type The entries in Search Filter are interpreted as node types
Name Name The entries in Search Filter are interpreted as node names
Name Path NamePath The entries in Search Filter are interpreted as name paths. Every entry may contain multiple node names separated by “.”. The nodes identified by these names are used as way points or “breadcrumps” to find the node, where the last name is the name of the searched node itself. Hence, the search is carried out in an iterative manner.

Name Path Separator

name: namePathSeparator, type: Enum, default: Point

Separator used to split the name paths in Search Filter into names.

Values:

Title Name Description
Point Point Names in name paths in Search Filter are separated by points.
Low Dash LowDash Names in name paths in Search Filter are separated by low dashs.

Export Path Separator

name: exportPathSeparator, type: Enum, default: Point

Separator used in name paths in Exported Paths.

Values:

Title Name Description
Point Point Names in exported paths are separated by points.
Low Dash LowDash Names in exported paths are separated by low dashs.

Include Derived Types

name: searchDerived, type: Bool, default: TRUE

If true, derived classes are also searched

Include Hidden

name: searchAll, type: Bool, default: FALSE

Specifies whether normal graph traversal should be done (FALSE), or if every single node should be searched (TRUE). If TRUE, even nodes considered hidden are searched.

Add Tail Identifier Childs

name: addTailIdentifierChilds, type: Bool, default: FALSE

If true, found SoIndentifiers are not added directly. Instead their childs are added

Add Tail Group Childs

name: addTailGroupChilds, type: Bool, default: FALSE

If true, found SoGroups are not added directly. Instead their childs are added

Add Tail Separator Childs

name: addTailSeparatorChilds, type: Bool, default: FALSE

If true, found SoSeparators are not added directly. Instead their childs are added

Search In Node Kits

name: searchInNodeKits, type: Bool, default: FALSE

Specifies whether search in node kits is enabled. Note: Only children of node kit parts can be found. Parts like topSeparator and so on can not be searched!

Search Filter Separator

name: searchFilterSeparator, type: Enum, default: Comma

Separator used to split the Search Filter into items

Values:

Title Name Description
Comma Comma Items in Search Filter are separated by commas.
New Line NewLine Items in Search Filter are separated by line breaks.

Search Filter

name: searchFilter, type: String

List of entries, where every entry represents a name, type or name path. Note: name paths are lists of names separated by points

Search Interest

name: searchInterest, type: Enum, default: First

If multiple paths are found for one search filter entry, this defines which paths to add.

Values:

Title Name Description
First First Only the first is added
Last Last Only the last is added
All All All are added
Unique Unique Only unique findings are added

Search Identifiers Only

name: searchIdentifiersOnly, type: Bool, default: TRUE

If true, only SoIdentifiers are take into account for the search criteria name and namePath

Sort Paths

name: sort, type: Bool, default: TRUE

If true, the found paths are sorted according to how early they are run into when traversing the scene graph. If false, the nodes are added according to the order defined in Search Filter

Uniquify Paths

name: uniquify, type: Bool, default: TRUE

If true, identical paths and paths that go through the tail of another path are removed. Only possible if paths have been sorted.

Number of Found paths

name: numberOfFoundPaths, type: Integer, persistent: no

Number of found paths

Export Paths

name: exportPaths, type: Enum, default: Identifiers

Specify if and how paths are exported to a string

Values:

Title Name Description
None None No string is generated
Identifiers Identifiers A list of paths is written to Exported Paths. Each path only contains names of SoIdentifiers.
Full Full A list of full paths is written to Exported Paths. Contains all names along the path.
Full With Types FullWithTypes A list of full paths is written to Exported Paths. In Addition to the names along the path, the node types are added in brackets. Note: this can’t be used as input for other SoNodeFilters.

Exported Paths

name: exportedPaths, type: String, persistent: no

String containing the found paths

Export Tails Only

name: exportTailsOnly, type: Bool, default: FALSE

If true, only the tails of the paths (i.e. the found nodes) are exported.

Update

name: update, type: Trigger

Update the search

Update On Scene Graph Change

name: updateOnSceneGraphChange, type: Bool, default: FALSE

If true, the search is updated on changes of the input scene graph. This includes changes to nodes as well as changes to fields!

Clear

name: clear, type: Trigger

Clear the search results.

Update After Wake Up

name: updateAfterWakeUp, type: Bool, default: FALSE

If true, the search is carried out once automatically after the module’s wake up in a delayed fashion.

Delay

name: updateAfterWakeUpDelay, type: Float, default: 0.1

Delay between the module’s wake up and the automatic update.

Hidden Fields

searchSuccessful

name: searchSuccessful, type: Bool, default: FALSE