View Full Version : Maya API development tutorial
02-04-2004, 09:22 PM
I've had trouble finding some API tutorials on the web, so I figured I'd add my own.
It's only the first part so far (how to set up Visual Studio) and I just wanted to see what you people thought of it....
I'm planning to cover development of various plugins such as commands, nodes, deformers, etc and possibly cover some other items as I learn them..
In the meantime I'd appreciate some feedback and comments. I wrote the first part in one go tonite, so if there any vague parts or anything else, let me know.
go to www.jhavna.net/code.htm and follow the links...
I give you much applauds and kudos! To bad there's no exchange rate to US $. A friend of mine is writing a plugin with .NET, and the steps are basically the same. Just watch out when they try to remove stuff you already typed in... (sometimes it'll reset to defaults, etc)
Hi there Jhavna,
It's nice and all, but don't forget the online library (F1 in Maya/Win). At least in Maya 4 the API it is quite well explained under "Maya Developer's Toolkit" / "Maya API Developer's Manual". It covers a lot of what you
I think that it covers most of the basic stuff. What I have been scouring the 'net for (and failed) are more advanced items.
02-06-2004, 08:02 AM
Thanks JDJ. Yeah.. I know.. but the aim was to go from basics through to the rest... And hopefully I can elaborate on the online documentation a little more soon. I may skip ahead a bit and get stuck in on writing various tools etc...
well, we'll see how it goes..
I see that my multi-tasking abilities are not so great :)
The sencence should be completed with "... have there."
Anyway - as I said the doc's covers simple plugs, but they fall short of advanced concepts. One thing for instance that I came across when writing a node with some built in dynamics is how to store information from one frame to the next in a Maya friendly way. In the end I did it with class variables, but that is a hack and is explicitly frowned upon in the documentation.
Other things that is very poorly explained is how to correctly set up array attributes. The basics are OK but the when you set IndexMatter to false, I have still not figured out how to make it work with connectAttr -nextAvailable. The best I've recieved so far is "you can not use that attribute with nextAvailable".
You know perhaps? There seems to be precious few (submitting at least) API programmers on this forum.
02-06-2004, 09:15 AM
Yeah, VERY few API developers. But unfortunately I have only been dealing with the API for a few weeks. I am still getting to know Maya (which I got about a month ago).
I'm still in the early learning stages of the API's inner workings. I'm trying to come up with ideas for plugins to write in order to get some practice in.
I've read Gould's book, but only read it... I'm going to start on implementing plugins soon....
Us API developers should stick together ;)
you may have already done this, but there is a good mailing list at highend. I'm on that, and you often get some good questions and answers through. It's full of relly good API folks... So join up if you haven't already...
02-06-2004, 10:11 AM
Originally posted by jdj
how to store information from one frame to the next in a Maya friendly way. In the end I did it with class variables, but that is a hack and is explicitly frowned upon in the documentation.
Isn't it possible to use a non-networked plug? They are created if you try to create a plug to a non existing attribute.
As far as I understand it, they are used to store state information in nodes. ...
Yes, you can do that.
I have done so with some of the information as well - stored them in attributes marked as internal for some "cache" values.
What I wondered was how for instance the frameCache node can create frame caches in memory and randomly access a value from this - Knowing what I know now I could perhaps have created an internal array attribute with one connection / frame, but that seems a bit brute forceish to me. Einstein said that he beleieved in a world of marble (E=mc2, i.e. beautiful) as opposed to a world of wood (quantum physics, i.e. nasty). And I like 'marble' solutions. :)
...hmmm or perhaps I should do the array thing? I am due to rewrite some of that code anyway. Take away the banned stuff and replace with Maya approved structures would be a worthy cause.
...or perhaps it is possible to create a new cache data type somehow... it would need to know which time to retrive though...
Ah well - the world is full of possibilities! :D
01-17-2006, 08:00 AM
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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.