Align view to axis during modal operator?

How can I align the view (e.g. Numpad7 for Top view) in a modal operator such as knife?

When I try pressing the numpad keys during a knife operation, nothing happens. This can be quite annoying when you want to move the view around to see other parts of the mesh, but having to start all over again if you want to be aligned to a view.

The View, Select and Mesh menus are hidden as well.

Is this possible?

Explanation: As you correctly state, such functions are modal operators, which are a type of operator. You cannot run two operators at once. Technically, such functions as Numpad7 are operators: the operator, in this case, is bpy.ops.view3d.viewnumpad(type='TOP'). Even if you could see the View, Object, and Select menus, you wouldn't be able to do anything.

The problem's not the shortcut. It's the concept.

It would be nice for an operator to be able to be designated as AMODAL or DUAL or something like that, for an operator that does something like manipulate the view or snap the cursor to the center (another thing you can't do) so that it could be run during a modal operator's RUNNING state. Maybe one of the developers could implement this, but as of 2.68.0 r58537 it's not present.

• It would seem this is possible to some extent; according to the release notes of Contours 1.0, you can use those operators while using contours. (I don't have contours though, so I can't actually test this) – gandalf3 Sep 14 '13 at 17:19
• I actually came across the post because I was annoyed that I can't do it in Contours. @JonathanWilliamson, what say you? – wchargin Sep 14 '13 at 21:41
• @gandalf3 If they fixed it since my version I suspect they listen for those calls and clone the operator code or something. Or they figured out how to do it vanilla. – wchargin Sep 14 '13 at 21:43
• Ah, I see.. It would be interesting to see how they did it though. (sounds like a good feature request :) BTW, you can't ping someone who hasn't already commented on, edited, etc. the post in question – gandalf3 Sep 14 '13 at 21:58

For scripters who got to this answer looking to implement a similar function, this is in fact possible.

Instead of returning {"RUNNING_MODAL"} from your operator, return {"PASS_THROUGH"} in the cases where you want the input to pass through your operator.

No. You'll have to accept your cuts, align the view, and then continue.