I would like to sculpt in python using the following operator:
stroke = {
"name": "stroke",
"mouse": mouse,
"pen_flip" : pen_flip,
"is_start": True,
"location": location,
"size": 50,
"pressure": 1,
"time": time
}
bpy.ops.sculpt.brush_stroke(context_override(), stroke=strokes)
I found the following sources:
https://github.com/christian-vorhemus/procedural-3d-image-generation/blob/master/blenderBackgroundTask.py#L54 https://docs.blender.org/api/current/bpy.ops.sculpt.html https://docs.blender.org/api/current/bpy.types.OperatorStrokeElement.html
The documentation of OperatorStrokeElement is quite poor and I don't understand the meaning of the parameters.
specifically, what is the location? why is it in 3D? I want to specify the location of the viewpoint, I found the location by select in object mode and checked the printed in info:
bpy.ops.view3d.select(deselect_all=True, location=(516, 338))
but I don't know how to add it to stroke options correctly, I've tried both the mouse click and location and nothing has happen (it said "FINISHED" but didn't sculpt it, apparently the location is incorrect)
just to note that I know how to do it manually by interface, I just want to translate it into code