PDA

View Full Version : C++ and the Maya API


MikeRhone
03-26-2005, 03:23 AM
Hi all,

I would like to get an idea from people as to where the best starting point would be to get into learning some API scripting. I am getting quite comfortable with MEL. It wasnt long before I started realizing the limits of Maya's scripting language. So now here I stand.

My background in programing is limited. I took PASCAL in highschool nearly 10 years ago, and other than that Im self taught. I really need to start from the ground up in API. To all of you that have moved into the API, how would you reccomend I start? Im good at learning on my own, but is that possible with C++/API? And do I start by learning C++ or do I just right into maya's API?

Thanks in advance for any advice you have...!

MunCHeR
03-26-2005, 04:05 AM
Mike, In my own endevours I bought david goulds book "Complete Maya Programming" and although I have only started it seems excellent and was recommended to my by a few friends.

http://www.amazon.com/exec/obidos/tg/detail/-/1558608354/qid=1111813336/sr=1-1/ref=sr_1_1/104-6519824-3539961?v=glance&s=books

Hope this helps some:thumbsup:

MunCH

ashishdantu
03-26-2005, 06:35 AM
Hi MikeRhone,

quick links i got :

http://www.robthebloke.org/index.html

http://hohehohe2.hp.infoseek.co.jp/openMaya-eng/0mokuji.html

mrtrashtalk
03-29-2005, 01:46 PM
Hi,

I would definitely recommend to start with learning C++ first. Get yourself a Beginners Book, and learn the basics. It should save you a lot of time and frustration, when you work with the API later on.

Hirni_NG
03-30-2005, 01:42 PM
Hi,

I would definitely recommend to start with learning C++ first. Get yourself a beginners book and learn the basics. It should save you a lot of time and frustration, when you work with the API later on.

Yes this is very true, start with a beginners book to get the basics, I used Practical C++ Programming (Steve Oualline). A very good beginners book especially if you aleady have a little experience. The next step is to get deeper into C++, I use Stroustrups The C++ Programming Language, Special Edition (http://www.amazon.de/exec/obidos/ASIN/0201700735/qid=1112193364/sr=8-2/ref=sr_8_xs_ap_i2_xgl/028-2317532-9672563) book a lot. Another tip is Thinking in C++, you can get it for free at http://www.bruceeckel.com/ .

Be aware that the Maya API uses RTTI (realtime type information), so things are a little different than "normal" C++ programs. For example, you usually do not use pointers in the Maya API, most things are done with handle references.

MikeRhone
03-30-2005, 07:55 PM
Thanks for the info guys. This all seems REALLY complicated to me at this point, but Im going to just try and dive right in. I also noticed there is a thread in the general forums about the same topic.

Hmm... I wonder if they do any C++ books on tape... ;)

m

Iconoklast
03-30-2005, 09:09 PM
not that I know, but www.vtc.com has c++ video tutorials. Although the guys voice is kind of annoying :(

MunCHeR
03-30-2005, 10:46 PM
Mike, 3dbuzz has some video training on C++ i dont think you can download it unless you are a member sponsor though:scream:

forum:

http://www.3dbuzz.com/vbforum/forumdisplay.php?f=219

videos:

http://www.3dbuzz.com/vbforum/sv_dl_list.php?c=17

Cheers

MunCH

edit:this might be of interest too

http://www.3dbuzz.com/xcart/customer/product.php?productid=19 (http://www.3dbuzz.com/xcart/customer/product.php?productid=19)

djx
04-03-2005, 12:46 PM
Like Mike, I am trying to learn to work with the API and make plugins. Thanks for the info so far.

Do I need the "visual studio .net 2003" package that is described in the maya docs or would I be able to use a different C++ compiler (like one of the open source ones)?

Hirni_NG
04-03-2005, 05:47 PM
Like Mike, I am trying to learn to work with the API and make plugins. Thanks for the info so far.

Do I need the "visual studio .net 2003" package that is described in the maya docs or would I be able to use a different C++ compiler (like one of the open source ones)?

You can get the command line compiler from microsoft for free, but you will have to set up everything manually and you will spend a lot of time solving set up problems instead of learning the Maya API. I wouldn t recommend using a open source compiler for Maya under WIN32, only leads to more probems. So the best start would be using VC with the Maya wizard and the example plugins. I do not know of any Maya developer not using VC.

edit: An easy way to do it without Visual Studio:

http://www.cgtalk.com/showthread.php?t=227419 (http://showthread.php?t=227419)

sparaig
04-04-2005, 02:28 AM
You can get the command line compiler from microsoft for free, but you will have to set up everything manually and you will spend a lot of time solving set up problems instead of learning the Maya API. I wouldn t recommend using a open source compiler for Maya under WIN32, only leads to more probems. So the best start would be using VC with the Maya wizard and the example plugins. I do not know of any Maya developer not using VC.

Well, I prefer using XCode on the Mac. ;-)

Seriously, XCode runs circles around VC, but its Mac-only.

djx
04-04-2005, 03:16 AM
sparaig, Im stuck with windows, but thanks for the tip.

Hirni_NG, it sounds like I need to get VC. There seem to be different packages. Would I just need the entry level, or do I need to get something more advanced?

Dialector
04-04-2005, 03:50 AM
it sounds like I need to get VC. There seem to be different packages. Would I just need the entry level, or do I need to get something more advanced?

It seems like the users of the entry level package are not too happy with it. Check out the reviews:

http://www.amazon.com/exec/obidos/tg/detail/-/B000089GKV/qid=1112585523/sr=8-1/ref=pd_csp_1/002-6094987-3782454?v=glance&s=pc&n=507846

Per-Anders
04-04-2005, 04:08 AM
i use the entry level version of VC++ and am fine with it. maybe older versions were buggy, but 2003 is fine in my experience (though lacking the better optimisation routines of the studio version i guess).

anyhow, keep up the useful resources you guys are posting, it's all interesting stuff.:thumbsup:

djx
04-04-2005, 12:29 PM
Dialector, thanks for that link. Im going to start with the free VCtoolkit download and see where that takes me.

Hirni_NG
04-04-2005, 02:18 PM
sparaig, Im stuck with windows, but thanks for the tip.

Hirni_NG, it sounds like I need to get VC. There seem to be different packages. Would I just need the entry level, or do I need to get something more advanced?

If you are only doing Maya API development it shouln t matter. Maya API does not use MFC, .net etc. Basically you just need the compiler and an IDE. A big plus at the beginning using VC is that you have everything set up as .vcproj in the example plugins, so you can derive your own plugins very fast from those examples.

Of course, only using the free microsoft compiler works, but you will need to set up a Makefile etc. to get a plugin compiled, so you need to know the deeper structures of compiling.

According to RobtheBloke, there is a Beta of VC 2005 which works as well:
http://www.highend3d.com/boards/showflat.php?Cat=1,2&Board=MayaAPI&Number=201431&page=0&view=collapsed&sb=5&o=0&fpart=

Hirni_NG
04-04-2005, 05:43 PM
Of course, only using the free microsoft compiler works, but you will need to set up a Makefile etc. to get a plugin compiled, so you need to know the deeper structures of compiling.



Forget that, it seems to be easier than I thought, have a look at :

http://www.cgtalk.com/showthread.php?t=227419

djx
04-05-2005, 01:55 PM
Hirni_NG, thanks for that. Its exactly what I needed to get me started. Cheers.

CGTalk Moderation
04-05-2005, 01:55 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.