maxscript's conversion of bool to python

This commit is contained in:
Kayla Man 2023-06-28 13:21:37 +08:00
parent d4da7d614b
commit 5a228d4d51

View file

@ -78,7 +78,13 @@ def read(container) -> dict:
value.startswith(JSON_PREFIX): value.startswith(JSON_PREFIX):
with contextlib.suppress(json.JSONDecodeError): with contextlib.suppress(json.JSONDecodeError):
value = json.loads(value[len(JSON_PREFIX):]) value = json.loads(value[len(JSON_PREFIX):])
data[key.strip()] = value if key.strip() == "active":
if value == "true":
data[key.strip()] = True
else:
data[key.strip()] = False
else:
data[key.strip()] = value
data["instance_node"] = container.Name data["instance_node"] = container.Name