[Bf-python] mesh.update() without undo push

Gert De Roost paleajed at yahoo.com
Sat Mar 19 12:35:27 CET 2005


I do not know much about Blender's undo system.  What
I do know is python scripts don't have control over
it.

The undo system does work during execution of a script
though; I noticed every time mesh.update() is called,
the new updated mesh is pushed onto the undo stack.

Problem is, when writing a script that updates the
mesh in realtime during operation (eg. EdgeSlide,
Edgetune), it quickly fills up the undo stack with
needless information, and worse, by doing this all
previous operations before running the script are
lost.

This is why I would propose an optional "No Undo"
argument to mesh.update().  One could then call
mesh.update("No Undo") at every intermediate step of
the realtime mesh update process, and only do a
regular mesh.update() at the end, when the user
validates the changes.

This way, one press of Ctrl-Z will undo the entire
operation of the script and previous operations will
still be available for undo.

There might be other methods for which this applies,
for the moment I am only aware of the one
(mesh.update).  Maybe a global Blender.Undo(0/1)
switch would be more appropiate ?


.gert.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Bf-python mailing list