Exemple #1
0
    def update(self):
        if 'data' in self.inputs and len(self.inputs['data'].links) > 0:
            inputsocketname = 'data'
            outputsocketname = ['data', ]
            changable_sockets(self, inputsocketname, outputsocketname)

            if 'data' in self.outputs and len(self.outputs['data'].links) > 0:
                data = SvGetSocketAnyType(self, self.inputs['data'])
                userlevelb = literal_eval('['+self.Sverch_LisLev+']')
                SvSetSocketAnyType(self, 'data', preobrazovatel(data, userlevelb))
Exemple #2
0
    def update(self):
        # inputs
        multi_socket(self, min=1)

        if 'data' in self.inputs and self.inputs['data'].links:
            # адаптивный сокет
            inputsocketname = 'data'
            outputsocketname = ['data']
            changable_sockets(self, inputsocketname, outputsocketname)

        if 'data' in self.outputs and self.outputs['data'].links:
            slots = []
            for socket in self.inputs:
                if socket.links:
                    slots.append(SvGetSocketAnyType(self, socket))
            if len(slots) < 2:
                return
            output = self.myZip(slots, self.level)
            if self.unwrap:
                output = preobrazovatel(output, [2,3])
            SvSetSocketAnyType(self, 'data', output)