Пример #1
0
    def setParameters(self, operation: OperationPlugin):
        if operation:
            # Create a new Parameter from the emitted operation,
            # Then wire up its connections for use in a parameter tree.
            parameter = operation.as_parameter()
            group = GroupParameter(name='Selected Operation',
                                   children=parameter)
            operation.wireup_parameter(group)

            # Add the Parameter to the parameter tree
            group.blockSignals(True)
            for child in group.children():
                child.blockSignals(True)
            self.operationeditor.setParameters(group, showTop=False)
            QApplication.processEvents()
            group.blockSignals(False)
            for child in group.children():
                child.blockSignals(False)
Пример #2
0
    def setParameters(self, operation: OperationPlugin):
        parameter = operation.as_parameter()
        group = GroupParameter(name='Selected Operation', children=parameter)
        operation.wireup_parameter(group)
        for child, parameter in zip(group.children(), parameter):
            # wireup signals to update the workflow
            if parameter.get('fixable'):
                child.sigFixToggled.connect(
                    partial(self.setFixed, operation, child.name))
            child.sigValueChanged.connect(
                partial(self.setValue, operation, child.name))

        group.blockSignals(True)
        for child in group.children():
            child.blockSignals(True)
        self.operationeditor.setParameters(group, showTop=False)
        QApplication.processEvents()
        group.blockSignals(False)
        for child in group.children():
            child.blockSignals(False)
Пример #3
0
    def setParameters(self, operation: OperationPlugin):
        if operation:
            # Create a new Parameter from the emitted operation,
            # Then wire up its connections for use in a parameter tree.
            parameter = operation.as_parameter()
            group = GroupParameter(name='Selected Operation',
                                   children=parameter)
            operation.wireup_parameter(group)

            # Add the Parameter to the parameter tree
            group.blockSignals(True)
            for child in group.children():
                child.blockSignals(True)
            self.operationeditor.setParameters(group, showTop=False)
            threads.invoke_as_event(self._unblock_group, group)
        else:
            self.operationeditor.clear()