# Is there a post-finish operator hook in the python API

I'm writing a generic add-on bpy.types.Operator based on this question. It creates and arranges planes along an object, then splits the object along each new plane.

The user has control over the number of planes to arrange, and the direction along which to arrange them. The way I'm going now, everything happens in the execute method, so the user never sees how the planes are arranged; they're added, the object is split, and they go away all at once.

In this case, it'd be nice to have the execute method be responsible for laying the planes, and then a "final apply" hook splits the object, and removes the planes.

Is it possible to have a block of code run after an operator finishes?

(Is this possible within the python API, or must it be implemented as a modifier in C?)

• I don't have time to look into it this very second, but at first blush, I'd say look into how modal operators work. Modal workflows tend to be frowned upon in Blender, but they're not explicitly disallowed. – Fweeb Jul 1 '13 at 15:25
• A related question is here: blender.stackexchange.com/q/431/228 – satishgoda Jul 1 '13 at 15:28
• You may check on macros, which let you chain multiple operator calls. – CodeManX Mar 9 '14 at 4:37

No, Blender doesn't have this functionality, Check on the documentation for bpy.app.handlers, aside from this we don't provide other hooks into Blender.