Eric,
here is how you can handle the looping lambda issue
set one of your lamdas (eg. y in this case to equal the argument)
import maya.cmds as cmds
class lambdaLoop():
def __init__(self, values = ['a', 'b', 'c']):
self.window = 'lambdaLoop_win'
self.vals = values
def Window(self):
if cmds.window(self.window, ex = True):
cmds.deleteUI(self.window)
self.window = cmds.window(self.window, w = 200, h = len(self.vals *
20))
layout = cmds.columnLayout(p = self.window, adj = True)
for i in xrange(0, len(self.vals)):
cmds.button(p = layout, l = self.vals[i], c = (lambda x, y ==
i:self.command(arg = y)))
cmds.showWindow(self.window)
def command(self, arg):
print self.vals[arg]
-Damon
--
http://groups.google.com/group/python_inside_maya