Hello world!
I have made a small add-on, which exports selected nodes (shading, compositing, texture…) to a JSON string, so you (or someone else) can use it to create the same nodes in another blend file.
I have made it because I needed something like this while making another add-on. I would like to know if there is anyone else who would use it. The status of this project is for now “it works with most nodes”. To release it to the world (for free, of course), it requires some more work.
Potential usage:
- You make a tutorial about shading (or anything else using nodes) and you add this string to the video description
- You write an add-on which adds nodes - very likely after “Nodes Everywhere” will come true. With this add-on, you make nodes in Blender, select the relevant ones, copy JSON and paste into your add-on’s code (with some more work, but for now, this description is enough)
- Make a library of text files with your favourite chunks of your node setups. With some work, this add-on can make it for you
- Questions and answers on forums like blenderartists or Stack Overflow - you paste your setup not only as a screenshot, but also in this format
Cons:
- No interoperatibility with any another programs, only Blender
- After new node types with previously unknown features will be added in the new versions of Blender, someone (me) will probably need to update this add-on to add support for them
- Quite a big output. 6 nodes on the image are taking 11 kilobytes. This can be optimized, but the options are limited. This opens the question if it can be used the way I was talking about before
- Some nodes are referencing to something what can’t be exported this way - for example “Image Texture” node refrences to an image, “Render Layers” node in compositing references to a scene. So if you export your node setup with 10 different images, you need to find them manually after pasting
Please let me know if this is worth it, or if it should stay only on my disk. Or if you are really interested, any help is welcome.