I am doing an addon, and I need to load constantly some premade objects to reproduce and edit it, I through that making the data directly avaliable from python would help to build fast bmesh variants. But how I can convert an Bmesh data into an raw text and reverse it.

  • 1
    $\begingroup$ easiest hack solution: store vertex-coordinates, edges (as index-tuples of start-vertex and end-vertex), and faces (as indices of all contained vertices) in three lists. Then, on demand, create a mesh, fill it with mesh.from_pydata(verts, edges, faces). create your bmesh and load your mesh, then delete the mesh. $\endgroup$ – Teck-freak Nov 28 '17 at 12:12
  • $\begingroup$ as @Teck-freak , you can export the vertices.co and the edges and/or faces here and example about expor mesh data to TXT http://pasteall.org/51127/python and here some example about how to use this data into and Add-on in order to add new mesh http://pasteall.org/693657/python I can not add the code here because overload the text limit :( $\endgroup$ – yhoyo Nov 28 '17 at 13:02
  • $\begingroup$ Related $\endgroup$ – batFINGER Nov 28 '17 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.