Ejemplo n.º 1
0
    def update(self):
        # find data value
        if self.data_item:
            data_path = "bpy.data." + self.data_enum + "['" + self.data_item + "']"
            data_path = eval(data_path)

            # send data value to connected nodes
            for output in self.outputs:
                for link in output.links:

                    # set value
                    try:
                        value = eval('data_path' + '.' + output.name)
                    except:
                        value = None

                    if value:
                        send_value_link(link, value)
Ejemplo n.º 2
0
 def update(self):
     # Send data value to connected nodes
     for output in self.outputs:
         for link in output.links:
             if output.name == 'R':
                 send_value_link(link,
                                 self.inputs['Color'].default_value[0])
             elif output.name == 'G':
                 send_value_link(link,
                                 self.inputs['Color'].default_value[1])
             elif output.name == 'B':
                 send_value_link(link,
                                 self.inputs['Color'].default_value[2])
             elif output.name == 'A':
                 send_value_link(link,
                                 self.inputs['Color'].default_value[3])
Ejemplo n.º 3
0
 def update(self):
     # send data value to connected nodes
     for output in self.outputs:
         for link in output.links:
             if output.name == "X":
                 send_value_link(link, self.inputs["Vector"].default_value[0])
             elif output.name == "Y":
                 send_value_link(link, self.inputs["Vector"].default_value[1])
             elif output.name == "Z":
                 send_value_link(link, self.inputs["Vector"].default_value[2])
Ejemplo n.º 4
0
    def update(self):

        # send data value to connected nodes
        for output in self.outputs:
            for link in output.links:

                if output.name == "R":
                    send_value_link(link,
                                    self.inputs["Color"].default_value[0])
                elif output.name == "G":
                    send_value_link(link,
                                    self.inputs["Color"].default_value[1])
                elif output.name == "B":
                    send_value_link(link,
                                    self.inputs["Color"].default_value[2])
                elif output.name == "A":
                    send_value_link(link,
                                    self.inputs["Color"].default_value[3])
Ejemplo n.º 5
0
 def update(self):
     # Send data value to connected nodes
     for output in self.outputs:
         for link in output.links:
             if output.name == 'X':
                 send_value_link(link,
                                 self.inputs['Vector'].default_value[0])
             elif output.name == 'Y':
                 send_value_link(link,
                                 self.inputs['Vector'].default_value[1])
             elif output.name == 'Z':
                 send_value_link(link,
                                 self.inputs['Vector'].default_value[2])
 def update(self):
     self.update_matrix()
     for output in self.outputs:
         for link in output.links:
             if output.name == 'Location':
                 output.default_value = self.locationProperty
                 if link.to_socket.type == 'VECTOR':
                     send_value_link(link, self.locationProperty)
             elif output.name == 'Rotation':
                 output.default_value = self.rotationProperty
                 if link.to_socket.type == 'VECTOR':
                     send_value_link(link, self.rotationProperty)
             elif output.name == 'Scale':
                 output.default_value = self.scaleProperty
                 if link.to_socket.type == 'VECTOR':
                     send_value_link(link, self.scaleProperty)
             elif output.name == 'Matrix Row1':
                 output.default_value = self.matrixRow1Property
                 if link.to_socket.type == 'VECTOR':
                     send_value_link(link, self.matrixRow1Property)
             elif output.name == 'Matrix Row2':
                 output.default_value = self.matrixRow2Property
                 if link.to_socket.type == 'VECTOR':
                     send_value_link(link, self.matrixRow2Property)
             elif output.name == 'Matrix Row3':
                 output.default_value = self.matrixRow3Property
                 if link.to_socket.type == 'VECTOR':
                     send_value_link(link, self.matrixRow3Property)
     self.update_target_nodes()
Ejemplo n.º 7
0
 def update(self):
     self.update_matrix()
     
     for output in self.outputs:
         for link in output.links:
             
             if output.name == "Location":
                 output.default_value = self.locationProperty
                 if link.to_socket.type == "VECTOR":
                     send_value_link(link, self.locationProperty)
                 
             elif output.name == "Rotation":
                 output.default_value = self.rotationProperty
                 if link.to_socket.type == "VECTOR":
                     send_value_link(link, self.rotationProperty)
                 
             elif output.name == "Scale":
                 output.default_value = self.scaleProperty
                 if link.to_socket.type == "VECTOR":
                     send_value_link(link, self.scaleProperty)
             
             elif output.name == "Matrix Row1":
                 output.default_value = self.matrixRow1Property
                 if link.to_socket.type == "VECTOR":
                     send_value_link(link, self.matrixRow1Property)
                 
             elif output.name == "Matrix Row2":
                 output.default_value = self.matrixRow2Property
                 if link.to_socket.type == "VECTOR":
                     send_value_link(link, self.matrixRow2Property)
                 
             elif output.name == "Matrix Row3":
                 output.default_value = self.matrixRow3Property
                 if link.to_socket.type == "VECTOR":
                     send_value_link(link, self.matrixRow3Property)
     
     self.update_target_nodes()