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
'requires' line for this plugin when you save/export your scene.

You can predict which plugins are 'in-use' in the current scene, and
will be written to file, by using the MEL command:

//
pluginInfo -q -pu;
//

If you don't want Maya to write a 'requires' line for this plugin (eg
Mayatomr) then you'll first have to identify which nodes are of the
type registered by the plugin, and delete them from the scene

Taking Mayatomr as the example, you'll need to first query the node
types registered by the plugin:

//
pluginInfo -q -dn Mayatomr;
//

Then find and delete each node of these types.

Once you're done, Maya will not write a 'requires' line for this plugin.

Note: you don't have to unload the plugin - so long as there are no
nodes in the scene with a dependency on a plugin, ie the plugin isn't
returned by the pluginInfo -q -pu command, it won't be written to file

And that's almost it.

Let's say that you receive a scene file from a third party which
'requires' a plugin that isn't in your MAYA_PLUG_IN_PATH, Maya will
register the plugin in its internal plugin database and save this
information out again when you save your scene file. In short, Maya
preserves info for plugins that cannot be loaded on file>open.

So it can be confusing when you open a scene file again and Maya is
still trying to load plugins that you don't have.

Unfortunately,  there is currently no mechanism for identifying these
'unknown' plugins, or removing them.

Regards,
Owen



On 13 March 2015 at 10:40, Fredrik Averpil <[email protected]> wrote:
> 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
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWPmFom%2BgkmU0%3DVu1vMn3c-JmiksLT2EYvTM8W6Lk%2BabWA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAGTPGODK%2B5RHF%3Dk9ApnGB8V%3DT%2BgCAm_Re-Dt-RdTnxXhpqOzWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to