how to duplicate a layer?
  • User avatar
    Vincent-Pimousse
    super8 member
    Posts: 131
    Joined: Tue Oct 09, 2007 8:50 pm
    Location: Toulouse, FR

    how to duplicate a layer?

    by Vincent-Pimousse » Sat Jul 25, 2009 2:20 pm

    Hello,

    I can't find the way to duplicate a layer to another position.
    I tried something like:
    layer_source = 1
    destination = 2
    modul8.setValue('ctrl_layerStack_duplicate', destination, layer_source)

    Any idea?
  • mowgli_uk
    master
    Posts: 464
    Joined: Tue Nov 15, 2005 10:43 pm
    Location: LONDON

    by mowgli_uk » Sat Jul 25, 2009 8:13 pm

    there's a switch that does that
  • User avatar
    Vincent-Pimousse
    super8 member
    Posts: 131
    Joined: Tue Oct 09, 2007 8:50 pm
    Location: Toulouse, FR

    by Vincent-Pimousse » Sat Jul 25, 2009 10:28 pm

    mowgli_uk wrote:there's a switch that does that

    Sure, but how to control this switch by scripting? Undestand it is not the only aim of my module but I am blocked at this point.
    I think I use the good way with my short example but I can't find the mistake.
  • User avatar
    sigmasix
    master
    Posts: 1224
    Joined: Thu Dec 02, 2004 2:12 pm
    Location: gva | switzerland
    Contact:

    by sigmasix » Thu Aug 13, 2009 3:48 pm

    Salut Vincent,

    Bon, je me suis un peu pris la tête à chercher aussi… Le dico des keyword manque un peu de précisions…

    Bon, c'est bien le bon keyword que tu utilisais, par contre la valeur à passer est une list, pas le stack de destination… et le numéro de calque doit être 10 et pas autre chose…

    En gros pour dupliquer le calque 1 dans le stack 2 :

    modul8.setValue('ctrl_layerStack_duplicate', [1, 2], 10)


    Si tu veux dupliquer le layer sélectionné, tu peux procéder comme ca:

    selected = modul8.getValue('ctrl_layerStack_focusPosition', 0)
    destination = 6
    modul8.setValue('ctrl_layerStack_duplicate', [selected, destination], 10)


    J'espère que ca peut t'aider!

    Sinon, le module PrintDirectEvent peut vraiment t'aider dans ce genre de situation, tu peux cocher keyword et il va te printer le keyword et ses valeurs lorsque tu clique sur un bouton dans l'interface.
  • Lupin
    garageCube team
    Posts: 383
    Joined: Fri Aug 18, 2006 12:37 pm
    Location: France
    Contact:

    by Lupin » Thu Aug 13, 2009 4:40 pm

    and to see this Keyword in action your can download the fresh new module
    (vs) Duplicate LayerStack
    which duplicates layers from A stack to B and vice versa
    have fun
    Gael Abegg Gauthey (former known as Lupin)
    https://www.linkedin.com/in/abegg-gauthey/
  • User avatar
    The Midi Thief
    master
    Posts: 483
    Joined: Thu Sep 29, 2005 7:19 pm
    Location: Stockholm, Sweden
    Contact:

    by The Midi Thief » Sat Aug 15, 2009 1:24 pm

    That's f***i'n handy, Lupin! Another great module! Thanks!

Who is online

Users browsing this forum: No registered users and 15 guests