mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-26 13:32:32 +00:00
b8a7eba71d
* improvements to assets ui * assets ui now specific to per level data, not based on selection anymore * blueprints ui now presents assets per blueprint * a lot of tweaks & improvements in the areas above
14 lines
436 B
Python
14 lines
436 B
Python
import json
|
|
import bpy
|
|
|
|
def upsert_settings(name, data):
|
|
stored_settings = bpy.data.texts[name] if name in bpy.data.texts else bpy.data.texts.new(name)
|
|
stored_settings.clear()
|
|
stored_settings.write(json.dumps(data))
|
|
|
|
def load_settings(name):
|
|
stored_settings = bpy.data.texts[name] if name in bpy.data.texts else None
|
|
if stored_settings != None:
|
|
return json.loads(stored_settings.as_string())
|
|
return None
|