PDA

View Full Version : number of lights?


InnerVortex
01-04-2003, 05:33 PM
is there a way to know the number of lights?(without having to manually count them?)
that would be fine for other things like objects groups bones etc.. there is any way?

Nicool
01-04-2003, 06:29 PM
Use melscript... I'm a beginner, but try it :

Select all, then, run this lines:

string $arraySel[]=`ls -light`;
size $arraySel;
print ("Nb of lights : " + $arraySel);

I've not test it !

miabe
01-04-2003, 06:40 PM
there is a mel script called lightman on highend. it can be used to count and manage the lights in your scene. give it a try! :)

Sanctuary
01-04-2003, 08:26 PM
for lights management i recomend l i g h t G i r l it`s even more complex and update from time to time


and btw Nicool no need to select the lights first, if u wanna count only selected lights the use string $arraySel[]=`ls -sl -light`; instead string $arraySel[]=`ls -light`;

InnerVortex
01-04-2003, 08:44 PM
nicol, the script is not working here:( hope u cant test it when u get time.
id use lightgirl or something.. but is just a simple thing i want, maybe ill xec them later

Sanctuary
01-04-2003, 09:07 PM
sorry my mistake, i din`t verify Nicool script, here is my version tested


string $arraySel[]=`ls -lights`;
int $i = `size $arraySel`;
print ("Lights on scene: " + $i);

InnerVortex
01-04-2003, 11:58 PM
sweet!

CGTalk Moderation
01-14-2006, 02:00 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.