Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-15 Thread Paul Molodowitch
We've had the same issue as Fredrik - rogue plugins that "infect" other scenes. In our case, we didn't actually have any of the plugins in question installed on any of our machines - can't remember if that was a requirement for the plugin to spread infectiously. We had to immunize by creating dumm

Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-15 Thread AK Eric
So this is a *complete hack*, and just off the cuff, and presuming you tested it and it didn't mangle your scene: You could select all the top-level assemblies and do and export-selected on top of the same file. Sort of using a sledgehammer to do surgery, but if the patient lives I use th

Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread Fredrik Averpil
Edit: I can't figure out a way to do it (without saving down as .ma, edit e.g. via python from outside of Maya, open it, save as binary) ... which is a process I need to batch. But it would be much better if I could avoid this cumbersome chained process and instead can execute a command inside of M

Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread Fredrik Averpil
Hi Owen, I don't have the xfrog plugin in my paths. Also, I don't have any unknown nodes. I'm attaching a Maya binary file. When you open this up you'll see that it is empty, and it does not contain any xfrog nodes or unknown. But it says it requires xfrog 1.0 (and also a couple of other plugins)

Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread owen burgess
In my experience, when you delete every node that gets created automatically when the Mayatomr plugin initialises (eg: mentalrayGlobals, etc...) then Maya doesn't write the 'requires' line (the plugin itself can still be loaded). Start with a blank scene in Maya 2015, load the Mayatomr plugin and

Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread owen burgess
Do you have the XFrog plugin in your PLUG_IN_PATH ? If not, then it won't get loaded, its services won't be registered and it will be classed as an 'unknown' plugin. If a plugin's services are not registered, the pluginInfo command cannot identify it. So assuming that this XFrog plugin falls into

Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread Justin Israel
I don't know too much about this, but what Fredrik says rings a bell. I remember how mental ray would "infect" the file if it had ever been loaded. Even if there were no mental ray nodes, it would still seem to load the plugin again simply from being included as a requires header. On Fri, 13 Mar 2

Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread Fredrik Averpil
Hi Owen, > If there is a node in your scene which is an instance of a custom-node > type, Maya recognises a dependency on the plugin that registers the > node type (or typeID if we're speaking binary) and will add a > 'requires' line for this plugin when you save/export your scene. I don't think

Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread owen burgess
Hi Fredrik, The key here is understanding why Maya will write a 'requires' line for a plugin. If there is a node in your scene which is an instance of a custom-node type, Maya recognises a dependency on the plugin that registers the node type (or typeID if we're speaking binary) and will add a '

[Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread Fredrik Averpil
Anyone know if you can remove the "requires" statements which you can see at the top of a Maya Ascii file - but from within Maya? I'm trying to remove some of these from files which are binary, so I can't just open up the files from outside of Maya and edit the lines out... Regards, Fredrik --