I know that the book referenced in this thread: http://groups.google.com/group/python_inside_maya/browse_thread/thread/4c3e14cc8279ad9b
has at least one chapter (that I know of) that deals with PyMel. I'm sure there's more than the one, but I only know about the one. On Oct 20, 5:27 am, "Mike Malinowski (LIONHEAD)" <[email protected]> wrote: > Providing your question is 'how do I start to learn pymel' ..... > > Getting to grips with the documentation is the key. When I first started with > it I would usually do a search for the mel command, the search results will > then show you that command, but more importantly it will show you the > nodetype it returns. This is where PyMel really shines, because the return is > a class, you can call methods from it directly. > > For instance, doing a search for skinCluster will show the top result being > the command you need to create a skinCluster, but the second result would > probably be nodeTypes.SkinCluster, and this is the SkinCluster class that is > returned from the skinCluster command. Clicking that in the doc's will then > show all the methods you can call directly from the SkinCluster you have > created. It is this which makes Pymel extremely clean to write. > > [cid:[email protected]] > > The second thing to note is that the classes are hierarchical, and thus > inherit methods that their parent classes contain. Continuing with the > SkinCluster example, you can see what that inherits from, and clicking an > item in that inheritance view will show you what methods that gives access to. > > [cid:[email protected]] > > Finally, as an example .... > > import pymel.core as pm > ## Create a locator > locator = pm.spaceLocator() > > ## Print the type of object it returns, > ## in this case we can see it returns a > ## 'transform' class. Do a search for that > ## in the pymel docs! nodetypes.Transform > print locator.nodeType() > > ## As we know it's a Transform class, we can > ## start calling methods from it > position = locator.getTranslation(space='world') > print "Locator Position : %s" % position > > ## If you look in the PyMel docs, you can > ## see that the Transform class inherits from > ## various other classes, one of which is the > ## DependNode class, which gives us access > ## to other more general methods, such as... > print locator.name() > print locator.nodeType() > > ## Through this class we can manipulate the > ## object as well... > locator.rename("NewName") > > I hope that helps a little, if indeed that was the question you were asking, > if not then maybe it'll be helpful to someone else! > > Mike. > > From: [email protected] > [mailto:[email protected]] On Behalf Of Justin Israel > Sent: 20 October 2011 00:24 > To: [email protected] > Subject: Re: [Maya-Python] where to start pymel for a beginner? > > Are you asking where you can actually USE pymel inside Maya? Or are you > asking where you can begin to LEARN pymel? > If you are Maya 2011+, you can open script editor and do: > > import pymel.core as pm > > Sub maya 2011 you have to install pymel manually. > > On Wed, Oct 19, 2011 at 3:13 PM, Reza Shahsavary > <[email protected]<mailto:[email protected]>> wrote: > Hi guys. > I wanna to start Pymel but I do not know how. > where can I start pymel? > thx > -- > view archives:http://groups.google.com/group/python_inside_maya > change your subscription > settings:http://groups.google.com/group/python_inside_maya/subscribe > > -- > view archives:http://groups.google.com/group/python_inside_maya > change your subscription > settings:http://groups.google.com/group/python_inside_maya/subscribe > > image002.jpg > 16KViewDownload > > image005.jpg > 61KViewDownload -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
