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$
$\endgroup$
9
1 Answer
$\begingroup$
$\endgroup$
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$ Commented Sep 28, 2023 at 11:57
bmesh
module only works with blender. $\endgroup$bmesh
module is accessible without requiring blender running, look this doc link. this module is somehow separate from other blender modules. $\endgroup$import bmesh
in your python file? $\endgroup$