gazybara
@gazybara
New Member
Joined: Feb 14, 2024
Topics: 36 / Replies: 998
Reply
RE: how to count polygones in selection ?

I agree but he asked about mesh number of polygons. I posted solution above but is to slow even for single object.

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

This is the very slow method how to calculate polygon count of selected mesh. Maybe someone can optimize this or write better code fn meshPolyCount o…

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

Why do you need to know how many polygons have object if you used for some viewport process? Are face count is not enough. I sad this because calculat…

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

Yes you are absolutely right. “Maybe” will always be present until we know what the author really wants

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

#2| Meshes with more then 0 verts can be used with Lattice modifier or to draw some polygons maybe and therefore we can say that we need these meshes …

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

Or shorter version fn checkFacesCount nodes limit: = if nodes.count != 0 do ( clearselection() select \ ( for o in nodes where isProperty o #me…

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

fn checkFacesCount nodes limit: = if nodes.count != 0 do ( clearselection() select \ ( for o in nodes where isProperty o #mesh and canConvertTo …

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

We can continue tomorrow then.

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

kredka: function work strange. So I have 4 objects on scene one with 92 poly, 36, 6 and one with 18336. Limit is set on 1000, function should desel…

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

I made a mistake there. @kredka never says at the beginning what exactly wants. After few posts he knows. And then is easy to correct the code. And …

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

denisT: the null is just an undefined variable which equals undefined until it’s not defined In the same time:). I not saw your post.

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

null in mxs is just another undeclared varible and always returns undefined. We only need “true” statement here ei. (isProperty $ #mesh)

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

kredka: i wish i could say “work fine”. It work fine:) but … there is always but it inicate 0 faces when objects are grouped so I used function to …

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

fn checkFacesCount nodes limit: = if nodes.count != 0 do ( for o in nodes where isProperty o #mesh != undefined do if (cnt = o.mesh.faces.count) &…

11 years ago
Forum
Reply
RE: how to count polygones in selection ?

kredka: thanks, work great, but I can’t figure out how to use it in selection, i tried like this but won’t work: numgeofacesmdxray=#() if isPropert…

11 years ago
Forum
Page 22 / 69