Hey Kev, The official docs describe the API structure in detail, but in a nutshell...
The basic object is an opaque handle, like an identifier, that can't do much of anything other than represent itself in memory. Then you have function sets which are decoupled from the object handles and group together functions for specific types or purposes. Such as working with a handle for a mesh, or a curve. You attach an object to the function set, and then you can operate on it. Iterators do just that one specific thing. They are type specific ways to loop over something that is a container for something else. Such as the selections in a selection list, or verts, or CVs. Keep in mind that the python API (v1) is a very direct binding to its C++ counterpart. So it would be natural for the concepts in that api to seem a bit strange to a pure python programmer. On 22/09/2014 7:13 AM, <[email protected]> wrote: > Hey guys, > > I'm probably a little in over my head, but I'm starting to get familiar > with the api, and I'm really not grasping the difference between function > sets and iterators. They seem to be used in much the same way. could > someone please give me some basic examples that help describe their > differences, and how to know when you need one vs the other. > > Thanks > Kev > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/edac5634-3c96-481c-9892-03ee52767adf%40googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA214ZkCixhQTBLE1htE4EXNg0vobEQBfrOyQM_LZLAanQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
