Hi there,

On Thu, Mar 17, 2011 at 08:51:31AM +0100, Tomeu Vizoso wrote:
> On Thu, Mar 17, 2011 at 06:09, ekspiulo <[email protected]> wrote:
> > Hi all,
> >
> > I'm using clutter 1.4.2 compiled with jhbuild through GOBject introspection
> > from Python, and I've looked at the documentation and tried basically every
> > permutation of parameters that I can conceive for clutter_actor_animatev.
> 
> Hi, from reading Clutter-1.0.gir, the correct way to call this method is:
> 
> actor.animatev(Clutter.AnimationMode.EASE_IN_OUT_SINE, 1000, ["x",
> "y"], [10, 10])
> 
> As PyGObject should infer the array lengths from the list arguments.
> 
> Unfortunately that doesn't work currently because PyGObject doesn't
> know how to handle two array arguments that share the same auxiliary
> count argument:
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=627236
> 
> If you pass by #python in GIMPNet you could get suggestions about how
> to fix this.

you can also try the override file from the introspection branch in the
pyclutter git repository. It contains some overrides to ease the
transition from the static pyclutter bindings to GObject-introspection
and also a small hack to allow Actor.animate() being used like you're
used to.

so long

:wq buz


> Regards,
> 
> Tomeu
> 
> > from gi.repository import Clutter
> >
> > ...
> >
> > some_actor.animatev(Clutter.AnimationMode.EASE_IN_OUT_SINE, 1000, 2, ["x",
> > "y"], [x_value, y_value]) would seem to be the order of the day from the API
> > docs; however
> >
> > Traceback (most recent call last):
> >   File "drag.py", line 131, in shoot
> >     some_actor.animatev(Clutter.AnimationMode.EASE_IN_OUT_SINE, 1000, 2,
> > ["x", "y"], [x, y])
> >   File "/home/foo/clutter/install/lib/python2.6/site-packages/gi/types.py",
> > line 44, in function
> >     return info.invoke(*args)
> > TypeError: animatev() takes exactly 4 argument(s) (6 given)
> >
> >
> > some_actor.animatev(Clutter.AnimationMode.EASE_IN_OUT_SINE, 1000, ["x",
> > x_value, "y", y_value]) is the most seemingly correct code which I can come
> > up with, and it hates this
> >
> > Traceback (most recent call last):
> >   File "drag.py", line 131, in shoot
> >     some_actor.animatev(Clutter.AnimationMode.EASE_IN_OUT_SINE, 1000,
> > ["x",x, "y", y])
> >   File "/home/foo/clutter/install/lib/python2.6/site-packages/gi/types.py",
> > line 44, in function
> >     return info.invoke(*args)
> > TypeError: argument 3: Item 1: Must be string, not int
> >
> > I've tried many variations on this theme, and not yet met with success.  Can
> > anyone show me a working instance of this function in some other Python
> > script or give me any direction on where to go from here?
> >
> >
> > Thanks,
> >
> > Brian
> >
> > _______________________________________________
> > clutter-app-devel-list mailing list
> > [email protected]
> > http://lists.clutter-project.org/listinfo/clutter-app-devel-list
> >
> >
> _______________________________________________
> clutter-app-devel-list mailing list
> [email protected]
> http://lists.clutter-project.org/listinfo/clutter-app-devel-list

-- 
"Software is like sex: it's better when it's free.", Linus Torvalds

GnuPG Fingerprint: 2FFF FC48 C7DF 1EA0 00A0  FD53 8C35 FD2E 6908 7B82

Attachment: signature.asc
Description: Digital signature

_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to