Browse Source

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 month ago
parent
commit
288d3de6c1
1 changed files with 2 additions and 1 deletions
  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