Re: Changing objects layer through Python

At 15.03.2009 11:31, Philip Cavaco wrote:

Is it currently possible to bring objects up in front of all other
objects through the python interface.
Just from reading the (pydia-layer.c and layer.c) code I assume the following to work:

        n = len(layer.objects)
        layer.remove_object (obj)
        # we could as well choose a 'big enough' number
        layer.add_object (obj, n)

Alternatively is it possible to
push an object behind another when it is created.

        layer.add_object (obj, 0)

should do the trick. But again I have not tried it. I'm just deducing from reading the source.

If this is possible how do I do it.

If the above does not work, I may be looking in more detail if you attach your script. You know - it is all open source ;)


-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert

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