Removing plugin requirement from a maya file

I’m trying to figure out if there is a way through script to remove a requirement to an obsolete plugin from a file without having to save it as ASCII and manually removing the requirement line.

This requirement isn’t associated with any unknown nodes in the scene. I can delete everything possible from the scene, save it and still get the missing plugin error when loading up the file.

Thanks!

I have this same issue but cannot find a way around it. If you do, please let me know :slight_smile:

It would be possible IF there was a callback during the processing of each line in the .ma/.mb processor, but there is not.

Even a simple pre-process callback could let you pre-scan the file (FileObjectHandle) and scrape stuff/manipulate.

More callbacks during file processing —> Asked AD for this 2 years ago. :frowning:

2nding Amorano’s comment. I’ve never found a way. Thankfully they are always in the first few lines and easy to hack out. The exception is MentalRay. That thing is plugin fungus.

We’re finding that there are certain things that act like a virus. The current offenders are:

  • elastikSolver
  • Turtle

The elastik thing hasn’t been used in years but with referencing and passing files around, the node is required in a lot of our files but hasn’t been used in forever. And Turtle, holy god, help me get rid of this thing. It creates nodes and shelves even with the plugin unloaded. I need some Maya Penicillin

[QUOTE=TheMaxx;23023]We’re finding that there are certain things that act like a virus. The current offenders are:

  • elastikSolver
  • Turtle

The elastik thing hasn’t been used in years but with referencing and passing files around, the node is required in a lot of our files but hasn’t been used in forever. And Turtle, holy god, help me get rid of this thing. It creates nodes and shelves even with the plugin unloaded. I need some Maya Penicillin[/QUOTE]

Yeah, we wrote a script that wraps Turtle usage to deal with that. Artists must use Turtle by launching the tool and when they close the UI it cleans up the Turtle nodes correctly. You can’t even do that with MentalRay because it adds extra attributes to your shader nodes

maya 2016 has a new command added: unknownPlugin
It is now only a few lines of code to remove references to dead plugins!

http://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/CommandsPython/unknownPlugin.html


        oldplugins = cmds.unknownPlugin(q=True, list=True)
        for plugin in oldplugins:
            cmds.unknownPlugin(plugin, remove=True)

edit: this command was added in Maya 2015 Service Pack 6, but it does not show up in the documentation for 2015.

2 Likes