[Sidefx-houdini-list] points of a prim

Andrew D Lyons tstexture at gmail.com
Wed Aug 13 17:35:12 EDT 2008


Cool - was going to need this soon...

One thought though - because points can have multiple verts, you might
want to put them all in a "set" data object avoid duplicate point
number entries. ( http://docs.python.org/lib/types-set.html )

primNum = 3
sop = hou.node("/obj/geo1/sphere1")
verts = sop.geometry().prims()[primNum].vertices()
pts = set()
for vert in verts:
  pts.add(vert.point())

Cheers





2008/8/13 Jim Price <shadeops at gmail.com>:
> primNum = 3
> sop = hou.node("/obj/geo1/grid1")
> verts = sop.geometry().prims()[primNum].vertices()
> for vert in verts:
>   print vert.point()
>
>
> On Wed, Aug 13, 2008 at 4:54 PM, Gene Dreitser <keyframe at rogers.com> wrote:
>
>> Heya everyone,
>>
>> My brain is stuck.  I think.
>>
>> I would like to determine which points comprise a particular prim.
>>
>> Imagine a default poly grid, 10x10 -- I need to know what points comprise
>> prim #37.  The hou.prim().vectices() method seems to be returning 0..2 for
>> tris, and 0..3 for quads.  can't find a handy hscript method either.
>>
>> Anyone?  Anyone?  Bueller?
>>
>> G
>> _______________________________________________
>> Sidefx-houdini-list mailing list
>> Sidefx-houdini-list at sidefx.com
>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



-- 
=======================================
Andrew D Lyons | Digital Artist | http://www.tstex.com
=======================================



More information about the Sidefx-houdini-list mailing list