Blender 3D add-on for converting material nodes into python source code and storing it in the library.
The “NodeTree Source” add-on will be useful for Blender scripts and add-ons developers, as well as for materials and shaders creators.
When you click on the “Material to Text” button, the current material node tree source code is created and shown in the “Text Editor” window.
You can copy this code, or save it to a file, and then paste or open it in any other Blender project. Executing this code, by clicking the “Run Script” button, the same material will be created in the project.
If you are developing an add-on or script for Blender, this code can be included in your project. Adding this code execution to your add-on interface, you will be able to provide users with the necessary materials directly from your add-on.
The “NodeTree Source” add-on also has its own library, into which you can save the material’s source code. To save the material sources to the local library, click the “Material to Library” button. Saved materials can be used from the library immediately.
If you want to distribute your materials to other users, the “NodeTree Source” material library can be compiled into a separate add-on. Specify the path and click the “Distribute Library as Add-on” button. The complete archive with an add-on that includes the entire library of materials will be created. Users just need to download the add-on you provided and install it, after which they can immediately use the materials you provide.
The local material library is stored in the add-on directory. If you need to temporarily remove or reinstall the add-on, be sure to back up the library in a separate place on the disk first. After reinstalling the add-on, the library can be restored simply by copying it to the “nodetree_source_library” directory of the add-on.
The “Material”, “World” and “Compositing” nodes are supported.
The add-on can not guarantee that the generated code will work correctly between different versions of Blender. Since the developers make changes to each version of Blender, material code created in one version may not work correctly with another version of Blender.
Current add-on version
2.93, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 4.0
Location and call
“3D Viewport” window – N-panel – the “NodeTree Source” tab
- Download the *.zip archive with the add-on distributive.
- The “Preferences” window — Add-ons — Install… — specify the downloaded archive.
- Updated for compatibility with Blender 4.0.
- Added “Repeat Zone” and “Simulation Zone” geometry nodes processing.
- Fixed issue with the text.from_string() block in Blender 3.2 and higher
- Fixed issue with non-letter-numeric symbols in materials names by replacing all of them with underscores.
- Fixed issue with a node group input-output nodes processing
- Added support for Geometry Nodes
- Added “Light” node trees support
- Fixed bug with groups in the compositor
- Fixed bug with tabulation in Mapping nodes sources
- Add “hide” node property to processing
- Fixed “ColorRamp” node
- This release.