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

07 July 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.

07 July 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;

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

07 July 2007, 11:15 AM
No prob. Lem.

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

CGTalk Moderation
07 July 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.