Не подтверждена Коммит bc53d8c5 создал по автору Dealga McArdle's avatar Dealga McArdle Зафиксировано автором GitHub
Просмотр файлов

B28 vtext fix4 (#2665)

* alter f string formatting of info in changeable socket

* is this the intention?

* restores original behaviour - no error during hanging noodle
владелец aeb1abe7
...@@ -684,7 +684,7 @@ def changable_sockets(node, inputsocketname, outputsocketname): ...@@ -684,7 +684,7 @@ def changable_sockets(node, inputsocketname, outputsocketname):
if not inputsocketname in node.inputs: if not inputsocketname in node.inputs:
# - node not initialized in sv_init yet, # - node not initialized in sv_init yet,
# - or socketname incorrect # - or socketname incorrect
info("changable_socket was called on node (%s) with a socket named \"%s\", this socket does not exist" % (node.name, inputsocketname)) info(f"changable_socket was called on {node.name} with a socket named {inputsocketname}, this socket does not exist")
return return
in_socket = node.inputs[inputsocketname] in_socket = node.inputs[inputsocketname]
......
...@@ -213,6 +213,7 @@ class SverchCustomTree(NodeTree, SvNodeTreeCommon): ...@@ -213,6 +213,7 @@ class SverchCustomTree(NodeTree, SvNodeTreeCommon):
print('throttled update from context manager') print('throttled update from context manager')
return return
# print('svtree update', self.timestamp) # print('svtree update', self.timestamp)
self.has_changed = True self.has_changed = True
# self.has_link_count_changed # self.has_link_count_changed
......
...@@ -195,19 +195,19 @@ class ViewerNodeTextMK3(bpy.types.Node, SverchCustomTreeNode): ...@@ -195,19 +195,19 @@ class ViewerNodeTextMK3(bpy.types.Node, SverchCustomTreeNode):
def update(self): def update(self):
# inputs # this function auto extends the number of input sockets once a socket is linked.
multi_socket(self, min=1) multi_socket(self, min=1)
if 'data' in self.inputs and len(self.inputs['data'].links) > 0: # we want socket types to match the input
inputsocketname = 'data' for socket in self.inputs:
outputsocketname = ['data'] if socket.is_linked and socket.links:
changable_sockets(self, inputsocketname, outputsocketname) if not socket.bl_idname == socket.other.bl_idname:
socket.replace_socket(socket.other.bl_idname)
def process(self): def process(self):
if not self.autoupdate: if not self.autoupdate:
pass pass
else: else:
# bpy.ops.node.sverchok_viewer_buttonmk1(nodename=self.name, treename=self.id_data.name, lines=self.lines)
prep_text(self, self.lines) prep_text(self, self.lines)
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать