MacOS中使用Sublime编译maya

版权声明:没经同意不得转载 https://blog.csdn.net/weixin_41622043/article/details/81463162

1.https://www.sublimetext.com/3   下载最新sublime的OSX版本 

2.下载maya MacOS版本

3.打开sublime并完成激活

4.在sublime里面  按下快捷键shift+command+P 输入install 选择install package

5..在sublime里面  按下快捷键shift+command+P 输入maya 选择install package

安装成功后再sublime 菜单中会显示MEL

6 打开maya,激活后,点击插件管理器

勾选自动加载

7 打开python编辑器输入

# now open a new port

import maya.cmds as cmds

cmds.commandPort(name=":7002", sourceType="python")

参考:

# if it was already open under another configuration

cmds.commandPort(name=":7002", close=True)

# now open a new port

cmds.commandPort(name=":7002", sourceType="python")

# or open some random MEL port (make sure you change it to this port in your config file)

cmds.commandPort(name=":10000", sourceType="mel")

8.打开sublime 输入代码 print ‘hello world’,然后保存文件,保存文件后右击弹出菜单 点击send to maya 

9 发送成功!输出结果!

猜你喜欢

转载自blog.csdn.net/weixin_41622043/article/details/81463162