Bladeren bron

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 maanden geleden
bovenliggende
commit
4fd017ca30
1 gewijzigde bestanden met toevoegingen van 1 en 3 verwijderingen
  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)
                 map[sock.identifier]= keep_sockets
             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,
                     #  this value is None and should not be altered until it is set once.
                     continue