[PYTHON] Remove: Unknown Plugins?

This article is the 16th day article of Maya Advent Calendar 2019.

It is sudden...

Are you doing Remove: Unknown Plugins properly?

There was a reason I thought ...

High contamination rate of unknown plugins

There is a very high probability that an unknown plug-in is mixed in the scene data that comes around to me at work ...

Problems when unknown plug-ins are mixed

  1. It takes time to open the scene --Plug-in information is the part that is loaded first when you open the scene.
    Here, when I try to load a plug-in that does not exist in the Maya environment, an error message is displayed.
    The more plugins that cause this error, the longer it will take to open the scene.
  2. Unknown plugin information will be infected. -** Secret unknown-plugin ** to be added --If you import past model data into a new scene, the information of unknown plug-ins will be inherited. -** unknown-plugin ** inherited by reference -If the reference source data contains an unknown plug-in, even if the unknown plug-in is removed in the referenced scene, the unknown plug-in information will be restored when the scene is reopened. I will end up. --If you are infected at the time of the model asset, you will get an error message when opening the scene in all steps of rig / layout / animation / light comp / etc ... --For example, if the delay due to an unknown plug-in takes 5 seconds on average, 1 episode (temporary 300 cuts) x (layout / animation / lighting / distributed rendering (temporary 10 units)) = 5.4 hours wasted It is a calculation that is generating time.

How to remove unknown plugins

Maya standard features cannot remove unknown plug-ins

There are optimization options that will remove unwanted data in your scene, but you can only remove ʻUnknown Nodes`, not unknown plugins.

You need to write a script to remove the unknown plugin

Use the unknownPlugin command.

Getting an unknown plugin
cmds.unknownPlugin(q=True, l=True)
Removal of unknown plugins
cmds.unknownPlugin("<Unknown-Plugin>", r=True)

Use a tool developed by someone to remove unknown plugins

――I tried to find it but couldn't find it ――If you are a major CG company, I think that people who are strong in technical fields have a function to remove plug-ins in check tools, but I can not find it for free ...

--If you can't find it, let's make it yourself

Creating a tool to remove unknown plugins

That's why I'm currently working on a tool. I wish I had made it in time for the article, but I was busier than I expected and the tool was not in time. We will do our best to publish it by the last day of the Advent calendar, so please use it when it is published.

image.png

I'm assuming a tool like this ...

download

The tool has been completed and has been released.

You can download it for free on gumroad. https://gumroad.com/l/jXoRw


reference

-[Maya] require command -Remove unknown plugins in the scene -[Maya] Delete unknown plug-in from scene file


Thank you for writing the article for two days.

I think it wasn't very interesting, but I hope it will be useful for your future Maya life.

I hope you can read the blog if you like. https://rateionn.hatenablog.jp/

Tomorrow's 17th day will be takumi_akashiro's Practical external application operations on running Maya.

Recommended Posts

Remove: Unknown Plugins?
Remove unknown plugins in the scene