Evgeniy Zaitsev Technical Artist

17Nov/15Off

Traversing whole scene file Maya Python API

Quick example

 
import maya.OpenMaya as OpenMaya

m_iterator = OpenMaya.MItDag( OpenMaya.MItDag.kDepthFirst )
while not m_iterator.isDone():
	m_obj   = m_iterator.currentItem()
	m_objFn = OpenMaya.MFnDagNode( m_obj )
	#if ( OpenMaya.MFn.kMesh == m_obj.apiType() ):
	print( m_objFn.fullPathName() )
	m_iterator.next()  

Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.