PDA

View Full Version : light count?



claw
07-26-2004, 02:17 PM
Hi, are there any data member in the scene object agent that can provide me how many lights there are in my scene? Can't seem to find it anyway.

cheers!

Blypht
07-26-2004, 02:25 PM
There's nothing direct that I'm aware of.

Try the following code segment:

objLight = Light();
intCount = 0;
while (objLight != nil)
{
intCount++;

objLight = objLight.next();
}

info("# of lights = ",intCount);
or you could return it from a UDF containing this code:
return(intCount);

Hope this helps.

Best!

claw
07-26-2004, 04:11 PM
wow, thanks for that quick reply! I owe you one!:)