[AddOn] DumpMesh

Because I frequently need lists of vertices and faces in the form of Python code in add-ons that produce parameterized objects, I wrote a simple add-on called DumpMesh that creates those lists (and others) for a selected mesh object and stores the code in Blender’s text editor. Be default it also creates code for another add-on, CreateMesh, that can be used to generate a mesh object based on those lists of vertices etc. so can directly test it.

This is of course an add-on with a very narrow audience but that’s no reason not to share it :slight_smile:

More information, including where to download it, in this article.

Cheers,

– Michel.

Fixed some bugs and added some extra data to be dumped (the selected status of edges and the active uv-map).

In this rather long and technical article I illustrate some specific Python trickery and BMesh peculiarities for those who might be interested.

Cheers,

– Michel.

This is fantastic. Reminds me of nuke, which allows you to copy your node trees and automatically converts them to a text file upon copying them. Allowing you to easily share scripts with others to simply paste back into another nuke instance with very little inconvenience.

new update : now you can dump all custom data layers, even the ones that are added programmaticaly.

Lot cleaner code too, except for some minor quirks of Blenders Python API.

details here.

Enjoy,

–Michel.

Was waiting for something like this to replace the EWOC version a while back! Cheers.

just to show commitment is everything I ported this add-on to 2.80 :slight_smile:

download link etc in this blog article.

It wasn’t too hard actually because a lot may have changed, the bmesh stuff largely stayed he same.

anyway, have fun :slight_smile:

1 Like