Page 1 of 1

script to change object colours

Posted: 25 Jan 2013 05:22
by auralsculpture
I need a script that will change the colour of [fader1] with a switch [switch1] :oops:

I 'm working on an simple ImpOscar editor and the envelope amount (cc#24) controls either envelope 1 or 2 depending on a switch position (cc#119). I'd love to change the colour of the control with the switch that selects its function.
There are several other similar things in the interface so this is going to be used a lot. I may even use a similar function to make interface elements invisible ..

Re: script to change object colours

Posted: 25 Jan 2013 09:34
by auralsculpture
Easier than I thought

script on the button.

What got me is that a Knob has foreground and background colors, both of which have to be set, hence the 2 x RGB codes.


Code: Select all

if (x<0.5)setattribute(EnvAmount, 'color',{RGB(1,1,1),RGB(0,0,1)});
else setattribute(EnvAmount, 'color',{RGB(1,1,1),RGB(0,1,0)});
:shock: