pymel.core.system.findType

findType(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
deep (d) bool ../../../_images/create.gif
 
Find all nodes of the given type instead of just the first.
exact (e) bool ../../../_images/create.gif
 
Match node types exactly instead of any in a node hierarchy.
type (t) unicode ../../../_images/create.gif
 

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

import maya.cmds as cmds

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'  

Previous topic

pymel.core.system.fileDialog2

Next topic

pymel.core.system.flushUndo

Core

Core Modules

Other Modules

This Page