NodeTree Source

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.

Add-on functionality

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 materials 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.

Add-on web page

For more information please visit


Demonstration video

Current add-on version:


Blender versions:


1 Like

Updated to version 1.0.1.

  • Fixed bug with groups in compositor
  • Fixed bug with tabulation in Mapping nodes sources
  • Add “hide” node property to processing
  • Fixed “ColorRamp” node
1 Like

Any plans for supporting Animation Nodes or even Geometry Nodes code outputs?

I didn’t think about AN, but Geometry Nodes of course in future plans, when they will include in stable Blender releases.

Any reason why AN was not in the roadmap? Is that a technical limitation with AN? I personally think that AN will be around for a while given AN can manipulate/control some aspects of the Geometry Nodes.

AN is not a built-in official add-on. And will it remain necessary after the release of Geometry Nodes in the future?
Anyway, if there would be a big interest to AN I will think about it. At present, you are the first who asked about AN.

What about compositing nodes?

Either way its just what need to make Material Greenscreen an actual addon without having to learn to code!

Though compositing nodes would be handy - for this addon I also created a copy of the material greenscreen nodes in compositing nodes cos I like my greenscreen meathod better - particularly for bad greenscreen setups.

I gues that is debatable, since to me Geomtetry Nodes is more of a semi replacement for half of the functions in Sverchok. AN still provides the scene level control and the automation aspects. I am not sure when the Everything Nodes will actually be implemented.

You can use NodeTree Source for compositing nodes.

I think we will see this soon. In 2.92 or 2.93 when the developers will fully implement all geometry nodes features and maybe everything nodes too.