(cmds.getAttr(nodeItem+"."+masterGrpAttr, type=True) = "bool" or \Ĭmds.getAttr(nodeItem+"."+masterGrpAttr, type=True) = "long") and \Ĭmds.getAttr(nodeItem+"."+masterGrpAttr) = 1: If cmds.objExists(nodeItem+"."+masterGrpAttr) and \ # add selected items in the empyt target scroll listĬmds.textScrollList(self.targetScrollList, edit=True, append=selMeshList) # check if there is any selected object in order to continueĬurrentList = cmds.textScrollList(self.targetScrollList, query=True, allItems=True)Ĭmds.textScrollList(self.targetScrollList, edit=True, removeAll=True)Ĭmds.textScrollList(self.targetScrollList, edit=True, append=currentList) """ Add selected items to target textscroll list SortedJointList = utils.filterName(jointName, jointList, " ")Ĭmds.textScrollList( self.allUIs, edit=True, removeAll=True)Ĭmds.textScrollList( self.allUIs, edit=True, append=sortedJointList) JointName = cmds.textField(self.allUIs, query=True, text=True) If cmds.objExists(jointNode+'.'+BASE_NAME+'joint'): JntSelectedRadioButton = cmds.radioCollection(self.allUIs, query=True, select=True)ĬhooseJnt = cmds.radioButton(jntSelectedRadioButton, query=True, annotation=True)ĪllJointList = cmds.ls(selection=False, type="joint")Ĭmds.checkBox(self.allUIs, edit=True, enable=False)Ĭmds.checkBox(self.allUIs, edit=True, enable=True)ĭisplayJnt = cmds.checkBox(self.allUIs, query=True, value=True)ĭisplayJis = cmds.checkBox(self.allUIs, query=True, value=True) # get current jointType (all or just dpAutoRig joints): """ This function is responsable to list all joints or only dpAR joints in the interface in order to use in skinning. # working about action to do, like new control, add shape or replace shapes:
![maya python ls maya python ls](https://i.ytimg.com/vi/4NXbUzQc9gY/maxresdefault.jpg)
tControlDirection(self.cvCurve, self.cvDirection)
![maya python ls maya python ls](https://download.autodesk.com/us/maya/2008help/General/images/General-066-3-2.jpg)
# set control direction for the control curve: Self.cvCurve = self.createCurve(self.cvName, self.cvDegree, self.cvPointList, self.cvKnotList, self.cvPeriodic, dpGuide) # getting curve info to be created based on choose degree: Self.cvCurve = self.generateCombineCurves(useUI, self.cvID, self.cvName, self.cvSize, self.cvDegree, self.cvDirection) # combine or create curve using the parameters: Self.cvName = utils.validateName(cvName, self.suffix) # check if the given name is good or add a sequencial number on it: Return the transform curve or a list of selected destination items.ĭestinationList = cmds.ls(selection=True, type="transform") """ Check if we need to get parameters from UI. So if you know Maya and maybe some MEL but you’ve been meaning to start learning Python and keep putting it off, or if you already know some Python but have been wanting to brush up on some details, or if you know Python fairly well but are not quite sure how it relates to Maya, then I highly recommend investing in this handy resource.Def cvCreate(self, useUI, cvID, cvName='Control_Ctrl', cvSize=1.0, cvDegree=1, cvDirection='+Y', cvRot=(0, 0, 0), cvAction=1, dpGuide=False, combine=False, *args): Maya Python for Games and Film by Ryan Trowbridge and Adam Mechtley I just wish I’d had it 2-3 years ago :( But better late than never :) So as a refresher I went through the first few chapters of his book and it is indeed incredibly useful. I’ve had some much needed down time lately and I’ve been meaning to beef up on my Python skills for a while now anyway.
![maya python ls maya python ls](http://shining-lucy.com/wiki/lib/exe/fetch.php?media=graphic:python:maya:research_skincluster_component_editor_weight_table.png)
I finally got around to checking it out over the last few weeks. He was telling me about a book that he had written that was all about Python in Maya. Back last spring at GDC I met Ryan Trowbridge who has been a character TD at Naughty Dog for a number of years.
![maya python ls maya python ls](https://pic1.zhimg.com/v2-3a1a676143fd76359652293fb08f6f08_r.jpg)
Eventually I got to the point where I could finally write a complete script from beginning to end while leaning on the various resources I’d pooled together.Īfter trudging my way through this slow learning process, I was very happy to learn that someone has finally written a Maya specific Python book. I was also able to cobble together some decent example scripts as well as a useful blog post here and there, but that took time.
#MAYA PYTHON LS MANUALS#
I of course bought a couple of general Python reference manuals and learning books, but these were not at all specific to Maya, not to mention the Maya API, PyMEL, QT, etc. One of the biggest obstacles for me when taking the plunge was finding good learning resources. Luckily, I did finally overcome my laziness (although I'm still fighting the old part) and I now feel pretty comfortable with Python. I'll admit that I'm kind of old and lazy and you know what they say about teaching an old (and lazy) dog new tricks. I had been using MEL for roughly a decade, so any time I had to write script it was often just easier (and much faster) to fall back on what I knew. It was actually a slow and somewhat painful process. I began to make the switch from MEL to Python a couple of years ago.