How to use select_circle in a modal operator to select faces in edit mode? I'm trying to write a small tool where I can &quot;paint&quot; a face selection and at the same time expand this selection to its shell (essentially what select_linked() does.
I have set this up as a modal operator and selecting works fine while using:
self.loc = [event.mouse_region_x, event.mouse_region_y]
bpy.ops.view3d.select(location=self.loc, extend=True)

Sadly I can't seem to get it to work with select_circle.
Simply doing:
bpy.ops.view3d.select_circle(event.mouse_region_x, event.mouse_region_y, 10)

Gives me an exception: 1-3 args execution context is supported exception
I then tried to override the context like so:
override = context.copy()
override[&quot;x&quot;] = event.mouse_region_x
override[&quot;y&quot;] = event.mouse_region_y
override[&quot;radius&quot;] = 10
bpy.ops.view3d.select_circle(override)

but this does not do anything..
bpy.ops.view3d.select_circle('INVOKE_DEFAULT')

selects but then the select_linked() does not work anymore :/
bpy.ops.view3d.select_circle('EXEC_DEFAULT')

also doesn't seem to work.
The complete code for the addon is here: https://gist.github.com/sschoellhammer/bcafcb2cdec2e2aee08c6c0837a88559
I'm sorry, I'm still fairly new to blender scripting. If you have any pointers for me, please let me know!
Thanks so much!
seb
Ok I figured it out..
from:
(Is there a way to set the radius of the new circle select tool by python script)
def get_3d_area_and_region(self):
    self.view_3d_area = None
    self.view_3d_region = None
    for area in bpy.context.screen.areas:  # Cycle through all the avaliable areas
        if area.type == &quot;VIEW_3D&quot;:  # if area is called VIEW_3D
            for region in area.regions:  # Cycle through all the regions in that area
                if region.type == &quot;WINDOW&quot;:  # if the region is WINDOW
                    self.view_3d_area = area  # save the area and region in variables
                    self.view_3d_region = region
                    return
    print (&quot;Could not find area/region&quot;)

and then
override = context.copy()
            override['area'] = self.view_3d_area  
            override['region'] = self.view_3d_region
            bpy.ops.view3d.select_circle(override, x=event.mouse_region_x, y=event.mouse_region_y, radius=100) 

I still don't really understand why the context area information of my own operator is not enough and I still have to query all the areas extra. Oh well, some day I will know more..:)