Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to remove nodes from missing plugins?

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
2864 Views, 4 Replies

How to remove nodes from missing plugins?

Hi,

 

These kind of nodes generate errors:

RuntimeError: file <maya console> line 1: Plug-in, "XXXX", was not found on MAYA_PLUG_IN_PATH.

 

... and we would like to get rid of them, even if this may break something. How can such nodes get identified and removed (preferably via Python)?

 

 

 

Regards,

Fredrik

 

4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

I would also like to know the answer to this question.

 

Obviously, I could use a python script to strip out the missing plugin line from outside of maya.

 

Is there a way to do it from within Maya?  Since it wasn't in the MAYA_PLUG_IN_PATH, it is obviously not loaded in the Plug-in Manager.
But the "requires" line is still in the .ma file.

 

Here is an example.  This "requires" line is the only SpeedTree plugin reference in my maya file:

requires "SpeedTree FBX Importers.py" "Unknown";

 

I want to get rid of the line since my file does not require the SpeedTree plugin.

 

Sincerely,

 

Fran Z

Message 3 of 5
Anonymous
in reply to: Anonymous

I would suggest you look at the type of nodes you're tryng to "Capture" and delete them...

Python

cmds.delete(cmds.ls(et="unknownDag"))

(Be carefull and maybe run the cmds.ls(et="unknownDag") first to see what your dragnet captures, and to make sure you don't get any innocent nodes or none at all...

 

Mel Equivilant:

$list = `ls -et "unknownDag"`;

delete $list

 

I would substitute unknownDag with unknown as a node type, or run :

nodeType `ls -sl`

when you have the node type selected that you need to get rid of... if you can't find the offending node, go into the outliner and turn off DagNodes Only

 

The key to this is to identify what you're searching for to surgically get rid of only that. Unkown nodes are generally useless, unless you're transferring scenes back and forth between computers that have / don't have plugins to interpret the data.

 

-AM

Message 4 of 5
Anonymous
in reply to: Anonymous

AM,

 

Those are great suggestions.   In fact, I started by looking for unknown nodes and DAGS, but I didn't find any.

 

It turns out that the "requires" plugin line was also in some of my referenced files.  In order to not propogate the plugin line, I need to first remove that line from the referenced file, and then remove it from the file I am interested in.  When I ran my cleanup python script on the referenced file (which had no other references), the plugin "requires" line was removed and stayed that way.  Then when I ran the cleanup script on the file that had the references, the plugin line was also removed and stayed that way.

 

My solution was to notify the artist to run the plugin removal script on the referenced files first, and then run it on the file they originally started with.

 

Alternatively, copying the plugin from its original location to the MAYA_PLUG_IN_PATH also got rid of the original "RuntimeError" error message.  It leaves the "requires" plugin line in the file, but then the artist doesn't care because they don't see an error.  This solution is fine for in-house files as long as the plugin doesn't take up a lot of memory.  For files that are going out-of-house, a TD may want to go with the first solution above.

 

Fran Z

 

Message 5 of 5
Anonymous
in reply to: Anonymous

Hi, i am having the same problem.. May I ask where you find the plugin removal script?

 

 

Thanks and Cheers,

 

Rosalie

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report