Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Reload Plugin

Reload Plugin

Anonymous
Not applicable
2,735 Views
1 Reply
Message 1 of 2

Reload Plugin

Anonymous
Not applicable

Is there a way to reload a plugin from within the plugin's GUI menu? The plugin is written in c++ and can use python or mel if that helps..

 

I have tried unloadPlugin/loadPlugin, which comes up with an error that says the plugin is being used so it can't be reloaded. If I force it, Maya crashes. Same thing with unloadPluginWithCheck which I just found in the script editor.

 

These commands work fine if I run them in the script editor, but if I run them from a menu in my plugin it doesn't work. Maybe there is a workaround?

 

Thank you!

0 Likes
Accepted solutions (1)
2,736 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

Oh, I was using a C++ function to reload, so it was saying it couldn't unload the plugin because the plugin still had to be used to unload. I changed it to a mel script and it worked fine. I guess it works because the whole script is sent to Maya. So Maya performs the functions without the plugin.

0 Likes