You can highlight the script and middle mouse drag to the shelf if this is what your after? I assume your new to Maya or learning Python?
On Tue, May 22, 2012 at 11:02 AM, kinjal gajera <techki...@gmail.com> wrote: > HI TEAM > Her what i made in Python. > > import maya.cmds as cmds > alllist=cmd.ls(type='file') > print list > for each in alllist: > attrstr=each+'FTN' > print > print cmds.getAttr(attrstr) > > The above has run successfully,i am getting the used texture list with > path maya in script editor... > Can i make a button by i can run this py command and get the list..... > > I want the above things running through button > On May 22, 2:29 pm, David Moulder <da...@thirstydevil.co.uk> wrote: > > If I understand you correctly your struggling with python for loop and > all > > the buttons using the last value ("i" in this case) in the loop? > > > > I was asked about this the other day and forgot about partial and > callback > > objects. PyMel has solved this for you. > > > > Anyway. This is the correct way to deal with this scenario using PyMel, > > The same can be achieved with cmds and the partial methods. > > > > def func(*args): > > print args > > > > with pCore.window(menuBar=True,menuBarVisible=True) as win: > > with pCore.columnLayout( rowSpacing=5 ): > > with pCore.frameLayout(): > > with pCore.columnLayout(): > > for i in range(10): > > button = pCore.button("test%s" % i, > > c=pCore.CallbackWithArgs(func, i)) > > win.show() > > > > > > > > On Tue, May 22, 2012 at 9:53 AM, kinjal gajera <techki...@gmail.com> > wrote: > > > Hi Team > > > > > I have gone through the cmds detail which mike has posted...i am > > > little away to make button executable in python. > > > > > I am unable to make a button executable programme in Py. > > > Can you please make one smiler example of execute button in PY. > > > > > See i have MEL script for FILE TEXTURE MANAGER,it has the things which > > > i want make in PY. > > > My requirement in Py is One we press the button "Analise scene file > > > texture" used texture list getting generates in UI. > > > > > Please help me to find the above detail,hopes that you are getting > > > what i need in PY > > > > > I will get back to you with my Py detail. > > > Kinjal Gajera > > > RCVFX > > > techki...@gmail.com > > > > > -- > > > view archives:http://groups.google.com/group/python_inside_maya > > > change your subscription settings: > > >http://groups.google.com/group/python_inside_maya/subscribe > > > > -- > > David Moulderhttp://www.google.com/profiles/squish3d > > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe > -- David Moulder http://www.google.com/profiles/squish3d -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe