Hi,
I want to use brush in vertex paint mode.
I choose the brush according to:
bpy.ops.object.mode_set(mode=‘VERTEX_PAINT’)
bpy.ops.wm.tool_set_by_id(name=“builtin_brush.Draw”)
bpy.ops.paint.vertex_paint(stroke=[], mode=‘NORMAL’)
and I get the following errors:
RuntimeError: Operator bpy.ops.paint.vertex_paint.poll() failed, context is incorrect
It seems that python wants to get the mouse location.
However, I want to do it manually, i.e to give the location of vertex, view, radius and paint the mesh.
How can I add it in order to do it automatically?