rig 清理


import maya.cmds as cmds
unknown_plugins = cmds.unknownPlugin(q=True, list=True) or []
for up in unknown_plugins:
    try:
        cmds.unknownPlugin(up, remove=True) 
    except:
        print up

import pymel.core as pm
ref_nodes = pm.ls(references=True)
for ref_node in ref_nodes:
    try :
        ref_path = pm.referenceQuery(ref_node, filename=True)
    except :
        ref_node.unlock()
        pm.delete(ref_node, ref_node.listConnections())
        
plugins = pm.pluginInfo(query=1, listPlugins=1)

for i in plugins:
    pm.pluginInfo(i, edit=1, writeRequires=False)


评论
  目录