示例#1
0
 def show_error(title, text):
     msg = QtWidgets.QMessageBox()
     msg.setParent(self.parent, self.parent_flags)
     msg.setIcon(QtWidgets.QMessageBox.Critical)
     msg.setText(text)
     msg.setWindowTitle(title)
     msg.show()
示例#2
0
def import_material():
    global material_library
    if not material_library:
        try:
            material_library = MaterialLibrary()
        except MaterialLibrary.InitError as e:
            msg = QtWidgets.QMessageBox(hou.qt.mainWindow())
            msg.setIcon(QtWidgets.QMessageBox.Critical)
            msg.setText(e.msg)
            msg.setWindowTitle("Material Library initialization failed")
            msg.show()
            return

    window = MaterialLibraryWindow()
    window.show()