问题
I'm developing in MAYA and looking for a good API to connect my models and to be able to control them programatically.
thanks.
回答1:
hye oded, you can use MEL or python scripting for control objects and doing simple actions, and you can use the c++ or Python via maya api to create complex tasks or heavy duty tasks, like creating deformers, expanding mel with new commands.
for resources in mel scripting i recommend "gnomon Mel fundemental" video tutor
and for the api i recommend "Complete Maya Programming" book
if you could do any scripting or api programming and you know some python, you can easily program/script with python which is way easier than mel or c++
hope that will help you :D
回答2:
There are a couple of apps for mel programming, but all they do is give you syntax coloring and maybe autocomplete. Nothing more advanced exists, which is just as well, because mel is just a terrible, terrible language: It really isnt good for anything other than quick hacks in Maya's script editor. You definitively should use Python.
You can use an external IDE, like Eclipse or WingIDE to control Maya, but it's tricky http://www.wingware.com/doc/howtos/maya
Whether youll be doing Python scripting or API development, definitively have a look at PyMel, which is a vast improvment over Maya's native Pyhon implementation.
回答3:
if you are on windows you can use PyScripter, to configure it you have to show autocomplete you have to follow these steps
- Open Pyscripter for Python 2.6 if your python version in maya is 2.6.Click on Tools> Python Paths
- Browse and add following path:('D:\Program Files (x86)\Autodesk\Maya2012\devkit\other\pymel\extras\completion\py')
if you are not able to add by step 2, you can manually add by
going to Tools > Edit Startup Scripts in python_init.py add the two lines
import sys sys.path.append("D:\Program Files (x86)\Autodesk\Maya2012\devkit\other\pymel\extras\completion\py")
following above steps will give you ability to write in python and programmatically control you object inside maya.. externally from IDE... (this also give you the code autocomplete feature)
来源:https://stackoverflow.com/questions/2056606/does-maya-mel-have-a-good-api-to-a-ide