Programming Language........?

What are the programming languages that rigger artist should have knowledge of?

Not any real easy answer to that one. Depends on a lot of things. If you’re working in maya, probably will want to be proficient in Mel, Python, and the use of XML.

I think the more important thing would be to focus on good basic coding practices that can apply to any language. Learning the basics so you can quickly pick up and work with any code you’re given or need to write.

I’m not a straight forward rigger, but I, on a daily basis, jump between Mel, Python, XML, linux command line, windows command line, C++, etc. And I’m constantly having to pick up new languages as needed.

+1 to what Brandon said.

But if you are looking for a starting point, Python for Maya and Maxscript for Max.

Thanks Brandon and Zhi.

Could u please tell me what are the prerequisites of Python or Mel?
And, What are the basic languages that should i focus on? Is it C and C++…

Thanks Again.

If you have Maya installed you can start with Python or Mel right now. Just read some in the help files on how to use the script editor and executing scripts if your not already familiar with that.

What do you mean by “basic languages that i should focus on” ? I would say go for Python. It’s a nice way of learning OO (Object oriented) programming and very easy to understand the basics in.

+1 to Eiktyrner

But, as Seth has mentioned a whole bunch of times, it would be better to learn python outside of maya. When you start using python inside of maya you don’t really grasp the full strength and flexibility of python (Unless you’re using pymel of course). I would suggest just going to python.org and grabbing a build for your machine. Normally a really easy install. Build 2.65 should work well.

Than you can just open up a command line and run python awesomeness.

There’s a sticky Python learning resources thread in the Languages forum, with a list of great intro material for ramping up on Python.

I heard Ryan Trowbridge from Naughty Dog do a presentation over the weekend and he was pretty adamant about the superiority of Python over MEL.

can anybody recommend any good books on Python for beginners?

Edit: haha okey just saw the post above mine, thank you adam.

I think there is a thread around here somewhere that has that very thing! Can’t find it myself. But most any book you can get is helpful. Especially if you have a background in any kind of programming. Beginning Python O’Reily Books are always good. I think Seth like Core Python Programming.

There is also an open one out there that’s pretty solid.

i just learned about PyMel, is that the best of both worlds?

what about for somebody who knows a little bit of MEL, and no Python whatsoever

Mel is definitely useful. Many pipelines still have much of it constructed in mel, but it definitely has many weaknesses and drawbacks that python makes up for.
Python integrated into maya isn’t as powerful right out of the box because it’s just all the mel commands ported to python.
Pymel is maya python done right. Integrated into the package so you’re not calling mel commands with python syntax, but working with objects and methods.
You can do a ton with the out of the box python for maya but it takes a pretty solid amount of work to plan out, build, and maintain your classes and methods. Pymel cuts out the majority of that work.

[QUOTE=Bharris;6369]+1 to Eiktyrner

But, as Seth has mentioned a whole bunch of times, it would be better to learn python outside of maya. When you start using python inside of maya you don’t really grasp the full strength and flexibility of python (Unless you’re using pymel of course). I would suggest just going to python.org and grabbing a build for your machine. Normally a really easy install. Build 2.65 should work well.

Than you can just open up a command line and run python awesomeness.[/QUOTE]

+1 to Bharris :):

You have to remember that the Python Maya API was developed with the C++ API in mind, so it’s not a good route to go if you are trying to learn Python’s capabilities.

Beware that PyMEL can be a bit slow to execute sometimes though. It’s not the best choice in all situations which I learned the hard way by skipping Python and going from MEL to only using PyMEL. I had to go back and rewrite a lot of code with python commands instead of PyMEL to get performance out of the tool…

MEL is still fastest for Maya to process, then comes Python and after that PyMEL.

Hopefully future iterations of PyMEL will improve performance because the syntax and functionality is so much better then in the python commands.

The issue with cmds python is that it’s string based, just like mel. So if you do a cmds.ls() you get back a string. This means you can only do python string operations on the return and nothing more specific to the object itself. Now if you did the same thing in pymel, you get back a PyNode object with properties pertaining to the type of object it found. The big benefit is that it’s wrapping the API to and managing the MObject node itself, not just the name. For example, you want to then get the tx:

obj=cmds.ls(sl=True)[0]
cmds.gettAttr(’%s.tx’ % obj)
you’re just running commands from Mel really. Still dealing with strings

pymel:
obj=pCore.selected()[0]
obj.tx.get()
you’re asking for the values on the PyNode itself not messing with string catination. Once you get into it there’s no turning back :wink:

It also means that on . completion you get a ton of goodies. You also start to thing in an object oriented way too. But, when you’re iterating through vast amounts of nodes be aware that it’s building this Pynode for each call, which is obviously slower than just saying give me all nodes of type x.