I want to create a mesh outside of blender, using bmesh module, and save it into an OBJ or whatever, completely through a python script.
bmesh itself is available from outside, but since I don't open blender, there would be no saving options available. How can I do that?

  • $\begingroup$ bmesh module only works with blender. $\endgroup$
    – Karan
    Mar 17 at 10:24
  • $\begingroup$ You can run blender in background through the command line docs.blender.org/manual/en/latest/advanced/command_line/… $\endgroup$
    – Karan
    Mar 17 at 10:25
  • $\begingroup$ bmesh module is accessible without requiring blender running, look this doc link. this module is somehow separate from other blender modules. $\endgroup$ Mar 17 at 12:12
  • $\begingroup$ yes in order to use it without opening the blender, you have to install it in your system as a python package/module. $\endgroup$
    – Karan
    Mar 17 at 13:25
  • $\begingroup$ can you import bmesh in your python file? $\endgroup$
    – Karan
    Mar 17 at 13:26

1 Answer 1


Late answer, but for anyone who comes across this; use BlenderProc. It allows you to use blender's python api (including bmesh) without ever opening blender. It can be installed as easily as pip install blenderproc. The only nuance is that you'll have to use blenderproc run script.py instead of python script.py, but it works exactly the same way and still runs using your regular python installation. Hope this helps

  • $\begingroup$ I find using "blenderproc run " very hard to debug. How can I run blenderproc scripts without this? $\endgroup$ Sep 28 at 11:57

You must log in to answer this question.

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