Services provided by this plug-in are
currently in use.
[...]The following services are in use:
Any ideas?
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8063f9e1-7657-4f1c-b8ee-61a6c830e618%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
cmds.pluginInfo('Mayatomr', query=True, loaded=True)
On Mon, Jun 30, 2014 at 8:58 AM, Sylvain Delhomme <s...@mikrosimage.eu> wrote:
Hi,
I'm trying to 'properly' unload the mental ray plugin from Maya using the following code:
# reset renderer
cmds.setAttr('defaultRenderGlobals.currentRenderer', 'mayaSoftware', type='string')
cmds.renderer('mentalRay', unregisterRenderer=True, edit=True)
cmds.flushUndo()
# all mental ray node type
nodeTypes = cmds.pluginInfo('Mayatomr', query=True, dependNode=True)
nodes = cmds.ls(type=nodeTypes); # print nodes
cmds.delete(nodes)
cmds.flushUndo()
However, the following command always return False:
cmds.pluginInfo('Mayatomr', query=True, unloadOk=True)
If I try to manually unload the plugin, an error message is displayed but the services in use list is empty:
Services provided by this plug-in are
currently in use.
[...]The following services are in use:
Any ideas?
--
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 python_inside_maya+unsub...@googlegroups.com.
--
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 python_inside_m...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/50c62a94-8c3f-4b15-ba94-a0043a1e49b8%40googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
You're not too far off with regards to MR being a bit more deeply hooked than expected, I'm not across all the details but if you have a look at the release notes for 2010 and 2011 (i didnt have later release notesmhere but i'll bet it's still the case going forwards..) you'll find this:
"Unable to unload an MPxNode plug-in if MPxData is specified
If a MPxNode plug-in creates an MPxData in its initialize() method, you will receive a warning that the plug-in is in use when trying to unload it even if you have not created a node. This is because the proxy MPxData type is in use."
A bit more over at
http://around-the-corner.typepad.com/adn/2013/01/never-ever-use-unloadplugin-force.html
but it kinda boils down to - once your scene touches a plugin Maya will have hooked into it to the point where you can't safely unhook it. Joy! 😀