Layer managment
  • janusz
    junior Member
    Posts: 4
    Joined: Sun Sep 04, 2005 9:49 pm

    Layer managment

    by janusz » Mon Sep 05, 2005 8:46 am

    I just wanted to know if anybody could help me sort out the following issue:
    how do you make your module keep its preferences for each layer?
    Cheers
    De profundis
  • User avatar
    yves@garagecube
    master
    Posts: 695
    Joined: Mon Jun 28, 2004 5:50 pm
    Location: Geneva
    Contact:

    Re: Layer managment

    by yves@garagecube » Wed Sep 07, 2005 12:29 pm

    janusz wrote:I just wanted to know if anybody could help me sort out the following issue:
    how do you make your module keep its preferences for each layer?
    Cheers


    Unfortunately, this is something that is not very easy. The next release of Modul8 (V2.5) will support automatic contextual layer modules which will solve your problem (a simple click in a checkbox).

    Now, in the current release, you have to do it yourself.

    Basically you need to:
    - Track layer focus changes (using a feedback script)
    - Update the module user-interface each time the focus does change
    - Keep a copy of your data for each active layer (best is to store it in the per-module / per-layer dictionary that you can get using the"direct_layer_moduleDict" keyword)
    - Apply your script for each active layers

    Check the BMP module which does exactly that.

    Yves.
  • janusz
    junior Member
    Posts: 4
    Joined: Sun Sep 04, 2005 9:49 pm

    by janusz » Wed Sep 07, 2005 6:08 pm

    Thank you Yves, I'll try to do it in a not so remote future ;-)
    De profundis

Who is online

Users browsing this forum: No registered users and 21 guests