<s> from meshtool . filters . base_filters import PrintFilter <EOL> import collada <EOL> def printMeshInfo ( mesh ) : <EOL> indent = '<STR_LIT:U+0020>' <EOL> print '<STR_LIT>' % len ( mesh . cameras ) <EOL> for cam in mesh . cameras : <EOL> print indent , cam <EOL> print '<STR_LIT>' % len ( mesh . lights ) <EOL> for light in mesh . lights : <EOL> print indent , light <EOL> print '<STR_LIT>' % len ( mesh . materials ) <EOL> for material in mesh . materials : <EOL> print indent , material <EOL> print '<STR_LIT>' % len ( mesh . effects ) <EOL> for effect in mesh . effects : <EOL> print indent , effect <EOL> print '<STR_LIT>' % len ( mesh . images ) <EOL> for image in mesh . images : <EOL> print indent , image <EOL> print '<STR_LIT>' % len ( mesh . geometries ) <EOL> for geom in mesh . geometries : <EOL> print indent , geom <EOL> for srcid , src in geom . sourceById . iteritems ( ) : <EOL> if isinstance ( src , collada . source . Source ) : <EOL> print indent , indent , "<STR_LIT>" % ( srcid , src ) <EOL> for prim in geom . primitives : <EOL> print indent , indent , prim <EOL> def FilterGenerator ( ) : <EOL> class PrintInfoFilter ( PrintFilter ) : <EOL> def __init__ ( self ) : <EOL> super ( PrintInfoFilter , self ) . __init__ ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> def apply ( self , mesh ) : <EOL> printMeshInfo ( mesh ) <EOL> return mesh <EOL> return PrintInfoFilter ( ) <EOL> from meshtool . filters import factory <EOL> factory . register ( FilterGenerator ( ) . name , FilterGenerator ) </s>
