Change LayerPosition
  • KjellV
    member
    Posts: 14
    Joined: Mon Apr 18, 2011 10:29 pm

    Change LayerPosition

    by KjellV » Fri Apr 22, 2011 1:34 am

    Can anyone get me started on the script code to make a rotary knob control the position of the active layer within the layerstack?
  • anomad
    master
    Posts: 412
    Joined: Sun Oct 21, 2007 10:07 pm
    Location: north cakalacky, usa
    Contact:

    by anomad » Fri Apr 22, 2011 4:29 am

    . i'm not sure that you can do that.

    . i seem to recall you can get a number that based on the layer in layer set (ie, the 10th layer at the bottom is 0, the next one up is 1, the top layer is 9 for layer set 1. when changing to layer set 2 at the bottom, the number is 10, etc.)

    . but i don't know if you directly assign one layer to another.

    . what sort of effect are you trying to achieve?


    -james
    (a nomad. )
  • User avatar
    lotech
    ultim8 member
    Posts: 228
    Joined: Wed Feb 06, 2008 1:26 am
    Location: Auckland, NZ
    Contact:

    by lotech » Fri Apr 22, 2011 4:43 am

    I think (vv) live monitor v2 does what you're asking the LAY dial on it moves the selected layer up or down.
  • KjellV
    member
    Posts: 14
    Joined: Mon Apr 18, 2011 10:29 pm

    by KjellV » Fri Apr 22, 2011 8:23 am

    What the live monitor does is change the layer focus, but that's not what I meant.
    The final goal for my mudule is that there is a rotary knob that controls which layer is focused (I already have that), but when a certain button is pressed the rotary knob acts as if you were dragging the layer with the mouse. What I especially need to know (I think) is how the command "ctrl_layerStack_positionChange" works.
  • User avatar
    sigmasix
    master
    Posts: 1224
    Joined: Thu Dec 02, 2004 2:12 pm
    Location: gva | switzerland
    Contact:

    by sigmasix » Fri Apr 22, 2011 2:11 pm

    hi,

    it was quite easy, the tough part was to understand how the needed keywords work… So I made a module for you: (s6) Knob2LayerPosition
    You can get it in the public library.

    You can all check the code to see how to use the layerstack keywords.
    The best way to understand how to use a badly documented keyword is to use the PrintDirectEvent tool and check what happens when using the control you want to work with.
  • KjellV
    member
    Posts: 14
    Joined: Mon Apr 18, 2011 10:29 pm

    by KjellV » Fri Apr 22, 2011 2:35 pm

    thanks a lot man! really appreciate it!
  • anomad
    master
    Posts: 412
    Joined: Sun Oct 21, 2007 10:07 pm
    Location: north cakalacky, usa
    Contact:

    by anomad » Mon Apr 25, 2011 8:58 pm

    sigmasix wrote:The best way to understand how to use a badly documented keyword is to use the PrintDirectEvent tool and check what happens when using the control you want to work with.


    . oooh! great tip! :D


    -james
    (a nomad. )

Who is online

Users browsing this forum: No registered users and 19 guests