PDA

View Full Version : Light Array help


zmuh11
11-03-2009, 01:16 AM
Hello everyone,

I have a question. What I want to do is create a group and add an attribute called intensity and then have that new attribute drive the intensity of a number of lights so I can just change the intensity attribute and have the intensity on all the lights change. I'm not very good with mel and expressions but am very willing to listen and learn from everyone.

Thank you very much
Zach

phix314
11-03-2009, 04:58 AM
What I do for these situations is creating either a nurbs letter or a locator. In the channel box add an attribute. Give it a name, type of float, and a min, max, and default value. Once it's created, you can connect the lights to it a few different ways. You can use the connection editor and attach the intensity value to the attribute, or with mel:



proc attach(){
//select the lights to be connected
string $sel[] = `ls -sl`;
for($light in $sel){
connectAttr locator.intensity ($light+".intensity");
}
}



I don't have maya in front of me so I believe that works... hope so.. ;)

zmuh11
11-03-2009, 05:42 AM
Thanks for the help Phix314

CGTalk Moderation
11-03-2009, 05:42 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.