In unskillful English, I'm sorry.
It's a question about pymel.
Each text of textFieldButton made by 'for'.
houhou taken out separately, please, how is it done?
import pymel.core as pm
def get_text():
print pm.textFieldButtonGrp("tx"+str(i),edit=True).getText()
#これだとどのボタン押しても最後のテキストがプリントされてしまう。
with pm.window(title = "gomigomi"):
for i in range(10):
with pm.columnLayout():
pm.textFieldButtonGrp("tx"+str(i), text="test"+str(i),
buttonLabel='<',
buttonCommand = pm.Callback(get_text))
get_text()
--
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/fad4eb5c-dfab-46dd-b868-b50859ea901e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.