|
| Re: select lights by object? |
 |
Wed, 29 Aug 2007 23:10:04 +000 |
You're probably getting that error in WhoLightsMe because after you run the
script, you need to click on the object. If you don't you'll get that error.
However, I noticed the script will only tell you what lights have the object
included. A light may have no include or exclude list, and it'll still
illuminate the object even though it won't be found by the script.
try this script instead. Click on Maxscript, new script, and paste this text,
then hit evaluate...
check_obj = pickobject()
lights_array = #()
for l in Lights where classof l != TargetObject do
(
inclOrExcl = 0
incl = l.includeList
excl = l.excludeList
if l.includeList == undefined then inclOrExcl = 1
if inclOrExcl == 0 then
(
if findItem incl check_obj != 0 then append lights_array l
)
else
(
if findItem excl check_obj == 0 then append lights_array l
)
)
format "Object % is included on the following lights:\n"
check_obj.name
for i in lights_array do format "%\n" i.name
|
| Post Reply
|
|
|
|
|
|
|
|
|
|