Mesh Source

by Nikita Akimov in Scripts and Addons

Blender 3D add-on for converting meshes to python source code and saving it in a library for further distribution.

The “Mesh Source” add-on will be useful for Blender script and add-on developers, as well as for authors of 3D models and their distributors.

Add-on functionality

When you click on the “Mesh to Text” button the source code is generated for the currently selected meshes and shown in the “Text Editor” window.

The code can be copied to the clipboard or saved to a separate text file and then pasted or opened in any separate Blender project. When this code is executed, by clicking the “Run Script” button, the same set of meshes will be created in the scene.

If you develop scripts and add-ons for Blender, this code can be appended to your project. Adding this code execution to your add-on interface, you will be able to provide users with the desired meshes directly from your add-on.

The “Mesh Source” add-on also has its own library into which you can save the meshes source code. To save the mesh sources to the local library press the “Mesh to Library” button. Saved meshes can be loaded from the library right away.

If you want to distribute your meshes to other users, the “Mesh Source” library can be compiled into a separate add-on. Specify the path and press the “Distribute Library as Add-on” button. The complete archive with an add-on that includes the entire library of meshes will be created. Now you can distribute the add-on among Blender users in any convenient way. Users just need to download the add-on you provided and install it, after which they can immediately use the models you provide.


The following data is supported in meshes source code:

  • mesh data (points, edges, polygons)
  • vertex groups
  • UV-s
  • mesh modifier stack

Note that materials assigned to a mesh are not processed. The “NodeTree Source” add-on is intended for working with materials.

For Blender versions

2.83, 2.90, 2.91


“3D Viewport” window – N-panel – the “Mesh Source” tab

Current add-on version