Go to: Synopsis. Return value. Keywords. Flags. MEL examples.
dgfilter [-attribute string] [-list] [-logicalAnd string string] [-logicalNot string] [-logicalOr string string] [-name string] [-node string] [-nodeType string] [-plug string]
dgfilter is NOT undoable, NOT queryable, and NOT editable.
The dgfilter command is used to define Dependency Graph filters
that select DG objects based on certain criteria. The command itself
can be used to filter objects or it can be attached to a
dbtrace object to selectively filter what output is traced.
If objects are specified then apply the filter to those objects and
return a boolean indicating whether they passed or not, otherwise
return then name of the filter. An invalid filter will pass all
objects. For multiple objects the return value is the logical
"AND" of all object's return values.
string | if creating filter or getting filter info |
string[] | if listing filters |
boolean | if applying filter |
dg, dependency, graph, alias, attribute, name
attribute, list, logicalAnd, logicalNot, logicalOr, name, node, nodeType, plug
Long name (short name) |
Argument types |
Properties |
-attribute(-atr)
|
string
|
|
|
Select objects whose attribute names match the pattern.
|
|
-list(-l)
|
|
|
|
List the available filters. If used in conjunction with the -name
flag it will show a description of what the filter is.
|
|
-logicalAnd(-and)
|
string string
|
|
|
Logical AND of two filters.
|
|
-logicalNot(-not)
|
string
|
|
|
Logical inverse of filter.
|
|
-logicalOr(-or)
|
string string
|
|
|
Logical OR of two filters.
|
|
-name(-n)
|
string
|
|
|
Use filter named FILTER (or create new filter with that name).
If no objects are specified then the name given to the filter
will be returned.
|
|
-node(-nd)
|
string
|
|
|
Select objects whose node names match the pattern.
|
|
-nodeType(-nt)
|
string
|
|
|
Select objects whose node type names match the pattern.
|
|
-plug(-p)
|
string
|
|
|
Select objects whose plug names match the pattern.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can be used more than once in a command.
|
dgfilter -atr translateX -n TX; // Define attribute filter on translateX
// Result: "TX"
dgfilter -plug node.ty -n TY; // Define plug filter on node.ty
// Result: "TY"
dgfilter -n OR -logicalOr TX TY; // Define logical 'OR' filter.
// Result: "OR"
polyCube;
// Result: pCube1 polyCube1 //
polyCube;
// Result: pCube2 polyCube2 //
dgfilter -n TX pCube1.tx; // Filter passes since attribute matches
// Result: 1
dgfilter -n OR pCube1.tx; // Filter passes since TX portion succeeds
// Result: 1
dgfilter -n OR pCube1.tz; // Filter fails ; wrong attributes
// Result: 0
dgfilter -n TY pCube2.ty; // Filter fails ; wrong node
// Result: 0
dgfilter -n TY pCube1.ty; // Filter passes
// Result: 1
dgfilter -list; // List filters available
// Result: TX TY OR
dgfilter -list -n OR; // Show filter information
// Result: "logicalOr( Plug(node.ty), Attribute(tx) )"