Main
|
Resume
|
Showreel
|
Blog
|
Script
|
Contact
connexion
go to footer
expand all
|
collapse all
languages
class
All
JScript|XSI
Python|XSI
JScript|WEB
Python|Maya
All
Memo
learning
DDD
php
tool
keyboard tooltips
rig
unknowNodes_remove
- tool - felixlecha
import maya.cmds as mc def unknowNodes_remove(): ''' Remove unknow and noReferenced nodes :return: none ''' # --- Get unknow node unknown_node = mc.ls( type= [ 'unknown', 'unknownDag', 'unknownTransform'] ) # --- Delete only noReferenced node delete_node= list() for node in unknown_node: if mc.objExists( node ): if not mc.referenceQuery( node, isNodeReferenced= True ): delete_node.append( node ) mc.delete( node ) print str(len(delete_node)) +' Unknow node deleted :' + ' '.join(delete_node)