The findTypecommand is used to search upstream through a dependency subgraph on a certain node to find all nodes of the given type. These will be nodes that affect the given one.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
deep (d) | bool | ||
|
|||
exact (e) | bool | ||
|
|||
type (t) | unicode | ||
Type of node to look for (e.g. “transform”). This flag is mandatory.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
Derived from mel command maya.cmds.findType
Example:
import pymel.core as pm
pm.createNode( 'transform', name='silly' )
# Result: nt.Transform(u'silly') #
pm.createNode( 'transform', name='putty' )
# Result: nt.Transform(u'putty') #
pm.connectAttr( 'silly.tx', 'putty.tx' )
# Find transform nodes connected to node "silly"
#
pm.findType( type='transform', 'silly' )
silly
pm.select( 'silly' )
#
# Same again from selection list
#
pm.findType( type='transform' )
silly
pm.setKeyframe( t=10 )
#
# Find all time nodes
#
pm.findType( type='time', deep=True, e=True )
u'time1'
#
# Find all anim curve nodes
#
pm.findType( type="animCurve", deep=True )
u'silly_visibility', u'silly_translateX', u'silly_translateY', u'silly_translateZ', u'silly_rotateX', u'silly_rotateY', u'silly_rotateZ', u'silly_scaleX', u'silly_scaleY', u'silly_scaleZ'