2
$\begingroup$

Does anyone know of an addon or script that can take a 3D object that was modeled in Blender and turn it into Bmesh based code? Would be super handy.

I can't seem to find anything, but hopefully one of you fine folk will know of something.

$\endgroup$
2
  • $\begingroup$ In the Scripting workspace under Templates > Python there are two templates, Bmesh Simple and Bmesh Editmode. You can also check this page out for examples of how to do Bmesh operations. $\endgroup$
    – Jakemoyo
    Commented Aug 6, 2022 at 9:53
  • $\begingroup$ Thanks @Jakemoyo, my proficancy with bmesh is fairly good, what I'm looking for is an addon that takes a 3D object and spits out bmesh based code that would build the object, so I can model something and not have to write the code for it... Get tedious writing 3 hours of code for something that takes 5 mins to model XD $\endgroup$
    – Psyonic
    Commented Aug 6, 2022 at 12:12

1 Answer 1

0
$\begingroup$

I found something good enough from here: https://b3d.interplanety.org/en/how-to-save-mesh-data-to-text/

It takes the active object and spits out the verticies and faces that can then be used with from_pydata(verts, [], faces) to create that object.

This is new to me and wanted to share.

$\endgroup$
1
  • $\begingroup$ That's good, I would recommend writing it to a json file, that way when you read it in, it can already be in dictionary format. $\endgroup$
    – Jakemoyo
    Commented Aug 7, 2022 at 11:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .