Selaa lähdekoodia

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 1 kuukausi sitten
vanhempi
sitoutus
288d3de6c1
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  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