添加 restart_mcp.mel
This commit is contained in:
18
restart_mcp.mel
Normal file
18
restart_mcp.mel
Normal file
@@ -0,0 +1,18 @@
|
||||
// Restart Maya MCP plugin
|
||||
// First, unload the plugin (if loaded)
|
||||
if (`pluginInfo -query -loaded "d:/Dev/Tools/MayaMCP/maya_mcp_plugin.py"`)
|
||||
{
|
||||
unloadPlugin "d:/Dev/Tools/MayaMCP/maya_mcp_plugin.py";
|
||||
print "Maya MCP plugin unloaded.\n";
|
||||
}
|
||||
|
||||
// Wait for a moment
|
||||
pause -seconds 1;
|
||||
|
||||
// Load the plugin using full path
|
||||
loadPlugin "d:/Dev/Tools/MayaMCP/maya_mcp_plugin.py";
|
||||
print "Maya MCP plugin loaded.\n";
|
||||
|
||||
// Start the server (using FastAPI mode)
|
||||
python("import sys; sys.path.append('d:/Dev/Tools/MayaMCP'); import importlib; import server; importlib.reload(server); server.stop_server(); server.start_server()");
|
||||
print "Maya MCP server restarted.\n";
|
Reference in New Issue
Block a user