示例#1
0
    def update(self):
        inputs = self.inputs
        n_id = node_id(self)

        # end early
        nvBGL.callback_disable(n_id)
        if not all([inputs[0], self.id_data.sv_show]):
            return

        in_links = inputs[0].links

        self.use_custom_color = True
        if self.activate and in_links:

            # gather vertices from input
            lines = nvBGL.parse_socket(inputs[0])

            draw_data = {
                'tree_name': self.id_data.name[:],
                'content': lines,
                'location': (self.location + Vector((self.width+20, 0)))[:],
                'color': self.text_color[:],
                }
            nvBGL.callback_enable(n_id, draw_data)
            self.color = READY_COLOR
        else:
            self.color = FAIL_COLOR
            return
示例#2
0
    def update(self):
        inputs = self.inputs
        n_id = node_id(self)

        # end early
        nvBGL.callback_disable(n_id)
        if not all([inputs[0], self.id_data.sv_show]):
            return

        in_links = inputs[0].links

        self.use_custom_color = True
        if self.activate and in_links:

            # gather vertices from input
            lines = nvBGL.parse_socket(inputs[0])

            draw_data = {
                'tree_name': self.id_data.name[:],
                'content': lines,
                'location': (self.location + Vector((self.width + 20, 0)))[:],
                'color': self.text_color[:],
            }
            nvBGL.callback_enable(n_id, draw_data)
            self.color = READY_COLOR
        else:
            self.color = FAIL_COLOR
            return
示例#3
0
 def free(self):
     nvBGL.callback_disable(node_id(self))
示例#4
0
 def free(self):
     nvBGL.callback_disable(node_id(self))