Remove unknown plugins in the scene

When opening a scene when an unknown plugin exists Errors have occurred while reading this scene that may result in data loss. Will come out.

It can be queried and removed by using the unknown Plugin of the command newly added in 2016, and it will not throw an error when opening the scene.

I wrote the code assuming that there are multiple unknown plugins.

DeleteUnknownPlugin.py


import maya.cmds as cmds

add=0

#Lists unknown plugins in the scene.
unPl = cmds.unknownPlugin( q=True, l=True )

try:
    for i in unPl:
        print unPl[add]+' is Remove.'

        #Removes the specified unknown plugin from the scene
        cmds.unknownPlugin( unPl[add], r=True )
        add += 1
except:
    print 'UnknowPlugin is none.'

This will remove the unknown plugin from the scene.

Recommended Posts

Remove unknown plugins in the scene
Remove: Unknown Plugins?
[Maya Python] Crush the contents of the script 3 ~ List unknown Plugins
Download the file in Python
Find the difference in Python
Remove the frame from the image
Methods available in the list