Exemple #1
0
    def ch_setupUI(self):
        layout = QtGui.QVBoxLayout()
        layout.setContentsMargins(0, 0, 0, 0)

        self.ch_box = utils.TitledBox(title='Character', settings=1)

        nameLayout = QtGui.QHBoxLayout()
        nameLabel = QtGui.QLabel('Character name')
        nameLabel.setMaximumWidth(80)
        self.charNameCombo = QtGui.QComboBox()
        self.charNameCombo.setEditable(1)
        self.ch_nameBtn = QtGui.QPushButton('Create character')

        nameLayout.addWidget(nameLabel)
        nameLayout.addWidget(self.charNameCombo)

        self.characterSettingWidget = QtGui.QWidget()
        self.characterSettingWidget.setContentsMargins(0, 0, 0, 0)
        self.characterSettingWidget.setFixedHeight(0)

        self.ch_box.groupBoxLayout.addWidget(self.characterSettingWidget)
        self.ch_box.groupBoxLayout.addLayout(nameLayout)
        self.ch_box.groupBoxLayout.addWidget(self.ch_nameBtn)

        layout.addWidget(self.ch_box)
        self.ch_settingsBtn = self.ch_box.settingsBtn

        self.charWidget.setLayout(layout)

        self.ch_nameBtn.clicked.connect(self.ch_create)
        self.ch_settingsBtn.clicked.connect(self.ch_toggleSettingsUi)
        self.charNameCombo.activated.connect(self.refreshCharacter)
Exemple #2
0
    def rig_setupUI(self):
        layout = QtGui.QVBoxLayout()
        layout.setContentsMargins(0, 0, 0, 0)

        self.rig_box = utils.TitledBox(title='Rig', settings=0)

        layout.addWidget(self.rig_box)
        self.rigWidget.setLayout(layout)
Exemple #3
0
    def skeleton_setupUI(self):
        layout = QtGui.QVBoxLayout()
        layout.setContentsMargins(0, 0, 0, 0)

        self.skeleton_box = utils.TitledBox(title='Skeleton', settings=0)

        self.buildSkeletonBtn = QtGui.QPushButton('Build Skeleton')

        self.skeleton_box.groupBoxLayout.addWidget(self.buildSkeletonBtn)
        layout.addWidget(self.skeleton_box)
        self.skeletonWidget.setLayout(layout)

        self.buildSkeletonBtn.clicked.connect(self.buildModuleSkeleton)
Exemple #4
0
    def setupUI(self):
        centralWidget = QtGui.QWidget()
        mainLayout = QtGui.QVBoxLayout()
        self.attrlayout = QtGui.QVBoxLayout()

        self.box = utils.TitledBox(title='Attributes', settings=1)

        self.moduleNameEdit = utils.LabelEdit(label='Module Name:')
        self.moduleNameEdit.edit.setText(self.moduleName.capitalize())

        self.jointNumberWidget = QtGui.QWidget()
        self.jointNumberLayout = QtGui.QHBoxLayout()
        self.jointNumberLayout.setContentsMargins(10, 0, 10, 0)
        jointNumberLabel = QtGui.QLabel('Joint Number: ')
        self.jointNumberSpin = QtGui.QSpinBox()
        self.jointNumberSpin.setMinimum(1)
        self.jointNumberLayout.addWidget(jointNumberLabel)
        self.jointNumberLayout.addWidget(self.jointNumberSpin)
        self.jointNumberWidget.setLayout(self.jointNumberLayout)

        separator = QtGui.QFrame()
        separator.setFrameShape(QtGui.QFrame.HLine)
        separator.setFrameShadow(QtGui.QFrame.Sunken)

        createModuleBtn = QtGui.QPushButton('Create')

        # self.attrlayout.addLayout(templateNameLayout)
        self.attrlayout.addWidget(self.moduleNameEdit)
        self.attrlayout.addWidget(self.jointNumberWidget)
        self.box.groupBoxLayout.addLayout(self.attrlayout)

        self.box.groupBoxLayout.addWidget(separator)
        self.box.groupBoxLayout.addWidget(createModuleBtn)

        mainLayout.addWidget(self.box)

        createModuleBtn.clicked.connect(self.createModule)
        centralWidget.setLayout(mainLayout)

        self.setCentralWidget(centralWidget)
Exemple #5
0
    def mb_setupUI(self):
        layout = QtGui.QVBoxLayout()
        layout.setContentsMargins(0, 0, 0, 0)

        self.mb_splitLayout = QtGui.QSplitter(QtCore.Qt.Horizontal)

        self.mb_box = utils.TitledBox(title='Modules')
        self.mb_box.groupBoxLayout.addWidget(self.mb_splitLayout)
        self.addmodulesBtns()

        self.modulesTree = QtGui.QTreeWidget()
        self.modulesTree.setColumnCount(1)
        self.modulesTree.setHeaderHidden(1)
        self.modulesTree.setDragDropMode(QtGui.QAbstractItemView.InternalMove)

        # self.moduleAttributes = moduleWidget.ModuleAttrWidget(self)
        self.moduleAttributes = None
        self.mb_splitLayout.addWidget(self.modulesTree)
        # self.mb_splitLayout.addWidget(self.moduleAttributes)
        # self.moduleAttributes.hide()

        layout.addWidget(self.mb_box)
        self.modulesBtnWidget.setLayout(layout)