script to change object colours

Discuss Lemur and share techniques.
Post Reply
auralsculpture
Newbie
Posts: 33
Joined: 22 Dec 2011 12:18

script to change object colours

Post 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 ..
auralsculpture
Newbie
Posts: 33
Joined: 22 Dec 2011 12:18

Re: script to change object colours

Post 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:
Post Reply