0
我試圖從PySide進口* 從pymel進口選擇一個對象,並顯示行編輯Pymel類型錯誤:文件<瑪雅控制檯>
*
進口pymel.core爲PM 進口maya.cmds作爲CMDS 進口maya.mel如梅爾 進口maya.OpenMaya作爲OpenMaya
def select_obj(obj):
list = pm.poly
print obj
button = QPushButton("select")
button.clicked.connect(select_obj)
button.show()
def desselect_obj(obj):
list = OpenMaya.MSelection()
print obj
button2 = QPushButton("disconnect")
button2.clicked.connect(select_obj)
button2.show()
edit = QLineEdit(nome)
QLineEdit.show(select_obj)
label.show()
app.exec_()
# Error: line 1: TypeError: file <maya console> line 25: 'PySide.QtGui.QLineEdit' called with wrong argument types:
PySide.QtGui.QLineEdit(function)
Supported signatures:
PySide.QtGui.QLineEdit(PySide.QtGui.QWidget = No`enter code here`ne)
PySide.QtGui.QLineEdit(unicode, PySide.QtGui.QWidget = None) #
# TypeError: select_obj() takes exactly 1 argument (0 given)
此代碼真的沒有任何意義,你可以發佈更正的版本? – Achayan