Cleanup: Better perator names and description, moved format logic to its own file
This commit is contained in:
@@ -1,29 +1,13 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from copy import copy
|
||||
from os.path import abspath
|
||||
from pprint import pprint
|
||||
|
||||
import bpy
|
||||
|
||||
from .. import utils
|
||||
|
||||
|
||||
format_token = "#FMT:NODE_KIT#"
|
||||
|
||||
|
||||
def dump_nkit_format(data: str) -> str:
|
||||
return format_token + json.dumps(data)
|
||||
|
||||
|
||||
def parse_nkit_format(data: str) -> str | None:
|
||||
if data.startswith(format_token):
|
||||
print(data[len(format_token):])
|
||||
return json.loads(data[len(format_token):])
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def get_default(prop: bpy.types.Property):
|
||||
"""Get the default value of a Blender property"""
|
||||
|
||||
Reference in New Issue
Block a user