I bind a hotkey ‘U’ to view3d.select_circle and it works well. but call view3d.select_circle from my operator can not change select tool, just unselect mesh and objects.
What is the right way to call view3d.select_circle in my operator?
Thanks, that helps a lot. Can I find this from API reference?
Thi api I found from reference page is bpy.ops.view3d.select_circle(x=0, y=0, radius=25, wait_for_input=True, mode='SET'), and it doesn’t mention ‘INVOKE_DEFAULT’ at all.
Yes, it’s a general bpy.ops thing (kind of like context overrides, if you’re familiar with those), so there won’t be any mention of it in individual operator documentation.
The docs mention this but it’s worth re-iterating, the default execution context when calling an operator from a script is EXEC_DEFAULT, which as the name implies calls the execute function (which has no event, and thus- no mouse position). INVOKE_DEFAULT will tell it to call the invoke function, assuming there is one- that way you have an event, and a mouse position.
Thanks for your reply. I do read this document, but it didn’t left a footprint for a beginner of python and blender api. This vivid use case will bring better understand of it. I am not sure if you can get my English, hahahahaha