Stepwise Animation with Dia+Python



Hi,
I am trying to make a simple animation with dia and Python.
However, I have not been able to refresh the display at each step.

Below is a simple example (supposing I have 1 object on the diagram):

def test_callback(data, flags):
    objects = layer.objects.active_layer
    for obj in objects:
        for i in range(3):
            obj.move(10,i)
            dia.active_display().add_update_all()
            dia.active_display().flush()
            time.sleep(1)

At the end of the loop the object is moved, but not step by step.

Would it be possible to do that?

regards!




sss


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]