calling python function when user drags vertices

Hi all,

I am adding a new feature that I need to Blender using python. Basically, I have a polygon in blender, and I use those points of the polygon to determine the shape of another object (specifically I use the points to create a smooth set of circular arcs).

Anyway, I have my polygon and I have written my python function. I added a “go” button that calls the python function and builds my new object based on the points in the target polygon (specifically I use the polygon’s point as inputs to define a set of smooth circular arcs)… pretty simple.

What I want to do is make it more interactive so that as the user drags the points of the polygon it interactively calls my python function (which then changes the shape of my circular arcs).

I see how to attach a script link to object (such as ObDataUpdate)… and this does in fact call my python function whenever the user drags a vertex.

But! it does not seem to actually “update” the polygon’s data until after the user exits edit mode. Thus, when my python code reads the points of the polygon it does not match the state of the polygon that is visible on screen. Instead, it reads the “old” version that will not be updated until the user exits edit mode.

Thus, the user is not able to interactively see the shape of the circular arcs changes as the individual points are moved.

Any ideas on how to get around this or if I am missing something… thanks.

-Adam