Re: [script] output triangle count
| Date : Wed, 28 Nov 2007 14:13:17 +0100 |
| To : XSI(at)Softimage.COM |
| From : Vladimir Jankijevic <vladimir.jankijevic(at)frame-eleven.com> |
| Subject : Re: [script] output triangle count |
|
maybe something like this?? it's in python and I'm learning it right now so don't blame me for strange code... script: oObj = Application.Selection(0) count = 0 subdivision = [0,1,4,16,32,64,128,256,512,1024] # getting the render subdivision level for p in oObj.Properties: if p.type == 'geomapprox': render_level = p.Parameters("gapproxmordrsl").Value # the math :) if render_level > 0: for poly in oObj.ActivePrimitive.Geometry.Polygons: count += poly.Points.Count count *= subdivision[render_level] *2 else: count = oObj.ActivePrimitive.Geometry.Triangles.count # output LogMessage("object \"" + oObj.name + "\" has " + str(count) + " triangles at render time") Bernard Lebel wrote: All right, thank a lot. I agree about the speed. Unfortunately my knowledge in c++ is very limited, the time it would require me to write such a command is unavailable right now :-( Cheers Bernard On Nov 27, 2007 11:24 AM, Andy Nicholas <andy(at)andynicholas.com> wrote: -- Vladimir Jankijevic 3D / Animation frame eleven ag Schiffbaustrasse 10 8005 Zurich tel +41-1-444 34 44 fax +41-1-444 34 45 vladimir.jankijevic(at)frame-eleven.com www.frame-eleven.com--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi |
- References:
- [script] output triangle count
- From: "Bernard Lebel" <3dbernard(at)gmail.com>
- Re: [script] output triangle count
- From: Guillaume Laforge <guillaume(at)alamaison.fr>
- Re: [script] output triangle count
- From: "Bernard Lebel" <3dbernard(at)gmail.com>
- Re: [script] output triangle count
- From: "Andy Nicholas" <andy(at)andynicholas.com>
- Re: [script] output triangle count
- From: "Bernard Lebel" <3dbernard(at)gmail.com>
- [script] output triangle count
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: Re: object in pano image
- Next by Date: Re: object in pano image
- Previous by Thread: Re: object in pano image
- Next by Thread: Re: object in pano image
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |