introducing that I'm new in python, I'm tring to use the intField command to set a number of iterations for this attribute: 'aiSubdivIterations'.
The script should work like that: when I run the scripts it open a window where I can set my value and when I press enter it should automatically set the same value in the 'aiSubdivIterations' slot.
import maya.cmds as pm
def aiSetIter(iterValue):
objSelect= pm.ls(sl=1, dag=True, leaf=True)
for obj in objSelect:
pm.setAttr( obj + '.aiSubdivIterations', iterValue)
pm.window(title = 'Interations')
pm.columnLayout ('mainColumn', adjustableColumn = True)
pm.gridLayout ('nameGridLayout01', numberOfRowsColumns = (2,2), cellWidthHeight = (80,30), parent = 'mainColumn')
pm.text (label = 'number')
pm.intField (minValue=0, maxValue=10, step=1, vcc = 'aiSetIter(iterValue)')
pm.showWindow()
Could some one help to make this script working?
Thanks in advance
Flavia