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 2015 11:23 PM Fredrik Averpil <[email protected]>
wrote:

> 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 that's right. I just opened up a scene here, which has the
> "requires" for xfrog and spits this out in the script editor when opening
> the scene:
>
> requires "xfrog" "1.0";
> ​
>
> I performed your suggested command:
>
> pluginInfo -q -pu;
> ​
>  ...and it gave me:
>
> // Result: vrayformaya 3.05.04 //
> ​
> I'm 100% sure there are no xfrog nodes in my scene. Also, if I remove the
> "requires" statement from an .ma I get zero errors or warnings during scene
> opening or rendering.
>
> You are probably completely right that he "requires" is created when a
> scene is saved with plugin dependencies, but it is never removed if the
> plugin's nodes are removed.
>
> // Fredrik
>
>
>
> On Fri, Mar 13, 2015 at 11:18 AM owen burgess <[email protected]>
> wrote:
>
>> 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.
>>
>  --
> 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%3DwhWMgnAOBNEiu2k8Rp%2BU8yeighADe4htAZiZsHDY5Eyu-Pg%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWMgnAOBNEiu2k8Rp%2BU8yeighADe4htAZiZsHDY5Eyu-Pg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> 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/CAPGFgA0%2BesAQPPDj9P6Z2c6z_m%2B1rcoCgvosM6x-dOUnATdR8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to