@@ -0,0 +1,2490 @@
+import maya.cmds as mc%0Afrom capture_gui.vendor.Qt import QtCore, QtWidgets%0A%0Aimport capture_gui.plugin%0Aimport capture_gui.lib%0A%0A%0Aclass GenericPlugin(capture_gui.plugin.Plugin):%0A    %22%22%22Widget for generic options%22%22%22%0A    id = %22Generic%22%0A    label = %22Generic%22%0A    section = %22config%22%0A    order = 100%0A%0A    def __init__(self, parent=None):%0A        super(GenericPlugin, self).__init__(parent=parent)%0A%0A        layout  = QtWidgets.QVBoxLayout(self)%0A        layout.setContentsMargins(0, 0, 0, 0)%0A%0A        isolate_view = QtWidgets.QCheckBox(%22Use isolate view from active panel%22)%0A        off_screen = QtWidgets.QCheckBox(%22Render offscreen%22)%0A%0A        layout.addWidget(isolate_view)%0A        layout.addWidget(off_screen)%0A%0A        isolate_view.stateChanged.connect(self.options_changed)%0A        off_screen.stateChanged.connect(self.options_changed)%0A%0A        self.widgets = %7B%0A            %22off_screen%22: off_screen,%0A            %22isolate_view%22: isolate_view%0A        %7D%0A%0A        self.apply_inputs(self.get_defaults())%0A%0A    def get_defaults(self):%0A        return %7B%0A            %22off_screen%22: True,%0A            %22isolate_view%22: False%0A        %7D%0A%0A    def get_inputs(self):%0A        %22%22%22%0A        Return the widget options%0A        :return: dictionary with all the settings of the widgets %0A        %22%22%22%0A%0A        inputs = dict()%0A        for key, widget in self.widgets.items():%0A            state = widget.isChecked()%0A            inputs%5Bkey%5D = state%0A%0A        return inputs%0A%0A    def apply_inputs(self, inputs):%0A        %22%22%22%0A        Apply the settings which can be adjust by the user or presets%0A        :param inputs: a collection of settings%0A        :type inputs: dict%0A%0A        :return: None%0A        %22%22%22%0A%0A        for key, widget in self.widgets.items():%0A            state = inputs.get(key, None)%0A            if state is not None:%0A                widget.setChecked(state)%0A%0A        return inputs%0A%0A    def get_outputs(self):%0A        %22%22%22%0A        Retrieve all settings of each available sub widgets%0A        :return: %0A        %22%22%22%0A%0A        inputs = self.get_inputs()%0A        outputs = dict()%0A        outputs%5B'off_screen'%5D = inputs%5B'off_screen'%5D%0A%0A        import capture_gui.lib%0A%0A        # Get isolate view members of the active panel%0A        if inputs%5B'isolate_view'%5D:%0A            panel = capture_gui.lib.get_active_editor()%0A            filter_set = mc.modelEditor(panel, query=True, viewObjects=True)%0A            isolate = mc.sets(filter_set, q=1) if filter_set else None%0A            outputs%5B'isolate'%5D = isolate%0A%0A        return outputs%0A%0A%0A

Implement generic options plugins