Przeglądaj źródła

Fix: don't abort group-socket rebuild on color-set sockets

relink_socket_map_add_socket raises Warning for color-set default values, which unwinds update_group_sockets mid-loop. Appending any tree using these sockets silently loses every socket, link, and value after the abort point (KeyError Socket_N at execute, wiped instance values). The socket itself is created before the raise, so printing instead is lossless.
whalemenace 3 miesięcy temu
rodzic
commit
7d2b6df677
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      utilities/utilities.py

+ 1 - 1
utilities/utilities.py

@@ -377,7 +377,7 @@ def relink_socket_map_add_socket(node, socket_collection, item,  in_out=None,):
             if not s.is_property_readonly("default_value"):
                 s.default_value = default_value
             else: # TODO: make this work with color sets.
-                raise Warning("WARN: Not yet implemented: default values for color sets.")
+                print("WARN: Not yet implemented: default values for color sets.")
     if read_schema_type(item) == 'Array': s.display_shape = 'SQUARE_DOT'
     elif node.bl_idname in ['MantisSchemaGroup'] and read_schema_type(item) == 'Constant':
         s.display_shape='CIRCLE_DOT'