[Bf-committers] Detecting undo from Python?

Alberto Torres kungfoobar at gmail.com
Fri Nov 29 11:35:52 CET 2013


I need to detect changes in the scene without polling data all the time.
The list at context.window_manager.operators give me most of the info I
need. Changing some properties need polling but it's not a big deal.
However, when undoing, that list is emptied, and I don't know if the user
undoed or redoed more times after that, so I don't know the final state of
stuff (meshes, especially) or when the user has stopped undoing/redoing.

Is there currently a way to get that information from Python? Another way
of getting the undo history?

Ideally, there should be an equivalent of bpy.data.is_dirty but writeable
and at object/data level. Or a __hash__().

More information about the Bf-committers mailing list