[clutter] PyClutter "external" behaviours

From: Gideon de Kok <gideon@nyarna.com>
Date: Sat Mar 10 2007 - 11:54:13 EST

Hi,

I was experimenting with the Python-Clutter bindings and I ran into a
problem;

I want to animate a "Actor" when a key is pressed.. To call the
function, I use the .connect function, the function works perfectly and
I can call a function within the mainloop, inside this function I create
a new timeline for the animation which I want to show:

                timeline = clutter.Timeline(40, 50)
                alpha = clutter.Alpha(timeline, clutter.ramp_inc_func)
        
                o_behaviour = BehaviourRoll(alpha)
        
                timeline = clutter.Timeline(40, 50)
                for label in menu:
                        o_behaviour.apply(label)
        
                timeline.start()
                timeline.connect("new-frame", self.printBlaat)

The problem is, the "behaviour" won't "run".
If I add the behaviour in the standard "main" function, like it was done
within the examples, the behaviour does "run". I could always create a
function which does the animation with the
"timeline.connect("new-frame")" part. But this would misuse the whole
framework.

Is it something I misunderstand?

With best regards,

Gideon de Kok

-- 
To unsubscribe send a mail to clutter+unsubscribe@o-hand.com
Received on Sat, 10 Mar 2007 17:54:13 +0100

This archive was generated by hypermail 2.1.8 : Mon Apr 30 2007 - 08:01:15 EDT