I have been trying to sculpt a mesh using the Python API (v2.83), running via the bpy
module in headless mode. So far, I can render the mesh as is, but as soon as I try to use bpy.ops.sculpt.brush_stroke()
I get the RunTimeError:
RuntimeError: Operator bpy.ops.sculpt.brush_stroke.poll() failed, context is incorrect
The following are the contents of my bpy.context
:
Note that I have set the mode to "SCULPT", and would like to sculpt the "Body" object. Inspecting the contents of bpy.context.area
, it is None
. Should it be "3D_VIEW", and how to change it since bpy.context.area
is read only?
Thank you in advance.