I'm trying to figure out how the scriptTable works, and I'm a little confused with the output. Why is it that when you delete the first row, the table no longer has the correct items in it? The last row seems to disappear? Is there a good resource online that describes the proper function calls?
import maya.cmds as cmds
def edit_cell(row, column, value):
return 1
window = cmds.window(widthHeight=(400, 300))
form = cmds.formLayout()
table = cmds.scriptTable(rows=2, columns=3, label=[(1,"Column 1")], width=420, height=400, cellChangedCmd=edit_cell, excludingHeaders=True)
cmds.scriptTable(table, cellIndex=(1,1), edit=True, cellValue="1")
cmds.scriptTable(table, cellIndex=(2,1), edit=True, cellValue="2")
cmds.scriptTable(table, edit=True, deleteRow=1)
cmds.showWindow( window )
This code should show a line with '2' in it, but the table is blank in all columns?