Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phuang1024/nodedump
Serialize and unpack Blender node trees from the Python API.
https://github.com/phuang1024/nodedump
Last synced: 9 days ago
JSON representation
Serialize and unpack Blender node trees from the Python API.
- Host: GitHub
- URL: https://github.com/phuang1024/nodedump
- Owner: phuang1024
- License: gpl-3.0
- Created: 2023-02-22T01:30:39.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-22T17:57:19.000Z (almost 2 years ago)
- Last Synced: 2024-11-05T22:38:04.938Z (about 2 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NodeDump
Serialize and unpack Blender node trees from the Python API.
## Usage
This is not an add-on; put it in the scripts directory and import it from another program.
```py
import bpy
import nodedumpnode_tree = bpy.data.materials["Material"].node_tree
## Saving
# Save to file
with open("file.json", "w") as f:
nodedump.dump(node_tree, f)# or return a string
data = nodedump.dumps(node_tree)## Loading
# Load from file
with open("file.json", "r") as f:
# Contents of file are written to node tree.
nodedump.load(node_tree, f)# or load from string
nodedump.loads(node_tree, data)
```