Updating animation?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Updating animation?

zetah
I use Mayavi 4.3.0 with VTK 5.10.1 and Python 2.7.5.

I had an idea to make simplest as possible 3D barchart animation, but Mayavi
window just stays still. It's doing something, at least it's reading the
data as instructed, but scene never changes:

---------------------------------------------------------
import h5py
import numpy as np
from mayavi import mlab

with h5py.File('sk.h5') as h:

    c = mlab.barchart(np.array(h['12'][0]))

    @mlab.show
    @mlab.animate(delay=100)
    def anim():
        f = mlab.gcf()
        while 1:
            for ar in list(h):
                print('Updating...')
                c.mlab_source.scalar = np.array(ar)
                f.scene.render()
                yield

    anim()
---------------------------------------------------------

Arrays stored in h5 file are with (15,30) shape.

I googled about it, but all I found was similar reports without answer.
Hopefully someone can point me in right direction.



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev