def extra_info(self): # print("getting matrix extra info") info = "" if is_vector_to_matrix(self): info = (" (" + str(self.num_matrices) + ")") return info
def draw(self, context, layout, node, text): if self.is_linked: draw_string = text + '. ' + SvGetSocketInfo(self) if is_vector_to_matrix(self): draw_string += (" (" + str(self.num_matrices) + ")") layout.label(draw_string) else: layout.label(text)
def sv_get(self, default=sentinel, deepcopy=True): self.num_matrices = 0 if self.is_linked and not self.is_output: if is_vector_to_matrix(self): # this means we're going to get a flat list of the incoming # locations and convert those into matrices proper. out = get_matrices_from_locs(SvGetSocket(self, deepcopy=True)) self.num_matrices = len(out) return out return SvGetSocket(self, deepcopy) elif default is sentinel: raise SvNoDataError else: return default
def sv_get(self, default=sentinel, deepcopy=True): self.num_matrices = 0 if self.is_linked and not self.is_output: if is_vector_to_matrix(self): # this means we're going to get a flat list of the incoming # locations and convert those into matrices proper. out = get_matrices_from_locs(SvGetSocket(self, deepcopy=True)) self.num_matrices = len(out) return out return SvGetSocket(self, deepcopy) elif default is sentinel: raise SvNoDataError(self) else: return default