CadOp
11-07-2011, 03:02 AM
Hey,
I am trying to write a python script that will wait for a user input or a button click. Currently both windows appear at the same time, and the for loop finishes. I tried using a while loop with pass but that crashed. Actually, I tried 3 different iterations of loops and statements that all crashed my computer. Any Ideas?
the setup now is something like this:
window1=cmds.window(title="My Window", iconName='my win')
cmds.columnLayout(width=500, height=500)
WindowInput=cmds.intField()
cmds.button(label='My Value',command='myfunc_1')
window2=cmds.window(title="My Window2", iconName='my win2')
cmds.columnLayout(width=500, height=500)
Window2Input=cmds.intField()
cmds.button(label='My Value2',command='myfunc_2')
for i in range(len(mylen)):
cmds.showWindow(window1)
cmds.showWindow(window2)
I am trying to write a python script that will wait for a user input or a button click. Currently both windows appear at the same time, and the for loop finishes. I tried using a while loop with pass but that crashed. Actually, I tried 3 different iterations of loops and statements that all crashed my computer. Any Ideas?
the setup now is something like this:
window1=cmds.window(title="My Window", iconName='my win')
cmds.columnLayout(width=500, height=500)
WindowInput=cmds.intField()
cmds.button(label='My Value',command='myfunc_1')
window2=cmds.window(title="My Window2", iconName='my win2')
cmds.columnLayout(width=500, height=500)
Window2Input=cmds.intField()
cmds.button(label='My Value2',command='myfunc_2')
for i in range(len(mylen)):
cmds.showWindow(window1)
cmds.showWindow(window2)
