No, we just leave it there. Mental ray lingers in basically all our scenes
because it doesn't seem to be any good way of cleaning it out once and for
all.

Regards,
Fredrik



On Wed, Jul 2, 2014 at 11:26 AM, Sylvain Delhomme <[email protected]>
wrote:

> Thanks Fredrik
>
> So did you decide to force unload mental ray? I'm concerned about scene
> corruption or even Maya crash.
>
> Le mercredi 2 juillet 2014 10:02:47 UTC+2, Fredrik Averpil a écrit :
>>
>> I've been trying to do the same thing but I never succeeded. I made the
>> assumption mental ray is too deeply integrated in AE templates throughout
>> the scene and so it cannot be unloaded. Not sure if that's the case though.
>>
>> Regards,
>> Fredrik
>>
>>
>>
>> On Mon, Jun 30, 2014 at 5:58 PM, Sylvain Delhomme <[email protected]>
>> 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 [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/python_inside_maya/8063f9e1-7657-4f1c-b8ee-
>>> 61a6c830e618%40googlegroups.com
>>> <https://groups.google.com/d/msgid/python_inside_maya/8063f9e1-7657-4f1c-b8ee-61a6c830e618%40googlegroups.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/50c62a94-8c3f-4b15-ba94-a0043a1e49b8%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/50c62a94-8c3f-4b15-ba94-a0043a1e49b8%40googlegroups.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/CAD%3DwhWP%3D4KSJoLn4fsxHF8jVbYc%2BG2Hn1hth1A4FJfJ_KaaeLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to