Пример #1
0
    def create_layout(self):
        # Create instance of tool
        copyAnimLayer = CopyAnimLayer

        #Create tool instance
        self.copyAnimLayer = CopyAnimLayer()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text="Copy Anim Layer")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        self.copy_anim_layer = uiMod.push_button(label="Copy Anim Layer",
                                                 size=(self.w[6], self.h[1]))
        self.copy_anim_layer.clicked.connect(self.on_copy_anim_layer_clicked)
        self.main_layout.addWidget(self.copy_anim_layer, 1, 0, 1, 6)

        return self.frame_widget
Пример #2
0
    def create_layout(self):
        # Create instance of tool
        standalones = Standalones()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text="Standalones")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        G.standalones.scripts.sort()
        row = 0
        for script in G.standalones.scripts:
            row += 1
            parts = map(lambda x: x.capitalize(),
                        re.findall("[a-zA-Z0-9][^A-Z^0-9]*", script))
            label = " ".join(parts)
            button = uiMod.push_button(label=label,
                                       size=(self.w[6], self.h[1]))
            button.clicked.connect(partial(standalones.run_script, script))
            self.main_layout.addWidget(button, row, 0, 1, 6)
        return self.frame_widget
Пример #3
0
    def create_layout(self):
        # Create instance of tool
        G.mirrorAnim = MirrorAnim()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text = "Mirror Animation", base_width=self.w[1], base_height=self.h[1])

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        self.mirror_single_frame = uiMod.push_button(label="Mirror Animation", size=(self.w[6], self.h[1]))
        self.mirror_single_frame.clicked.connect(G.mirrorAnim.mirror_animation)
        self.main_layout.addWidget(self.mirror_single_frame, 1, 0, 1, 6)


        return self.frame_widget
Пример #4
0
    def create_layout(self):

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text="MPC Tools")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        tools = []
        for tool in mpcTools:
            tools.append(tool)
        tools.sort()

        row = 0
        for script in tools:
            row += 1
            exec_string = mpcTools[script]
            button = uiMod.push_button(label=script,
                                       size=(self.w[6], self.h[1]))
            button.clicked.connect(partial(self.on_button_press, exec_string))
            self.main_layout.addWidget(button, row, 0, 1, 6)

        return self.frame_widget
Пример #5
0
    def create_layout(self):

        self.toggleCamera = ToggleCamera()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text="Toggle Camera")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        self.setup_toggle = uiMod.push_button(label="Setup",
                                              size=(self.w[6], self.h[1]))
        self.setup_toggle.clicked.connect(self.on_setup_toggle_clicked)
        self.main_layout.addWidget(self.setup_toggle, 1, 0, 1, 6)

        self.camera_1 = uiMod.push_button(label="Camera 1 ",
                                          size=(self.w[2], self.h[1]))
        self.camera_1.clicked.connect(self.on_camera_1_clicked)
        self.camera_1.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self.camera_1.customContextMenuRequested.connect(
            self.on_camera_1_assign_clicked)
        self.main_layout.addWidget(self.camera_1, 2, 0, 1, 2)

        self.camera_1_assign = uiMod.push_button(label=">",
                                                 size=(self.w[1], self.h[1]))
        self.camera_1_assign.clicked.connect(self.on_camera_1_assign_clicked)
        self.main_layout.addWidget(self.camera_1_assign, 2, 2, 1, 1)

        self.camera_1_label = uiMod.line_edit(size=(self.w[3], self.h[1]))
        self.main_layout.addWidget(self.camera_1_label, 2, 3, 1, 4)

        self.camera_2 = uiMod.push_button(label="Camera 2 ",
                                          size=(self.w[2], self.h[1]))
        self.camera_2.clicked.connect(self.on_camera_2_clicked)
        self.main_layout.addWidget(self.camera_2, 3, 0, 1, 2)

        self.camera_2_assign = uiMod.push_button(label=">",
                                                 size=(self.w[1], self.h[1]))
        self.camera_2_assign.clicked.connect(self.on_camera_2_assign_clicked)
        self.main_layout.addWidget(self.camera_2_assign, 3, 2, 1, 1)

        self.camera_2_label = uiMod.line_edit(size=(self.w[3], self.h[1]))
        self.main_layout.addWidget(self.camera_2_label, 3, 3, 1, 4)

        self.toggle_camera = uiMod.push_button(label="Toggle Camera",
                                               size=(self.w[6], self.h[1]))
        self.toggle_camera.clicked.connect(self.on_toggle_camera_clicked)
        self.main_layout.addWidget(self.toggle_camera, 4, 0, 1, 6)

        return self.frame_widget
Пример #6
0
    def create_layout(self):
        # Create instance of tool
        selectionTools = SelectionTools()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text="Selection Tools")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        row = 0
        row += 1
        self.select_all = uiMod.push_button(label="All",
                                            size=(self.w[6], self.h[1]))
        self.select_all.clicked.connect(selectionTools.select_all)
        self.main_layout.addWidget(self.select_all, row, 0, 1, 6)

        row += 1
        self.select_side_button = uiMod.push_button(label="Side",
                                                    size=(self.w[6],
                                                          self.h[1]))
        self.select_side_button.clicked.connect(selectionTools.select_side)
        self.main_layout.addWidget(self.select_side_button, row, 0, 1, 6)

        row += 1
        self.select_display_group = uiMod.push_button(label="Display Group",
                                                      size=(self.w[6],
                                                            self.h[1]))
        self.select_display_group.clicked.connect(
            selectionTools.select_display_group)
        self.main_layout.addWidget(self.select_display_group, row, 0, 1, 6)

        row += 1
        self.select_global_display_ik = uiMod.push_button(
            label="Global Display IK", size=(self.w[6], self.h[1]))
        self.select_global_display_ik.clicked.connect(
            selectionTools.select_global_display_ik)
        self.main_layout.addWidget(self.select_global_display_ik, row, 0, 1, 6)
        return self.frame_widget
Пример #7
0
    def create_layout(self):

        worldspaceSnap = WorldspaceSnap()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text="Worldspace Snap")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        self.snap_selected = uiMod.push_button(label="Snap Selection",
                                               size=(self.w[6], self.h[1]))
        self.snap_selected.clicked.connect(worldspaceSnap.snap_selection)
        self.main_layout.addWidget(self.snap_selected, 1, 0, 1, 6)

        self.snap_rig = uiMod.push_button(label="Snap Rigs",
                                          size=(self.w[6], self.h[1]))
        self.snap_rig.clicked.connect(worldspaceSnap.snap_rig)
        self.main_layout.addWidget(self.snap_rig, 2, 0, 1, 6)

        self.snap_selected_to_rig = uiMod.push_button(
            label="Snap Selected to Rig", size=(self.w[6], self.h[1]))
        self.snap_selected_to_rig.clicked.connect(
            worldspaceSnap.snap_selected_to_rig)
        self.main_layout.addWidget(self.snap_selected_to_rig, 3, 0, 1, 6)

        self.make_locators = uiMod.push_button(label="Make Locators",
                                               size=(self.w[6], self.h[1]))
        self.make_locators.clicked.connect(worldspaceSnap.make_locators)
        self.main_layout.addWidget(self.make_locators, 4, 0, 1, 6)

        self.test = uiMod.push_button(label="test",
                                      size=(self.w[6], self.h[1]))
        self.test.clicked.connect(worldspaceSnap.test)
        self.main_layout.addWidget(self.test, 5, 0, 1, 6)

        return self.frame_widget
Пример #8
0
    def create_layout(self):

        ikfkSnapTest = IkfkSnapTest()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text="IK/FK")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        self.all_frames_radio = uiMod.radio_button(label="All Frames", size=(self.w[6], self.h[1]))
        self.all_frames_radio.clicked.connect(lambda : setattr(ikfkSnapTest, "frame_type", "all"))
        self.main_layout.addWidget(self.all_frames_radio, 1, 0, 1, 6)

        self.keyed_frames_radio = uiMod.radio_button(label="Keyed Frames", size=(self.w[6], self.h[1]))
        self.keyed_frames_radio.clicked.connect(lambda : setattr(ikfkSnapTest, "frame_type", "keyed"))
        self.main_layout.addWidget(self.keyed_frames_radio, 2, 0, 1, 6)

        self.current_frame_radio = uiMod.radio_button(label="Current Frame", size=(self.w[6], self.h[1]))
        self.current_frame_radio.setChecked(True)
        self.current_frame_radio.clicked.connect(lambda : setattr(ikfkSnapTest, "frame_type", "current"))
        self.main_layout.addWidget(self.current_frame_radio, 3, 0, 1, 6)

        self.wing_switch = uiMod.push_button(label="Wing Switch To FK", size=(self.w[6], self.h[1]))
        self.wing_switch.clicked.connect(ikfkSnapTest.wing_switch_to_fk)
        self.main_layout.addWidget(self.wing_switch, 4, 0, 1, 6)

        self.switch_to_ik = uiMod.push_button(label="Wing Switch To IK", size=(self.w[6], self.h[1]))
        self.switch_to_ik.clicked.connect(ikfkSnapTest.wing_switch_to_ik)
        self.main_layout.addWidget(self.switch_to_ik, 5, 0, 1, 6)

        return self.frame_widget
Пример #9
0
    def create_layout(self):

        keyTransform = KeyTransform()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text = "Maya Tools")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons

        return self.frame_widget
Пример #10
0
    def create_layout(self):
        keyCleanupTools = KeyCleanupTools()

        self.keyCleanupTools = KeyCleanupTools()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text = "Key Cleanup Tools")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        self.average_keys = uiMod.push_button(label = "Average Keys", size = (self.w[6], self.h[1]))
        self.average_keys.clicked.connect(self.on_average_keys_clicked)
        self.main_layout.addWidget(self.average_keys, 1, 0, 1, 6)

        self.smooth_keys = uiMod.push_button(label = "Smooth Keys", size = (self.w[6], self.h[1]))
        self.smooth_keys.clicked.connect(self.on_smooth_keys_clicked)
        self.main_layout.addWidget(self.smooth_keys, 2, 0, 1, 6)

        self.delete_redundant_keys = uiMod.push_button(label = "Delete Redundant", size = (self.w[6], self.h[1]))
        self.delete_redundant_keys.clicked.connect(G.keyCleanupTools.delete_redundant_keys)
        self.main_layout.addWidget(self.delete_redundant_keys, 3, 0, 1, 6)

        self.keep_extreme_keys = uiMod.push_button(label = "Keep Extreme Keys", size = (self.w[6], self.h[1]))
        self.keep_extreme_keys.clicked.connect(G.keyCleanupTools.keep_extreme_keys)
        self.main_layout.addWidget(self.keep_extreme_keys, 4, 0, 1, 6)


        return self.frame_widget
Пример #11
0
    def create_layout(self):
        # Create instance of tool
        shiftAnimation = ShiftAnimation()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text="Shift Animation")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        self.absolute_radio = uiMod.radio_button(label="Absolute",
                                                 size=(self.w[3], self.h[1]))
        self.absolute_radio.clicked.connect(
            lambda: setattr(shiftAnimation, "relative", False))
        self.main_layout.addWidget(self.absolute_radio, 1, 0, 1, 3)

        self.relative_radio = uiMod.radio_button(label="Relative",
                                                 size=(self.w[3], self.h[1]))
        self.relative_radio.setChecked(True)
        self.relative_radio.clicked.connect(
            lambda: setattr(shiftAnimation, "relative", True))
        self.main_layout.addWidget(self.relative_radio, 1, 3, 1, 3)

        self.all_left = uiMod.push_button(label="<<",
                                          size=(self.w[1], self.h[1]))
        self.all_left.clicked.connect(
            partial(shiftAnimation.shift, all_keys=True, forward=False))
        self.main_layout.addWidget(self.all_left, 2, 0, 1, 1)

        self.frame_left = uiMod.push_button(label="<",
                                            size=(self.w[1], self.h[1]))
        self.frame_left.clicked.connect(
            partial(shiftAnimation.shift, all_keys=False, forward=False))
        self.main_layout.addWidget(self.frame_left, 2, 1, 1, 1)

        self.number_box = uiMod.line_edit(size=(self.w[2], self.h[1]))
        #self.number_box.setText(str(shiftAnimation.frame_number))
        self.number_box.setValidator(QtGui.QIntValidator())
        self.number_box.editingFinished.connect(lambda: setattr(
            shiftAnimation, "frame_number", self.number_box.text()))
        self.main_layout.addWidget(self.number_box, 2, 2, 1, 2)

        self.frame_right = uiMod.push_button(label=">",
                                             size=(self.w[1], self.h[1]))
        self.frame_right.clicked.connect(
            partial(shiftAnimation.shift, all_keys=False, forward=True))
        self.main_layout.addWidget(self.frame_right, 2, 4, 1, 1)

        self.all_right = uiMod.push_button(label=">>",
                                           size=(self.w[1], self.h[1]))
        self.all_right.clicked.connect(
            partial(shiftAnimation.shift, all_keys=True, forward=True))
        self.main_layout.addWidget(self.all_right, 2, 5, 1, 1)

        return self.frame_widget
Пример #12
0
    def create_layout(self):
        copyPose = CopyPose()

        self.copyPose = CopyPose()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text = "Copy Paste Pose")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        self.copy_pose = uiMod.push_button(label = "Copy Pose", size = (self.w[6], self.h[1]))
        self.copy_pose.clicked.connect(self.on_copy_pose_clicked)
        self.main_layout.addWidget(self.copy_pose, 0, 0, 1, 6)

        self.copy_animation = uiMod.push_button(label = "Copy Animation", size = (self.w[6], self.h[1]))
        self.copy_animation.clicked.connect(self.on_copy_animation_clicked)
        self.main_layout.addWidget(self.copy_animation, 1, 0, 1, 6)

        self.translate_label = uiMod.label(label = "Translate", size = (self.w[2], self.h[1]))
        self.main_layout.addWidget(self.translate_label, 2, 0, 1, 2)

        self.translate_all = uiMod.checkbox(label="All", size = (self.w[1], self.h[1]))
        self.translate_all.clicked.connect(partial(self.on_checkbox_checked, translate_rotate="translate", axis="all"))
        self.main_layout.addWidget(self.translate_all, 2, 2, 1, 1)

        self.translate_x = uiMod.checkbox(label="X", size = (self.w[1], self.h[1]))
        self.translate_x.clicked.connect(partial(self.on_checkbox_checked, translate_rotate="translate", axis="x"))
        self.main_layout.addWidget(self.translate_x, 2, 3, 1, 1)

        self.translate_y = uiMod.checkbox(label="Y", size = (self.w[1], self.h[1]))
        self.translate_y.clicked.connect(partial(self.on_checkbox_checked, translate_rotate="translate", axis="y"))
        self.main_layout.addWidget(self.translate_y, 2, 4, 1, 1)

        self.translate_z = uiMod.checkbox(label="Z", size = (self.w[1], self.h[1]))
        self.translate_z.clicked.connect(partial(self.on_checkbox_checked, translate_rotate="translate", axis="z"))
        self.main_layout.addWidget(self.translate_z, 2, 5, 1, 1)

        self.rotate_label = uiMod.label(label = "Rotate", size = (self.w[2], self.h[1]))
        self.main_layout.addWidget(self.rotate_label, 3, 0, 1, 2)

        self.rotate_all = uiMod.checkbox(label="All", size = (self.w[1], self.h[1]))
        self.rotate_all.clicked.connect(partial(self.on_checkbox_checked, translate_rotate="rotate", axis="all"))
        self.main_layout.addWidget(self.rotate_all, 3, 2, 1, 1)

        self.rotate_x = uiMod.checkbox(label="X", size = (self.w[1], self.h[1]))
        self.rotate_x.clicked.connect(partial(self.on_checkbox_checked, translate_rotate="rotate", axis="x"))
        self.main_layout.addWidget(self.rotate_x, 3, 3, 1, 1)

        self.rotate_y = uiMod.checkbox(label="Y", size = (self.w[1], self.h[1]))
        self.rotate_y.clicked.connect(partial(self.on_checkbox_checked, translate_rotate="rotate", axis="y"))
        self.main_layout.addWidget(self.rotate_y, 3, 4, 1, 1)

        self.rotate_z = uiMod.checkbox(label="Z", size = (self.w[1], self.h[1]))
        self.rotate_z.clicked.connect(partial(self.on_checkbox_checked, translate_rotate="rotate", axis="z"))
        self.main_layout.addWidget(self.rotate_z, 3, 5, 1, 1)

        self.other_label = uiMod.label(label = "Other Attr", size = (self.w[2], self.h[1]))
        self.main_layout.addWidget(self.other_label, 4, 0, 1, 3)

        self.other_all = uiMod.checkbox(label="", size = (self.w[1], self.h[1]))
        self.main_layout.addWidget(self.other_all, 4, 2, 1, 1)

        self.paste_pose = uiMod.push_button(label="Paste Pose", size=(self.w[6], self.h[1]))
        self.paste_pose.clicked.connect(self.on_paste_pose_clicked)
        self.main_layout.addWidget(self.paste_pose, 5, 0, 1, 6)

        self.paste_animation = uiMod.push_button(label="Paste Animation", size=(self.w[6], self.h[1]))
        self.paste_animation.clicked.connect(self.on_paste_animation_clicked)
        self.main_layout.addWidget(self.paste_animation, 6, 0, 1, 6)

        self.default_checkbox_state()

        return self.frame_widget
Пример #13
0
    def create_layout(self):

        testTool = TestTool()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text="Test Tools")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        button_label = "a"
        button_size = (self.w[1], self.h[1])
        connect = "G.ncToolsUIs['testTool'].start_a"
        button_context_menu = {
            "start": "start_a",
            "stop": "start_a",
            "options": "start_a",
            "hotkey": "start_a"
        }

        print button_label, button_size, connect, button_context_menu

        self.button_a = uiMod.push_button(
            label="a",
            size=(self.w[1], self.h[1]),
            connect="G.ncToolsUIs['testTool'].start_a",
            tool_tip="Will print 'a'",
            status_tip="press the button",
            context_menu={
                "start": "G.ncToolsUIs['testTool'].start_a",
                "stop": "G.ncToolsUIs['testTool'].start_a",
                "options": "G.ncToolsUIs['testTool'].start_a",
                "hotkey": "G.ncToolsUIs['testTool'].start_a"
            })
        self.main_layout.addWidget(self.button_a, 1, 0, 1, 1)
        """self.button_b = uiMod.push_button(label = "b", size = (self.w[1], self.h[1]))
        self.main_layout.addWidget(self.button_b, 1, 1, 1, 1)
        self.button_c = uiMod.push_button(label = "c", size = (self.w[1], self.h[1]))
        self.main_layout.addWidget(self.button_c, 1, 2, 1, 1)
        self.button_d = uiMod.push_button(label = "d", size = (self.w[1], self.h[1]))
        self.main_layout.addWidget(self.button_d, 1, 3, 1, 1)
        self.button_e = uiMod.push_button(label = "e", size = (self.w[1], self.h[1]))
        self.main_layout.addWidget(self.button_e, 1, 4, 1, 1)
        self.button_f = uiMod.push_button(label = "f", size = (self.w[1], self.h[1]))
        self.main_layout.addWidget(self.button_f, 1, 5, 1, 1)

        self.button_1 = uiMod.push_button(label = "1", size = (self.w[2], self.h[1]))
        self.main_layout.addWidget(self.button_1, 2, 0, 1, 2)
        self.button_2 = uiMod.push_button(label = "2", size = (self.w[2], self.h[1]))
        self.main_layout.addWidget(self.button_2, 2, 2, 1, 2)
        self.button_3 = uiMod.push_button(label = "3", size = (self.w[2], self.h[1]))
        self.main_layout.addWidget(self.button_3, 2, 4, 1, 2)

        self.button_a = uiMod.push_button(label = "a", size = (self.w[3], self.h[1]))
        self.main_layout.addWidget(self.button_a, 3, 0, 1, 3)
        self.button_b = uiMod.push_button(label = "b", size = (self.w[3], self.h[1]))
        self.main_layout.addWidget(self.button_b, 3, 3, 1, 3)

        self.button_full = uiMod.push_button(label = "full", size = (self.w[6], self.h[1]))
        self.main_layout.addWidget(self.button_full, 4, 0, 1, 6)"""

        return self.frame_widget
Пример #14
0
    def create_layout(self):
        rigSettings = RigSettings()

        # Create tools instance
        self.rigSettings = RigSettings()

        # Create collapsible frame
        self.frame_widget = uiMod.CollapsibleFrame(text = "Rig Settings")

        # Create main widget
        self.main_widget = QtWidgets.QWidget()
        # Add widget to frame
        self.frame_widget.addWidget(self.main_widget)
        # Create main widget layout
        self.main_layout = QtWidgets.QGridLayout()
        self.main_layout.setSpacing(self.spacing)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        # Add layout to widget
        self.main_widget.setLayout(self.main_layout)

        # Create buttons
        """self.current_select = uiMod.label(label="Current Selection", size = (self.w[6], self.h[1]), h_adjust=10, align="center")
        self.main_layout.addWidget(self.current_select, 0, 0, 1, 6)

        self.current_line_edit = uiMod.line_edit(size=(self.w[6], self.h[1]))
        self.main_layout.addWidget(self.current_line_edit, 1, 0, 1, 6)"""

        self.quick_select = uiMod.label(label="Quick Select", size = (self.w[6], self.h[1]), h_adjust=10, align="center")
        self.main_layout.addWidget(self.quick_select, 2, 0, 1, 6)

        self.select_rigs = uiMod.push_button(label="All Rigs", size = (self.w[3], self.h[1]))
        self.select_rigs.clicked.connect(self.on_select_rigs_clicked)
        self.main_layout.addWidget(self.select_rigs, 3, 0, 1, 3)

        self.select_all_controls = uiMod.push_button(label="All Controls", size = (self.w[3], self.h[1]))
        self.select_all_controls.clicked.connect(self.on_select_all_controls_clicked)
        self.main_layout.addWidget(self.select_all_controls, 3, 3, 1, 3)

        self.global_control= uiMod.push_button(label="Global", size=(self.w[2], self.h[1]))
        self.global_control.clicked.connect(self.on_global_control_clicked)
        self.main_layout.addWidget(self.global_control, 4, 0, 1, 2)

        self.display_control= uiMod.push_button(label="Display", size=(self.w[2], self.h[1]))
        self.display_control.clicked.connect(self.on_display_control_clicked)
        self.main_layout.addWidget(self.display_control, 4, 2, 1, 2)

        self.ikfk_control= uiMod.push_button(label="IK FK", size=(self.w[2], self.h[1]))
        self.ikfk_control.clicked.connect(self.on_ikfk_control_clicked)
        self.main_layout.addWidget(self.ikfk_control, 4, 4, 1, 2)

        self.rig_speed = uiMod.label(label="Rig Speed", size = (self.w[6], self.h[1]), h_adjust=10, align="center")
        self.main_layout.addWidget(self.rig_speed, 5, 0, 1, 6)

        self.fast_speed= uiMod.push_button(label="Fast", size=(self.w[2], self.h[1]))
        self.fast_speed.clicked.connect(self.on_fast_speed_clicked)
        self.main_layout.addWidget(self.fast_speed, 6, 0, 1, 2)

        self.medium_speed= uiMod.push_button(label="Medium", size=(self.w[2], self.h[1]))
        self.medium_speed.clicked.connect(self.on_medium_speed_clicked)
        self.main_layout.addWidget(self.medium_speed, 6, 2, 1, 2)

        self.slow_speed= uiMod.push_button(label="Slow", size=(self.w[2], self.h[1]))
        self.slow_speed.clicked.connect(self.on_slow_speed_clicked)
        self.main_layout.addWidget(self.slow_speed, 6, 4, 1, 2)


        return self.frame_widget