Пример #1
0
    def __show_ui(self):
        self.setObjectName("ConManHelpWindow")
        self.setWindowTitle("ConMan Help")
        self.resize(325, 250)
        self.setMinimumSize(325, 250)
        self.setMaximumSize(600, 425)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setPointSize(8)
        font.setFamily("Arial")
        self.setFont(font)

        self.centralwidget = QtWidgets.QWidget(self)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.centralwidget.sizePolicy().hasHeightForWidth())
        self.centralwidget.setSizePolicy(sizePolicy)
        self.centralwidget.setMinimumSize(QtCore.QSize(325, 250))
        self.centralwidget.setMaximumSize(QtCore.QSize(600, 425))
        self.centralwidget.setObjectName("centralwidget")

        self.vlayout = QtWidgets.QVBoxLayout(self.centralwidget)
        self.vlayout.setSpacing(2)
        self.vlayout.setContentsMargins(2, 2, 2, 2)
        self.vlayout.setObjectName("VLayout")

        self.textwidget = QtWidgets.QTextEdit(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        self.textwidget.setSizePolicy(sizePolicy)
        self.textwidget.setReadOnly(True)
        self.textwidget.setObjectName("TextWidget")
        self.textwidget.setHtml(self.helpText)

        self.vlayout.addWidget(self.textwidget)

        self.setCentralWidget(self.centralwidget)
Пример #2
0
    def __setup_ui(self):
        self.setObjectName("ButterHelpWindow")
        self.setWindowTitle("Butter Help")
        self.setMinimumSize(325, 250)
        self.setMaximumSize(600, 425)
        font = QtGui.QFont()
        font.setPointSize(8)
        font.setFamily("Arial")
        self.setFont(font)

        self.centralwidget = QtWidgets.QWidget(self)

        self.vlayout = QtWidgets.QVBoxLayout(self.centralwidget)
        self.vlayout.setSpacing(2)
        self.vlayout.setContentsMargins(2, 2, 2, 2)

        self.textwidget = QtWidgets.QTextEdit(self.centralwidget)
        self.textwidget.setReadOnly(True)
        self.textwidget.setHtml(self.helpText)

        self.vlayout.addWidget(self.textwidget)
        self.setCentralWidget(self.centralwidget)
Пример #3
0
    def __setup_ui(self):
        self.setWindowTitle("Constraint Manager")
        self.setObjectName("ConManWindow")
        self.resize(250, 425)
        self.setMinimumSize(250, 425)
        self.setMaximumSize(250, 425)
        font = QtGui.QFont()
        font.setPointSize(8)
        font.setFamily("Arial")
        self.setFont(font)
        self.setTabShape(QtWidgets.QTabWidget.Rounded)

        self.centralwidget = QtWidgets.QWidget(self)
        self.centralwidget.setMinimumSize(QtCore.QSize(250, 425))
        self.centralwidget.setMaximumSize(QtCore.QSize(250, 425))

        self.verticalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 250, 425))

        self.LayoutVert1 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
        self.LayoutVert1.setSpacing(2)
        self.LayoutVert1.setContentsMargins(5, -1, 5, -1)

        self.ObjList = QtWidgets.QListWidget()
        self.ObjList.setMinimumSize(QtCore.QSize(240, 125))
        self.ObjList.setMaximumSize(QtCore.QSize(240, 125))
        self.ObjList.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.ObjList.setFrameShadow(QtWidgets.QFrame.Plain)
        self.ObjList.setToolTip(
            "Click to see switching options.\nDouble click to select constrained object."
        )

        self.ButtonRow1 = QtWidgets.QHBoxLayout()
        self.ButtonRow1.setSpacing(0)

        self.ButtonAdd = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.ButtonAdd.setEnabled(True)
        self.ButtonAdd.setMinimumSize(QtCore.QSize(40, 40))
        self.ButtonAdd.setMaximumSize(QtCore.QSize(40, 40))
        self.ButtonAdd.setText("")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/pickHandlesComp.png"),
                       QtGui.QIcon.Normal, QtGui.QIcon.On)
        self.ButtonAdd.setIcon(icon)
        self.ButtonAdd.setIconSize(QtCore.QSize(40, 40))
        self.ButtonAdd.setFlat(False)
        self.ButtonAdd.setToolTip("Add selected constraint nodes to the list.")

        self.ButtonParent = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.ButtonParent.setMinimumSize(QtCore.QSize(40, 40))
        self.ButtonParent.setMaximumSize(QtCore.QSize(40, 40))
        self.ButtonParent.setText("")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/parentConstraint.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.On)
        self.ButtonParent.setIcon(icon1)
        self.ButtonParent.setIconSize(QtCore.QSize(40, 40))
        self.ButtonParent.setFlat(False)
        self.ButtonParent.setToolTip(
            "Create a parent constraint with options below.")

        self.ButtonPoint = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.ButtonPoint.setMinimumSize(QtCore.QSize(40, 40))
        self.ButtonPoint.setMaximumSize(QtCore.QSize(40, 40))
        self.ButtonPoint.setText("")
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/posConstraint.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.On)
        self.ButtonPoint.setIcon(icon2)
        self.ButtonPoint.setIconSize(QtCore.QSize(40, 40))
        self.ButtonPoint.setFlat(False)
        self.ButtonPoint.setToolTip(
            "Create a point constraint with options below.")

        self.ButtonOrient = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.ButtonOrient.setMinimumSize(QtCore.QSize(40, 40))
        self.ButtonOrient.setMaximumSize(QtCore.QSize(40, 40))
        self.ButtonOrient.setText("")
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(":/orientConstraint.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.On)
        self.ButtonOrient.setIcon(icon3)
        self.ButtonOrient.setIconSize(QtCore.QSize(40, 40))
        self.ButtonOrient.setFlat(False)
        self.ButtonOrient.setToolTip(
            "Create an orient constraint with options below.")

        self.ButtonScale = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.ButtonScale.setMinimumSize(QtCore.QSize(40, 40))
        self.ButtonScale.setMaximumSize(QtCore.QSize(40, 40))
        self.ButtonScale.setText("")
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(":/scaleConstraint.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.On)
        self.ButtonScale.setIcon(icon4)
        self.ButtonScale.setIconSize(QtCore.QSize(40, 40))
        self.ButtonScale.setFlat(False)
        self.ButtonScale.setToolTip(
            "Create a scale constraint with options below.")

        self.ButtonRemove = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.ButtonRemove.setMinimumSize(QtCore.QSize(40, 40))
        self.ButtonRemove.setMaximumSize(QtCore.QSize(40, 40))
        self.ButtonRemove.setText("")
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap(":/smallTrash.png"), QtGui.QIcon.Normal,
                        QtGui.QIcon.On)
        self.ButtonRemove.setIcon(icon5)
        self.ButtonRemove.setIconSize(QtCore.QSize(40, 40))
        self.ButtonRemove.setFlat(False)
        self.ButtonRemove.setToolTip("Remove constraint from the scene.")

        self.tabWidget = QtWidgets.QTabWidget(self.verticalLayoutWidget)
        self.tabWidget.setMinimumSize(QtCore.QSize(240, 205))
        self.tabWidget.setMaximumSize(QtCore.QSize(240, 205))
        self.tabWidget.setFont(font)
        self.tabWidget.setTabPosition(QtWidgets.QTabWidget.North)
        self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded)

        self.tabBar = QtWidgets.QTabBar(self.verticalLayoutWidget)
        self.tabWidget.setTabBar(self.tabBar)

        self.ConstraintOptions = QtWidgets.QWidget()

        self.gridLayoutWidget = QtWidgets.QWidget(self.ConstraintOptions)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(0, 0, 240, 185))

        self.OptionsGrid = QtWidgets.QGridLayout(self.gridLayoutWidget)
        self.OptionsGrid.setContentsMargins(-1, -1, -1, -1)
        self.OptionsGrid.setHorizontalSpacing(2)
        self.OptionsGrid.setVerticalSpacing(2)

        # Labels
        self.LabelOffset = QtWidgets.QLabel(self.gridLayoutWidget)
        self.LabelOffset.setFont(font)
        self.LabelOffset.setAlignment(QtCore.Qt.AlignRight
                                      | QtCore.Qt.AlignTrailing
                                      | QtCore.Qt.AlignVCenter)
        self.LabelOffset.setText("Offset")

        self.LabelMOffset = QtWidgets.QLabel(self.gridLayoutWidget)
        self.LabelMOffset.setFont(font)
        self.LabelMOffset.setAlignment(QtCore.Qt.AlignRight
                                       | QtCore.Qt.AlignTrailing
                                       | QtCore.Qt.AlignVCenter)
        self.LabelMOffset.setText("Maintain Off")

        self.LabelTr = QtWidgets.QLabel(self.gridLayoutWidget)
        self.LabelTr.setFont(font)
        self.LabelTr.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.LabelTr.setText("Translate")

        self.LabelRo = QtWidgets.QLabel(self.gridLayoutWidget)
        self.LabelRo.setFont(font)
        self.LabelRo.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.LabelRo.setText("Rotate")

        self.LabelSc = QtWidgets.QLabel(self.gridLayoutWidget)
        self.LabelSc.setFont(font)
        self.LabelSc.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.LabelSc.setText("Scale")

        self.LabelWeight = QtWidgets.QLabel(self.gridLayoutWidget)
        self.LabelWeight.setFont(font)
        self.LabelWeight.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.LabelWeight.setAlignment(QtCore.Qt.AlignRight
                                      | QtCore.Qt.AlignTrailing
                                      | QtCore.Qt.AlignVCenter)
        self.LabelWeight.setText("Weight")

        # Checkboxes
        self.CheckOffset = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckOffset.setChecked(True)
        self.CheckOffset.setText("")

        # Translate checkboxes
        self.CheckTrAll = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckTrAll.setFont(font)
        self.CheckTrAll.setChecked(True)
        self.CheckTrAll.setText("All")

        self.CheckTrX = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckTrX.setFont(font)
        self.CheckTrX.setText("X")

        self.CheckTrY = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckTrY.setFont(font)
        self.CheckTrY.setText("Y")

        self.CheckTrZ = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckTrZ.setFont(font)
        self.CheckTrZ.setText("Z")

        # Rotate checkboxes
        self.CheckRoAll = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckRoAll.setFont(font)
        self.CheckRoAll.setChecked(True)
        self.CheckRoAll.setText("All")

        self.CheckRoX = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckRoX.setFont(font)
        self.CheckRoX.setText("X")

        self.CheckRoY = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckRoY.setFont(font)
        self.CheckRoY.setText("Y")

        self.CheckRoZ = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckRoZ.setFont(font)
        self.CheckRoZ.setText("Z")

        # Scale checkboxes
        self.CheckScAll = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckScAll.setFont(font)
        self.CheckScAll.setChecked(True)
        self.CheckScAll.setText("All")

        self.CheckScX = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckScX.setFont(font)
        self.CheckScX.setText("X")

        self.CheckScY = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckScY.setFont(font)
        self.CheckScY.setText("Y")

        self.CheckScZ = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.CheckScZ.setFont(font)
        self.CheckScZ.setText("Z")

        # Spin boxes
        self.SpinOffsetX = QtWidgets.QDoubleSpinBox(self.gridLayoutWidget)
        self.SpinOffsetX.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)

        self.SpinOffsetY = QtWidgets.QDoubleSpinBox(self.gridLayoutWidget)
        self.SpinOffsetY.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)

        self.SpinOffsetZ = QtWidgets.QDoubleSpinBox(self.gridLayoutWidget)
        self.SpinOffsetZ.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)

        self.SpinWeight = QtWidgets.QDoubleSpinBox(self.gridLayoutWidget)
        self.SpinWeight.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
        self.SpinWeight.setMaximum(1.0)
        self.SpinWeight.setSingleStep(0.1)
        self.SpinWeight.setProperty("value", 1.0)

        self.Switch = QtWidgets.QWidget()

        self.verticalLayoutWidget_2 = QtWidgets.QWidget(self.Switch)
        self.verticalLayoutWidget_2.setGeometry(QtCore.QRect(0, 0, 235, 110))

        self.SwitchCol = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_2)
        self.SwitchCol.setSpacing(4)
        self.SwitchCol.setContentsMargins(5, 5, 5, 5)

        self.MenuSwitchTarget = QtWidgets.QComboBox(
            self.verticalLayoutWidget_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        self.MenuSwitchTarget.setSizePolicy(sizePolicy)
        self.MenuSwitchTarget.setSizeAdjustPolicy(
            QtWidgets.QComboBox.AdjustToContents)
        self.MenuSwitchTarget.setFrame(True)
        self.MenuSwitchTarget.setToolTip("Select a target to switch to...")

        self.ButtonRow3 = QtWidgets.QHBoxLayout()
        self.ButtonRow3.setSpacing(4)

        self.ButtonOff = QtWidgets.QPushButton(self.verticalLayoutWidget_2)
        self.ButtonOff.setMinimumHeight(25)
        self.ButtonOff.setToolTip("Turn all target weights OFF.")
        self.ButtonOff.setText("OFF")

        self.ButtonAll = QtWidgets.QPushButton(self.verticalLayoutWidget_2)
        self.ButtonAll.setMinimumHeight(25)
        self.ButtonAll.setToolTip("Turn all target weights ON.")
        self.ButtonAll.setText("ALL")

        self.ButtonSwitch = QtWidgets.QPushButton(self.verticalLayoutWidget_2)
        self.ButtonSwitch.setText("Switch")
        self.ButtonSwitch.setMinimumHeight(25)
        self.ButtonSwitch.setToolTip("Weight constraint to a single target.")

        self.CheckVisTrans = QtWidgets.QCheckBox(self.verticalLayoutWidget_2)
        self.CheckVisTrans.setChecked(True)
        self.CheckVisTrans.setToolTip(
            "Keep object in the same position\nby updating constraint offsets."
        )
        self.CheckVisTrans.setText("Maintain Visual Transforms")

        self.CheckKey = QtWidgets.QCheckBox(self.verticalLayoutWidget_2)
        self.CheckKey.setChecked(True)
        self.CheckKey.setToolTip(
            "Key offsets, transforms and blend attributes.")
        self.CheckKey.setText("Key")

        self.ButtonRow2 = QtWidgets.QHBoxLayout()
        self.ButtonRow2.setSpacing(0)

        self.ButtonHelp = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.ButtonHelp.setMinimumHeight(30)
        self.ButtonHelp.setFont(font)
        self.ButtonHelp.setToolTip("Open help documentation.")
        self.ButtonHelp.setText("Help")

        self.ButtonPurge = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.ButtonPurge.setMinimumHeight(30)
        self.ButtonPurge.setFont(font)
        self.ButtonPurge.setToolTip(
            "Remove all ConMan data. \nWARNING: CANNOT BE UNDONE")
        self.ButtonPurge.setText("Purge...")

        self.__place_ui()
        self.__set_connections()
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(self)
        self.__set_tab_order()
Пример #4
0
    def __setup_ui(self):
        self.setObjectName("ButterWindow")
        self.setWindowTitle("Butter")
        self.setMinimumSize(232, 210)
        self.setMaximumSize(1280, 210)
        font = QtGui.QFont()
        font.setPointSize(8)
        font.setFamily("Arial")
        self.setFont(font)

        # Size policy
        self.FrameSizePolicy = QtWidgets.QSizePolicy()
        self.FrameSizePolicy.setVerticalPolicy(self.FrameSizePolicy.Fixed)
        self.FrameSizePolicy.setHorizontalPolicy(self.FrameSizePolicy.Expanding)

        # Main layout and central widget
        self.centralwidget = QtWidgets.QWidget(self)
        self.LayoutVert1 = QtWidgets.QVBoxLayout(self.centralwidget)
        self.LayoutVert1.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
        self.LayoutVert1.setSpacing(1)

        # Radio buttons
        self.radioRow = QtWidgets.QHBoxLayout()
        self.radioLowPass = QtWidgets.QRadioButton(text="Lowpass")
        self.radioBandPass = QtWidgets.QRadioButton(text="Bandpass")
        self.radioHighPass = QtWidgets.QRadioButton(text="Highpass")

        # Minimum
        self.FrameMinFreq = QtWidgets.QFrame()
        self.FrameMinFreq.setSizePolicy(self.FrameSizePolicy)
        self.VertLayoutMinFreq = QtWidgets.QVBoxLayout()
        self.FrameMinFreq.setLayout(self.VertLayoutMinFreq)

        self.labelFreqMin = QtWidgets.QLabel(text="Minimum Frequency")
        self.labelFreqMin.setSizePolicy(self.FrameSizePolicy)

        self.sliderRowMin = QtWidgets.QHBoxLayout()

        self.sliderMin = QtWidgets.QSlider()
        self.sliderMin.setRange(1, 1000)
        self.sliderMin.setTickInterval(100)
        self.sliderMin.setSingleStep(1)
        self.sliderMin.setOrientation(QtCore.Qt.Horizontal)
        self.sliderMin.setTracking(True)
        self.sliderMin.setTickPosition(self.sliderMin.TicksBelow)

        self.sliderValMin = QtWidgets.QDoubleSpinBox()
        self.sliderValMin.setRange(0.00001, 1.0)
        self.sliderValMin.setDecimals(5)
        self.sliderValMin.setReadOnly(False)
        self.sliderValMin.setButtonSymbols(QtWidgets.QAbstractSpinBox.UpDownArrows)
        self.sliderValMin.setSingleStep(0.00001)

        # Maximum
        self.FrameMaxFreq = QtWidgets.QFrame()
        self.FrameMaxFreq.setSizePolicy(self.FrameSizePolicy)
        self.VertLayoutMaxFreq = QtWidgets.QVBoxLayout()
        self.FrameMaxFreq.setLayout(self.VertLayoutMaxFreq)

        self.labelFreqMax = QtWidgets.QLabel(text="Maximum Frequency")
        self.labelFreqMax.setSizePolicy(self.FrameSizePolicy)

        self.sliderRowMax = QtWidgets.QHBoxLayout()

        self.sliderMax = QtWidgets.QSlider()
        self.sliderMax.setRange(1, 1000)
        self.sliderMax.setTickInterval(100)
        self.sliderMax.setSingleStep(1)
        self.sliderMax.setValue(1000)
        self.sliderMax.setOrientation(QtCore.Qt.Horizontal)
        self.sliderMax.setTracking(True)
        self.sliderMax.setTickPosition(self.sliderMax.TicksBelow)

        self.sliderValMax = QtWidgets.QDoubleSpinBox()
        self.sliderValMax.setRange(0.0, 1.0)
        self.sliderValMax.setDecimals(3)
        self.sliderValMax.setValue(1.0)
        self.sliderValMax.setReadOnly(False)
        self.sliderValMax.setButtonSymbols(QtWidgets.QAbstractSpinBox.UpDownArrows)
        self.sliderValMax.setSingleStep(0.001)

        self.start_filter = QtWidgets.QPushButton(text="Start interactive filter")
        self.end_filter = QtWidgets.QPushButton(text="Exit filter")
        self.help_button = QtWidgets.QPushButton(text="Help...")