|11 November 2007||#1|
Join Date: Oct 2003
Can't get the correct syntax
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!
Last edited by foggyball : 11 November 2007 at 02:28 PM.
|11 November 2007||#2|
Join Date: Jul 2002
current line snippet:
if $LightSetup is an array and you wish to use the first element:
if $LightSetup is only a string:
|11 November 2007||#3|
Join Date: Sep 2003
Thread automatically closed
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.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|