Control selected layers

Moderator: Moderator Group

Control selected layers

Postby showmanship » Wed Jan 06, 2016 3:58 pm

Hello,

I would like to set up my WD to manipulate paramaters such as opacity, scale and position of a selected layer. At the moment, I only know how to program an encoder to a specific layer meaning I would need to make an encoder for every layer which is not practical. Im sure there is a way to do it... Can someone please guide me? Similarly, I would like to make 2 buttons; one to select next layer and the other to select previous layer, as opposed to having a button to select each individual layer. How would I go about doing that? Thank you in advance!
showmanship
 
Posts: 11
Joined: Tue Jan 13, 2015 12:58 am

Re: Control selected layers

Postby JustynR » Wed Jan 06, 2016 10:05 pm

I'm not sure that's possible without a PRO or Ultimate version of WD...

I can't see a way to change Devices in a Script anywhere, it also looks like the Encoder Wheel isn't relative, it's absolute - If there was a way to change layers, that new selected layer would jump to what ever Value your Encoder was at.

If you WD PRO or ULT, let me know, there are a few ways to make that work.


Cheers,
Justyn Roy
Toronto Ontario Canada
JustynR
 
Posts: 560
Joined: Wed Mar 25, 2009 1:33 am
Location: Toronto, Canada

Re: Control selected layers

Postby scottywalker » Thu Jan 07, 2016 8:57 am

You can't do it exactly like you want to using an encoder or a fader because there is no option to change the devices that they apply to.
You can however make some incremental buttons which may work for you.
To select your layers using a plus or minus button you can make a variable. Lets say you make a variable called layerselect and give it a value of one, which you can do by the command Vint,layerselect,1. You can then make a "plus" customscript button with 2 commands in it. The first command would be layerselect+ =1 which will add 1 to the value of your variable. The next command could be deviceselect,2,layerselect which will choose the next layer up on site 2. Do the same for a "minus" button but using layerselect- =1 for the first command.

You can then make incremental buttons, for example to adjust the x position you can have a "X POS +" button with the script DeviceSetParamRelative,2,layerselect,X Pos,0.50 which will adjust the position of your selected layer each time you click and then have a "X POS -" button with a value -0.50.

Not sure if doing it that way would be of any use to you. Of course this is all assuming that you are using STD.
scottywalker
 
Posts: 31
Joined: Thu Aug 16, 2012 12:58 pm
Location: Dubai U.A.E

Re: Control selected layers

Postby Markus Zeppenfeld » Thu Jan 07, 2016 10:33 am

Hey guys,

the way scotty pointed out is a very good way to go.
You can use his way of counting up layers but make sure to never have a negative selection number or 0.

Use the encoder(s) and an encoder input node(s).
The node(s) will be connected to the appropriate PB Layer control. Every time you choose a different layer, you could set the Layer Control node to use the counter number as device ID.
WDNodeSetParam

You will then see, that the newly selected layer will jump to the e.g. position of the layer which has been selected before as the node directly sends out the encoder value to the new layer ID.
You could prevent this by reading out the actual value of the layer and set it to the encoder, or just deactivate the node until the encoder will be touched again.
WDNodeDisableOutput
VGetDeviceParam

Cheers
Markus
Markus Zeppenfeld
Senior Product Manager, Pandoras Box

"Have you tried turning it off and on again?" (from "The IT Crowd" / channel 4)
Markus Zeppenfeld
 
Posts: 824
Joined: Wed Mar 02, 2011 10:12 am
Location: Cologne - Germany

Re: Control selected layers

Postby scottywalker » Thu Jan 07, 2016 11:23 am

to stop yourself getting a negative number or a Zero you can add this 'if' code into your 'Minus' button:

if layerselect = 0
{
layerselect = 1
}



Assuming that you named your variable 'layerselect'
scottywalker
 
Posts: 31
Joined: Thu Aug 16, 2012 12:58 pm
Location: Dubai U.A.E

Re: Control selected layers

Postby showmanship » Sat Jan 16, 2016 8:08 pm

Thank you so much guys! Appreciate it. I will try it and let you know when I succeed. Cheers!!
showmanship
 
Posts: 11
Joined: Tue Jan 13, 2015 12:58 am


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 22 guests

cron