would you know of a script to change the colour of an object, using if statements. At the minute we are using, for example:
if((sensorInput.sensor3>=348)&&(sensorInput.sensor2>=348))
{
pCube13.setAttr "blinn2.color" -type double3 1 0 0;
}
all we want to do is change the colour to say RED when the sensor readings are over these values, and from this we can adjust to the rest of our script.
Please let us know asap
Thanks
Mark, Richard, Catman
just break it down into the 3 channels
ReplyDeleteif((sensorInput.sensor3>=348)&&(sensorInput.sensor2>=348))
{
blinn2.colorR = 1;
blinn2.colorG = 0;
blinn2.colorB = 0;
}