Explorar el Código

Fix: Don't cause errors for un-jsonable attributes

I'm doing this because other addon developers are rude and add properties
to my objects without checking if they need them
This confuses my code and throws errors for some users.
Joseph Brandenburg hace 1 mes
padre
commit
288d3de6c1
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      utilities/i_o.py

+ 2 - 1
utilities/i_o.py

@@ -424,7 +424,8 @@ def get_node_data(ui_node):
         if propname == "parent" and value:
             value = value.name
         if not is_jsonable(value):
-            raise RuntimeError(f"Could not export...  {ui_node.name}, {propname}, {type(value)}")
+            prOrange(f"Warning: Could not export...  {ui_node.name}, {propname}, {type(value)}")
+            continue
         if value is None:
             continue
         node_props[propname] = value