Vray를 사용할 때 지루한 작업을 단순화하는 스크립트를 작성하고 있지만 사용자가 int 값을 입력 할 때 intFields를 사용하여 특정 작업을 시작할 때 입력 할 수 있도록해야합니다. 단추. 필요한 부분 만 코드를 단순화했습니다. 값을 어떻게 변경하든 스크립트 편집기 출력에서 항상 0입니다.intField가 변경 내용을 표시하지 않습니다.
import maya.cmds as cmds
idManagerUI = cmds.window(title='Vray ID Manager', s = False, wh = (300,500))
cmds.columnLayout(adj = True)
cmds.text (l = 'type in MultimatteID to select matching shaders \n or specify ObjectID to select matching objects \n __________________________________________ \n')
cmds.text (l = 'MultimatteID: \n')
cmds.intField("MultimatteID", editable = True)
MultimatteIdButton = cmds.button(l = 'Go!', w = 30, h = 50, c = 'multimatteChecker()')
cmds.text (l = '\n')
cmds.showWindow(idManagerUI)
MultimatteIdInput = cmds.intField("MultimatteID", q = True, v = True)
def multimatteChecker():
print MultimatteIdInput
슈퍼 :
이것은 당신이 원하는 일을해야한다. 그것은 작동합니다. 고맙습니다 :) – leabum