Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.
findType([deep=boolean], [exact=boolean], [forward=boolean], [type=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
findType is NOT undoable, NOT queryable, and NOT editable.
The findType command is used to search through a dependency
subgraph on a certain node to find all nodes of the given type.
The search can go either upstream (input connections) or downstream (output
connections). The plug/attribute dependencies are not taken into account
when searching for matching nodes, only the connections.
string[] | The list of node(s) of the requested type connected to the given node(s) |
debug, node, type, search
affectedNet, affects, allNodeTypes, listConnections
deep, exact, forward, type
Long name (short name) |
Argument types |
Properties |
deep(d)
|
boolean
|
|
|
Find all nodes of the given type instead of just the first.
|
|
exact(e)
|
boolean
|
|
|
Match node types exactly instead of any in a node hierarchy.
|
|
forward(f)
|
boolean
|
|
|
Look forwards (downstream) through the graph rather than backwards
(upstream) for matching nodes.
|
|
type(t)
|
string
|
|
|
Type of node to look for (e.g. "transform"). This flag is mandatory.
|
|
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 have multiple arguments, passed either as a tuple or a list.
|
import maya.cmds as cmds
cmds.createNode( 'transform', name='silly' )
cmds.createNode( 'transform', name='putty' )
cmds.connectAttr( 'putty.tx', 'silly.tx' )
# Find transform nodes connected to node "silly"
#
cmds.findType( 'silly', deep=True, type='transform' )
# Result: [u'silly', u'putty'] #
# Look forward from a selected item
#
cmds.select( 'silly' )
cmds.findType( deep=True, forward=True, type='transform' )
# Result: [u'silly'] #
#
# Find all time nodes
#
cmds.setKeyframe( t=10 )
cmds.findType( type='time', deep=True, exact=True )
# Result: [u'time1'] #
#
# Find all anim curve nodes
#
cmds.findType( type="animCurve", deep=True )
# Result: [u'pairBlend1_inTranslateX1', u'silly_translateY', u'silly_translateZ', u'silly_visibility', u'silly_rotateX', u'silly_rotateY', u'silly_rotateZ', u'silly_scaleX', u'silly_scaleY', u'silly_scaleZ'] #