View Full Version : Query polycount

04-16-2003, 05:02 PM
I am messing with a script that just looks for the current number of polys and prints the number.

So I put in:

totalpolys = polycount();

Now if there is one poly I will get "1 0 0 0 1 0".

Why is that? I was exspecting "1"...

04-16-2003, 05:17 PM
This is what I want to do... if you think you can do it, go for it. Just send me the script. I want it to be non-modal so I can work while it's up. But I don't have MSVC++ to do it... so I was looking for a hot-key method.

04-16-2003, 07:53 PM


polycount() doesn't just spit out the value of selected polygons, but a number of different, yet related, values - like number of selected polygons with four verts, which incidentally I think is the second 1 almost at the end of the number sequence/array.
The [1] stands for the first value in the array which polycount() spits out. If you would use [2] you'd get the zero beside the 1 and so forth. Check the lscript reference manual for what the other numbers stand for.

The other stuff I can't help with unfortunatly.

04-16-2003, 08:50 PM
Thanks for the push in the right direction dude!!

04-19-2003, 09:08 PM
remember to either put selmode(USER) or selmode(DIRECT) before you call polycount().

04-19-2003, 09:40 PM
Ok, cool ^_^!!