PDA

View Full Version : Is there a mel script to change the filter size of multiple lights?


Stubins
07-16-2007, 10:42 AM
I have a scene with 200 lights in and need to change the filter size from the annoying default of 1 to 4 to all of the lights. The filter channel isn't listed in the att spread sheet. Is there a painless way of achieving this?
Thanks for taking the time to read this.

isoparmB
07-16-2007, 11:02 AM
If it's the depth map filter size, just run this code.

string $lightTypes[] = {"pointLight", "spotLight", "directionalLight", "areaLight", "volumeLight"};
string $item;
string $item2;
for($item in $lightTypes)
{
string $list[] = `ls -et $item`;
for($item2 in $list)
{
setAttr ($item2 + ".dmapFilterSize") 4;
};
};

Stubins
07-16-2007, 11:13 AM
Cheers IsoparmB,
that worked a treat! You are a God and have saved me from a whole heap of pain.
Thanks

isoparmB
07-16-2007, 11:15 AM
No prob. Lem.

kjaft
07-18-2007, 08:10 AM
you might also want to try the lightGirl Script from highend3d.com, which makes it very comfortable to manage lots of lights.

CGTalk Moderation
07-18-2007, 08:10 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.