I need after clicking the left mouse button in the modal operator to repeat the mouse click. The first press will be on the button, after this button disappears and I need to select vertex, edge or face behind it
Blender can simulate events, but if I’m not mistaken you have to start blender with a specific flag to enable it since it’s only meant for unit testing. Probably better to just do what the second click would do, but manually (view3d.select has a location property for example)
it seems this worked for me, choice case not always precise, but perhaps this me it looked.
in the modal operator I added the following lines
if event.type == 'TIMER': bpy.ops.view3d.select(location=(self.init_mouse_x, self.init_mouse_y))
I not know why but under work with vs code works upper code, i.e. clicking on returns timer. But when you run the blender without vs code, you need the following code to initialize the click.
if event.type == 'LEFTMOUSE' and event.value == 'RELEASE': bpy.ops.view3d.select(location=(self.init_mouse_x, self.init_mouse_y))
It is of course logical, but why in vs code obtained by pressing event.type = ‘TIMER’?
Anyway, Thank you)
Do not tell me how to track the click on the timer. For example I hold the mouse for a second and should trigger a certain action?