Modify a singleton within a vector attribute ?
Posted: 23 Jun 2013 13:23
Hello,
I want to modify the "off" state color for some switches within 100-switches object.
If I use this code to change switch's #7 color: it does not work even it the code is not colored in red by the editor.
This code change the color or all the switches, not just the color of a single one:
I know I could store the colors in a big array and set all the switches in one operation but I'd prefer to avoid this way whenever possible because it might be repeated often and I think it's pretty unefficient to set all the switches's colors when you only want to change one.
Thank you in advance.
I want to modify the "off" state color for some switches within 100-switches object.
If I use this code to change switch's #7 color:
Code: Select all
setattribute(Switches[7], 'colors',100);
This code change the color or all the switches, not just the color of a single one:
Code: Select all
setattribute(Switches, 'colors',100)[7];
Thank you in advance.