I have this command from the script editor:
connectAttr -f physical_light1.message areaLightShape2.miLightShader;
I need to replace areaLightShape2 with my array variable $LightSetup[ ] but I just can't get the correct syntax.
Can any of you guys help out?
EDIT: Looking at this more closely I have other problems! What I am trying to do is put up a window that lists all arealights in a scene and gives the user a check box to tick for each light, which will connect a Mental Ray physical light node.
These 3 lines of MEL do just that;
mrCreateCustomNode -asUtility "" physical_light;
defaultNavigation -ce -source physical_light -destination areaLightShape1.miLightShader;
connectAttr -f physical_light1.message areaLightShape1.miLightShader;
But I need to have my $LightSetup instead of areaLightShape1. Also if there were 2 or more area lights in the scene then the 3rd line would be incorrect as it would always attach physical_light1. Damn this is to complicated for my basic MEL knowledge!