SetFilter¶
A filter which uses sets to define which locations are matched.
user¶
Container for user-defined plugs. Nodes should never make their own plugs here, so users are free to do as they wish.
enabled¶
The on/off state of the filter. When it is off, the filter does not match any locations.
out¶
The result of the filter. This should be connected into the “filter” plug of a FilteredSceneProcessor.
setExpression¶
A set expression that computes a set that defines the locations to be matched.
For example, the expression mySpheresSet | myCubesSet
will create a set that contains all objects in
mySpheresSet
and myCubesSet
.
Gaffer supports the union operator (|
) as shown in the
example and also provides intersection (&
) and difference (-
)
operations for set expressions. Names of locations
can be used to represent a set that contains only
that one location.
In addition, the in
and containing
operators can be
used to query descendant and ancestor matches. For example,
materialA in assetB
will select all locations in the materialA
set that are at or below locations in the assetB
set. This
allows leaf matches to be made against sets that only contain
root or parent locations. allAssets containing glass
will
selection locations in allAssets
that have children in the
glass
set.
For more examples please consult the Scripting Reference section in Gaffer’s documentation.
The context menu of the set expression text field provides entries that help construct set expressions.