Go to: Synopsis. Return value. Keywords. Flags. MEL examples.

Synopsis

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.

Return value

stringif creating filter or getting filter info
string[]if listing filters
booleanif applying filter

Keywords

dg, dependency, graph, alias, attribute, name

Flags

attribute, list, logicalAnd, logicalNot, logicalOr, name, node, nodeType, plug
Long name (short name) Argument types Properties
-attribute(-atr) string create
Select objects whose attribute names match the pattern.
-list(-l) create
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 create
Logical AND of two filters.
-logicalNot(-not) string create
Logical inverse of filter.
-logicalOr(-or) string string create
Logical OR of two filters.
-name(-n) string create
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 create
Select objects whose node names match the pattern.
-nodeType(-nt) string create
Select objects whose node type names match the pattern.
-plug(-p) string create
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.

MEL examples

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) )"