hey guys I have this little code.
*import maya.cmds as mcdef blah(value): print "I was given:", valuemc.window(w=500, h=500)mc.columnLayout()for i in range(0, 5): mc.button(l="Touch!"+str(i), c=lambda x:blah(10*i))mc.showWindow()* if you run this it will create a window with 5 buttons and they all will have unique names, but they all will pass the same value to blah function, the last value of the loop. why is that and how to fix it? what I want to see is each button returns 10* by index it was created in. Thanks Yury -- 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/9e7b0efc-3d79-4719-bbb6-243a33d9b0c6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
