浏览代码

5.0 work around arror updating group node during startup

I recently broke the code that is responsible for setting the socket values during
node group update. It is supposed to keep object references around in e.g. curve picker sockets, but it can lose them during startup.
we just work around this by skipping these sockets during startup

anyhow this just updates the 5.0 compatibility because it re-introduces bad beahviour
Joseph Brandenburg 3 月之前
父节点
当前提交
4fd017ca30
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      utilities.py

+ 1 - 3
utilities.py

@@ -145,9 +145,7 @@ def get_socket_maps(node, force=False):
                     keep_sockets.append(other_socket)
                     keep_sockets.append(other_socket)
                 map[sock.identifier]= keep_sockets
                 map[sock.identifier]= keep_sockets
             elif hasattr(sock, "default_value"):
             elif hasattr(sock, "default_value"):
-                if getattr(sock, "default_value") is not None:
-                    val = getattr(sock, "default_value")
-                elif sock.bl_idname == "EnumCurveSocket" and sock.get("default_value") is None:
+                if sock.bl_idname == "EnumCurveSocket" and sock.get("default_value") is None:
                     # HACK I need to add this special case because during file-load,
                     # HACK I need to add this special case because during file-load,
                     #  this value is None and should not be altered until it is set once.
                     #  this value is None and should not be altered until it is set once.
                     continue
                     continue