Reputation: 113
How can i load a maya plugin in a maya standalone application. I tried to load it using
MGlobal::executeCommand("`loadPlugin \"C:/XXXXX/XXXX.mll\" `");
but each time i get
(kFailure) : unexpected internal failure
How can i do it properly ?
thanks,
Upvotes: 2
Views: 1400
Reputation: 829
The string that you're passing to MGlobal::executeCommand has backquotes around the command. That MGlobal::executeCommand call is running your loadPlugin command and then trying to run the return value of your loadPlugin command as another command.
It may be the case that your plugin loaded successfully, and the MStatus::kFailure that you see is the result of trying to run your loadPlugin command's return value.
Try removing the backquotes to see if that fixes the problem:
MGlobal::executeCommand("loadPlugin \"C:/XXXXX/XXXX.mll\"");
Upvotes: 0
Reputation: 12218
Have you already called
import maya.standalone
maya.standalone.initialize()
? If not you don't actually have running maya instance to work in.
You can also load the plugin with maya.cmds
import maya.cmds as cmds
cmds.loadPlugin("pluginname.mll")
Upvotes: 1