[Bf-python] mesh.update() without undo push
Willian Padovani Germano
wgermano at ig.com.br
Sat Mar 19 17:02:51 CET 2005
Stephen Swaney wrote:
>On Sat, Mar 19, 2005 at 03:35:27AM -0800, Gert De Roost wrote:
>>This is why I would propose an optional "No Undo"
>>argument to mesh.update().
It's not in mesh.update(), the undo data is being saved by
Window.EditMode(0), so as a quick hack for now you can stay out of edit
mode during the whole realtime operation. When I added this we were
close to releasing 2.34 and something like that was needed. It used
intrr's undo push mesh call. There's even a comment there (saw now)
stating that a better method should be done after 2.34 (time flies...).
>Without looking at the code involved ( or thinking too hard! ), I
>wonder if a better solution is to provide access to the push and pop
>functions of the undo stack. This would give the scripter control
>over the stack in a way similar to the BeginTransaction and Rollback
>commands in database programming. Most Bpy scripting *is*
>manipulating Blender's database, after all.
Yes, you're totally right. We need to give bpython access to the undo
stack, it's not hard, basically just push and pull with proper checks
for stack limits.
More information about the Bf-python