Problem with next operation

Hello
I’m writting addon and I’m trying to do button who is making few operations.
In First one I’m using a knife.
bpy.ops.mesh.knife_tool(use_occlude_geometry=True, only_selected=False, wait_for_input=True)

And I want this operation to be next
bpy.ops.mesh.edge_face_add()
but there is a problem, because when I’m using a knife, I need to confirm the operation by pressing a “Enter” This is probably the reason why the next operation is not creating a face. How to fix it

I will be very grateful for any help.

Greets Neuroup

As soon as you “wait for input” user has to confirm with enter.
Also bpy.ops.mesh.edge_face_add() call after knife tool does not make any sense, knife tool will handle geometry changes itself.

Ok I changed to
wait_for_input=False
and i have still this same problem, I must confirm operation by enter.
I need to make from new loop a face.

Greets

Neuroup

Try
bpy.ops.mesh.knife_tool('INVOKE_DEFAULT', use_occlude_geometry=True, only_selected=False, wait_for_input=True)

Should prevent user input.

As far as i can tell, there is an issue with the logic, don’t know what you expect from knife_tool call but it may not be the right tool to achieve your goal.

Now :slight_smile: Knife started drawing a cut from place where I press a button :confused: And cut through is not working (it worked before)
Maybe I will explain. I want to have addon who is making a new cut [using Knife) and after it, script with new loop is creating face, and I must measure this new face.

Greets

Neuroup